error C2664: 'strcmp' : cannot convert parameter 1 from 'WCHAR [260]' to 'const char *'

HANDLE pSnapList;
        PROCESSENTRY32 p32Info;
    BOOL     p32Status;

    pSnapList = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );    
    p32Info.dwSize = sizeof( PROCESSENTRY32 );

                p32Status = Process32First( pSnapList, &p32Info );
                while( Process32Next( pSnapList, &p32Info ) )
                {
                        [b][u]if( !strcmp( p32Info.szExeFile, processName.c_str() ) )[/u][/b] 
                   {
                                 processID = p32Info.th32ProcessID;
                         return;

}



                };

Microsoft unicode stuff.

http://msdn.microsoft.com/en-us/library/aa272960%28v=vs.60%29.aspx

You will likely opt to use either the "char" type of string, or the "wchar_t" type.
Visual Studio provides a std::wstring.

http://msdn.microsoft.com/en-us/library/wt3s3k55%28v=vs.71%29.aspx

Note that wstring is a basic_string<> templated to wchar_t.

You may also opt to convert the "char" string to "wchar_t".
See MultiByteToWideChar: http://msdn.microsoft.com/en-us/library/dd319072

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.