0
|
1 #include "OSAPI.h"
|
|
2 #include "OSInfo.h"
|
|
3 #include "Log.h"
|
|
4
|
|
5
|
|
6 OSVersion *pVersion = nullptr;
|
|
7
|
|
8 //----- (00462C94) --------------------------------------------------------
|
|
9 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
|
|
10 {
|
|
11 Log::Initialize();
|
|
12
|
|
13 if (HWND hMM7Window = FindWindowW(L"MM7", 0))
|
|
14 {
|
|
15 if (IsIconic(hMM7Window))
|
|
16 ShowWindow(hMM7Window, SW_RESTORE);
|
|
17 SetForegroundWindow(GetLastActivePopup(hMM7Window));
|
|
18 return 0;
|
|
19 }
|
|
20 HWND hPrevWindow = GetActiveWindow();
|
|
21
|
|
22 pVersion = new OSVersion;
|
|
23 {
|
|
24 extern bool MM_Main(const wchar_t *pCmdLine);
|
|
25 MM_Main(lpCmdLine);
|
|
26 }
|
|
27 delete pVersion;
|
|
28 pVersion = nullptr;
|
|
29
|
|
30 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
|
|
31 if (hPrevWindow)
|
|
32 SetActiveWindow(hPrevWindow);
|
|
33
|
|
34 __debugbreak();
|
|
35 return 0;
|
|
36 }
|