| 11 | #include <Psapi.h> |
| 12 | |
| 13 | BOOL WINAPI DllMain(_In_ HINSTANCE module, _In_ DWORD reason, _In_ LPVOID reserved) |
| 14 | { |
| 15 | if (reason == DLL_PROCESS_ATTACH) |
| 16 | { |
| 17 | if (!InitializeService()) |
| 18 | { |
| 19 | // If the r77 service could not initialize, it is either already attached, or failed to initialize, detach the DLL. |
| 20 | return FALSE; |
| 21 | } |
| 22 | } |
| 23 | else if (reason == DLL_PROCESS_DETACH) |
| 24 | { |
| 25 | UninitializeService(); |
| 26 | } |
| 27 | |
| 28 | return TRUE; |
| 29 | } |
| 30 | |
| 31 | BOOL InitializeService() |
| 32 | { |
nothing calls this directly
no test coverage detected