| 73 | } |
| 74 | |
| 75 | BOOL 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 | } |
nothing calls this directly
no test coverage detected