MCPcopy Create free account
hub / github.com/LibreVR/Revive / DllMain

Function DllMain

LibOVRProxy/main.cpp:60–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
61{
62 if (DetourIsHelperProcess())
63 return TRUE;
64
65#if defined(_WIN64)
66 const char* pBitDepth = "64";
67#else
68 const char* pBitDepth = "32";
69#endif
70 switch (ul_reason_for_call)
71 {
72 case DLL_PROCESS_ATTACH:
73 GetModuleFileName((HMODULE)hModule, revModuleName, MAX_PATH);
74 swprintf(ovrModuleName, MAX_PATH, L"LibOVRRT%hs_%d.dll", pBitDepth, OVR_MAJOR_VERSION);
75
76 DetourRestoreAfterWith();
77 AttachDetours();
78 break;
79 case DLL_PROCESS_DETACH:
80 DetachDetours();
81 break;
82 default:
83 break;
84 }
85 return TRUE;
86}

Callers

nothing calls this directly

Calls 2

AttachDetoursFunction · 0.70
DetachDetoursFunction · 0.70

Tested by

no test coverage detected