Hello, I have this code:
void GetProcId(char* ProcName)
{
PROCESSENTRY32 pe32;
HANDLE hSnapshot = NULL;
pe32.dwSize = sizeof( PROCESSENTRY32 );
hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if( Process32First( hSnapshot, &pe32 ) )
{
do{
if( _stricmp( pe32.szExeFile, ProcName ) == 0 )
break;
}while( Process32Next( hSnapshot, &pe32 ) );
}
if( hSnapshot != INVALID_HANDLE_VALUE )
CloseHandle( hSnapshot );
ProcId = pe32.th32ProcessID;
}
But I keep getting:
argument of type "WCHAR *" is incompatible with parameter of type "const char *
'_stricmp' : cannot convert parameter 1 from 'WCHAR [260]' to 'const char *'
I dont know what to do anymore, I'm researching this kind of code for over 2h!