// AUTOGENERATED COPYRIGHT HEADER START // Copyright (C) 2020-2023 Michael Fabian 'Xaymar' Dirks // AUTOGENERATED COPYRIGHT HEADER END #include "warning-disable.hpp" #include #include #include "warning-enable.hpp" std::shared_ptr local_mutex; std::shared_ptr global_mutex; BOOL WINAPI DllMain(HINSTANCE, DWORD dwReason, LPVOID) { if (dwReason == DLL_PROCESS_ATTACH) { // Prevent installer from progressing while StreamFX is still active. local_mutex = std::shared_ptr(CreateMutexW(NULL, TRUE, L"Local\\StreamFX-Setup"), [](HANDLE p) { ReleaseMutex(p); CloseHandle(p); }); global_mutex = std::shared_ptr(CreateMutexW(NULL, TRUE, L"Global\\StreamFX-Setup"), [](HANDLE p) { ReleaseMutex(p); CloseHandle(p); }); } return TRUE; }