Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signed int __cdecl isAlreadyRunning()
- {
- HWND v0; // eax@2
- signed int result; // eax@3
- CreateEventA(0, 0, 1, AppClassName);
- if ( GetLastError() == ERROR_ALREADY_EXISTS )
- {
- v0 = FindWindowA(AppClassName, (LPCSTR)RsGlobal.AppName);
- if ( v0 )
- {
- SetForegroundWindow(v0);
- result = 1;
- }
- else
- {
- SetForegroundWindow(RsGlobal.ps->window);
- result = 1;
- }
- }
- else
- {
- result = 0;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement