Having two errors
Having these two errors and cannot find out how to fix them; I googled everywhere. Underlined and made red the location of error..
1) Error: argument of type"const char*" is incompatible with parameter of type "LPCWSTR"
2) Error: argument of type "WCHAR*" is incompatible with "const char *"
Hopefully one of you can help me.
1) Error: argument of type"const char*" is incompatible with parameter of type "LPCWSTR"
Code:
}
if (FindWindow("Valve001", NULL) == NULL) //is game closed?
break;
Sleep(20);
}
Code:
do
{
this->setHwnd(FindWindow("Valve001", NULL));
Sleep(20);
} while (this->hwnd == NULL);
Code:
static DWORD dll = 0;
HANDLE s = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, this->pid);
if (s == NULL || GetLastError() != 0)
return false;
MODULEENTRY32 m = { 0 };
m.dwSize = sizeof(MODULEENTRY32);
BOOL have = Module32First(s, &m);
while (have)
{
if (strcmp(m.szModule, "client.dll") == 0)
{
dll = (DWORD)m.modBaseAddr;
break;
}
have = Module32Next(s, &m);
}
CloseHandle(s);
if (!dll)
return false;
