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

Function DllMain

Revive/main.cpp:87–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
88{
89 if (DetourIsHelperProcess())
90 return TRUE;
91
92#if defined(_WIN64)
93 const char* pBitDepth = "64";
94#else
95 const char* pBitDepth = "32";
96#endif
97 switch (ul_reason_for_call)
98 {
99 case DLL_PROCESS_ATTACH:
100 revModule = (HMODULE)hModule;
101 GetModuleFileName(revModule, revModuleName, MAX_PATH);
102 swprintf(ovrModuleName, MAX_PATH, L"LibOVRRT%hs_%d.dll", pBitDepth, OVR_MAJOR_VERSION);
103
104 DetourRestoreAfterWith();
105 AttachDetours();
106 break;
107 case DLL_PROCESS_DETACH:
108 DetachDetours();
109 break;
110 default:
111 break;
112 }
113 return TRUE;
114}

Callers

nothing calls this directly

Calls 2

AttachDetoursFunction · 0.70
DetachDetoursFunction · 0.70

Tested by

no test coverage detected