1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

fix for last commit

This commit is contained in:
FunkyFr3sh 2020-09-19 12:05:49 +02:00
parent 28b4965611
commit e10cfa3e1a

View File

@ -212,6 +212,11 @@ void Hook_Init()
{ {
if (!Hook_Active && HookingMethod == 3) if (!Hook_Active && HookingMethod == 3)
{ {
FARPROC proc = GetProcAddress(GetModuleHandle("kernelbase.dll"), "LoadLibraryExW");
if (proc)
real_LoadLibraryExW = proc;
DetourTransactionBegin(); DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread()); DetourUpdateThread(GetCurrentThread());
DetourAttach((PVOID*)&real_LoadLibraryExW, (PVOID)fake_LoadLibraryExW); DetourAttach((PVOID*)&real_LoadLibraryExW, (PVOID)fake_LoadLibraryExW);