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

Function DllMain

ReviveXR/main.cpp:75–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
76{
77 if (DetourIsHelperProcess())
78 return TRUE;
79
80#if defined(_WIN64)
81 const char* pBitDepth = "64";
82#else
83 const char* pBitDepth = "32";
84#endif
85 switch (ul_reason_for_call)
86 {
87 case DLL_PROCESS_ATTACH:
88 revModule = (HMODULE)hModule;
89 GetModuleFileName(revModule, revModuleName, MAX_PATH);
90 swprintf(ovrModuleName, MAX_PATH, L"LibOVRRT%hs_%d.dll", pBitDepth, OVR_MAJOR_VERSION);
91
92 DetourRestoreAfterWith();
93 AttachDetours();
94 break;
95 case DLL_PROCESS_DETACH:
96 DetachDetours();
97 break;
98 default:
99 break;
100 }
101 return TRUE;
102}

Callers

nothing calls this directly

Calls 2

AttachDetoursFunction · 0.70
DetachDetoursFunction · 0.70

Tested by

no test coverage detected