MCPcopy Create free account
hub / github.com/Vhonowslend/StreamFX-Public / DllMain

Function DllMain

source/windll.cpp:13–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11std::shared_ptr<void> global_mutex;
12
13BOOL 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected