| 58 | } |
| 59 | |
| 60 | BOOL 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 | } |
nothing calls this directly
no test coverage detected