diff --git a/src/utils.c b/src/utils.c index bae65bc..fe1db06 100644 --- a/src/utils.c +++ b/src/utils.c @@ -149,13 +149,13 @@ FARPROC util_get_iat_proc(HMODULE mod, char* module_name, char* function_name) BOOL util_caller_is_ddraw_wrapper(void* return_address) { BOOL (WINAPI *getModuleHandleExA)(DWORD, LPCSTR, HMODULE*) = - (void*)real_GetProcAddress(GetModuleHandleA("Kernel32.dll"), "GetModuleHandleExA"); + (void*)real_GetProcAddress(real_LoadLibraryA("Kernel32.dll"), "GetModuleHandleExA"); if (!getModuleHandleExA) return FALSE; - void* directDrawCreate = util_get_iat_proc(GetModuleHandleA(NULL), "ddraw.dll", "DirectDrawCreate"); - void* directDrawCreateEx = util_get_iat_proc(GetModuleHandleA(NULL), "ddraw.dll", "DirectDrawCreateEx"); + void* directDrawCreate = (void*)util_get_iat_proc(GetModuleHandleA(NULL), "ddraw.dll", "DirectDrawCreate"); + void* directDrawCreateEx = (void*)util_get_iat_proc(GetModuleHandleA(NULL), "ddraw.dll", "DirectDrawCreateEx"); TRACE("%s directDrawCreate = %p, directDrawCreateEx = %p\n", __FUNCTION__, directDrawCreate, directDrawCreateEx);