MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / UnhookAPI

Function UnhookAPI

IntelPresentMon/FlashInjectorLibrary/Hooks/Hooks.cpp:38–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 bool UnhookAPI(const std::string& name, PVOID* ppRealFn, PVOID pMineFn)
39 {
40 Initialize();
41
42 DetourTransactionBegin();
43 DetourUpdateThread(GetCurrentThread());
44 DetourDetach(ppRealFn, pMineFn);
45
46 auto error = DetourTransactionCommit();
47 if (error != NO_ERROR)
48 {
49 LOGE << "Error unhooking API call: " << name;
50 return false;
51 }
52
53 LOGI << "Unooked API call: " << name;
54 return true;
55 }
56}

Callers 1

DetachMethod · 0.85

Calls 1

InitializeFunction · 0.70

Tested by

no test coverage detected