@@ -685,8 +685,8 @@ void InstallCreateProcessHooks()
685685
686686 // Hook CreateProcess APIs
687687 HMODULE h_kernel32 = GetModuleHandle (L" kernel32.dll" );
688- InterlockedExchangePointer ((PVOID* )&p_CreateProcessA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateProcessA" ), " CreateProcessA" , *CreateProcessAHandler));
689- InterlockedExchangePointer ((PVOID* )&p_CreateProcessW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateProcessW" ), " CreateProcessW" , *CreateProcessWHandler));
688+ InterlockedExchangePointer ((PVOID)&p_CreateProcessA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateProcessA" ), " CreateProcessA" , *CreateProcessAHandler));
689+ InterlockedExchangePointer ((PVOID)&p_CreateProcessW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateProcessW" ), " CreateProcessW" , *CreateProcessWHandler));
690690}
691691
692692void DisableFileSystemHooking ()
@@ -706,16 +706,16 @@ void InstallFileSystemHooks(HMODULE hModule)
706706
707707 // Hook GetModuleFileName and GetModuleHandleEx to fix module name in modules loaded from memory
708708 HMODULE h_kernel32 = GetModuleHandle (L" kernel32.dll" );
709- InterlockedExchangePointer ((PVOID* )&p_GetModuleFileNameA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetModuleFileNameA" ), " GetModuleFileNameA" , GetModuleFileNameAHandler));
710- InterlockedExchangePointer ((PVOID* )&p_GetModuleFileNameW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetModuleFileNameW" ), " GetModuleFileNameW" , GetModuleFileNameWHandler));
709+ InterlockedExchangePointer ((PVOID)&p_GetModuleFileNameA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetModuleFileNameA" ), " GetModuleFileNameA" , * GetModuleFileNameAHandler));
710+ InterlockedExchangePointer ((PVOID)&p_GetModuleFileNameW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetModuleFileNameW" ), " GetModuleFileNameW" , * GetModuleFileNameWHandler));
711711
712712 // Hook FileSystem APIs
713- InterlockedExchangePointer ((PVOID* )&p_CreateFileA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateFileA" ), " CreateFileA" , *CreateFileAHandler));
714- InterlockedExchangePointer ((PVOID* )&p_CreateFileW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateFileW" ), " CreateFileW" , *CreateFileWHandler));
715- InterlockedExchangePointer ((PVOID* )&p_FindFirstFileA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " FindFirstFileA" ), " FindFirstFileA" , *FindFirstFileAHandler));
716- InterlockedExchangePointer ((PVOID* )&p_FindNextFileA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " FindNextFileA" ), " FindNextFileA" , *FindNextFileAHandler));
717- InterlockedExchangePointer ((PVOID* )&p_GetPrivateProfileStringA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetPrivateProfileStringA" ), " GetPrivateProfileStringA" , *GetPrivateProfileStringAHandler));
718- InterlockedExchangePointer ((PVOID* )&p_GetPrivateProfileStringW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetPrivateProfileStringW" ), " GetPrivateProfileStringW" , *GetPrivateProfileStringWHandler));
713+ InterlockedExchangePointer ((PVOID)&p_CreateFileA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateFileA" ), " CreateFileA" , *CreateFileAHandler));
714+ InterlockedExchangePointer ((PVOID)&p_CreateFileW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " CreateFileW" ), " CreateFileW" , *CreateFileWHandler));
715+ InterlockedExchangePointer ((PVOID)&p_FindFirstFileA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " FindFirstFileA" ), " FindFirstFileA" , *FindFirstFileAHandler));
716+ InterlockedExchangePointer ((PVOID)&p_FindNextFileA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " FindNextFileA" ), " FindNextFileA" , *FindNextFileAHandler));
717+ InterlockedExchangePointer ((PVOID)&p_GetPrivateProfileStringA, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetPrivateProfileStringA" ), " GetPrivateProfileStringA" , *GetPrivateProfileStringAHandler));
718+ InterlockedExchangePointer ((PVOID)&p_GetPrivateProfileStringW, Hook::HotPatch (Hook::GetProcAddress (h_kernel32, " GetPrivateProfileStringW" ), " GetPrivateProfileStringW" , *GetPrivateProfileStringWHandler));
719719
720720 // Check for hook failures
721721 if (!p_GetModuleFileNameA || !p_GetModuleFileNameW ||
0 commit comments