MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / DllMain

Function DllMain

ExplorerHooks/dllmain.cpp:13–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11void *payload = nullptr;
12
13BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID) noexcept
14{
15 switch (fdwReason)
16 {
17 case DLL_PROCESS_ATTACH:
18 // Are we in Explorer?
19 payload = DetourFindPayloadEx(EXPLORER_PAYLOAD, nullptr);
20 if (payload)
21 {
22 // Install the things
23 SWCADetour::Install();
24 TaskViewVisibilityMonitor::Install();
25 }
26 break;
27
28 case DLL_PROCESS_DETACH:
29 if (payload)
30 {
31 TaskViewVisibilityMonitor::Uninstall();
32 SWCADetour::Uninstall();
33 }
34 break;
35 }
36
37 return true;
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected