| 11 | std::shared_ptr<void> global_mutex; |
| 12 | |
| 13 | BOOL WINAPI DllMain(HINSTANCE, DWORD dwReason, LPVOID) |
| 14 | { |
| 15 | if (dwReason == DLL_PROCESS_ATTACH) { |
| 16 | // Prevent installer from progressing while StreamFX is still active. |
| 17 | local_mutex = std::shared_ptr<void>(CreateMutexW(NULL, TRUE, L"Local\\StreamFX-Setup"), [](HANDLE p) { |
| 18 | ReleaseMutex(p); |
| 19 | CloseHandle(p); |
| 20 | }); |
| 21 | global_mutex = std::shared_ptr<void>(CreateMutexW(NULL, TRUE, L"Global\\StreamFX-Setup"), [](HANDLE p) { |
| 22 | ReleaseMutex(p); |
| 23 | CloseHandle(p); |
| 24 | }); |
| 25 | } |
| 26 | |
| 27 | return TRUE; |
| 28 | } |
nothing calls this directly
no outgoing calls
no test coverage detected