argument of type "WCHAR *" is incompatible with parameter of type "const char *"

262 views Asked by At

I get this message and i dont know what to do.

argument of type "WCHAR *" is incompatible with parameter of type "const char *"

this is the code(it has a problem with the modEntry)

uintptr_t GetModule(const char* modName, DWORD procId) {
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
if (hSnap != INVALID_HANDLE_VALUE) {
    MODULEENTRY32 modEntry;
    modEntry.dwSize = sizeof(modEntry);
    if (Module32First(hSnap, &modEntry)) {
        do {
            if (!strcmp(modEntry.szModule, modName)) {
                CloseHandle(hSnap);
                return (uintptr_t)modEntry.modBaseAddr;
            }
        } while (Module32Next(hSnap, &modEntry));
    }
}

}

0

There are 0 answers