0
|
1 #include "OSAPI.h"
|
|
2 #include "OSInfo.h"
|
|
3 #include "Log.h"
|
|
4
|
|
5
|
2152
|
6 bool OSInfo::initialized = false;
|
|
7 OSVERSIONINFOA OSInfo::info;
|
0
|
8
|
|
9
|
1926
|
10
|
1038
|
11
|
0
|
12 //----- (00462C94) --------------------------------------------------------
|
|
13 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
|
|
14 {
|
|
15 Log::Initialize();
|
|
16
|
|
17 //if (HWND hMM7Window = FindWindowW(L"MM7", 0))
|
|
18 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))
|
|
19 {
|
|
20 if (IsIconic(hMM7Window))
|
|
21 ShowWindow(hMM7Window, SW_RESTORE);
|
|
22 SetForegroundWindow(GetLastActivePopup(hMM7Window));
|
|
23 return 0;
|
|
24 }
|
2152
|
25
|
0
|
26 HWND hPrevWindow = GetActiveWindow();
|
|
27 {
|
|
28 Log::Warning(L"OS init: ok");
|
|
29 extern bool MM_Main(const wchar_t *pCmdLine);
|
|
30 MM_Main(lpCmdLine);
|
|
31 }
|
|
32 if (hPrevWindow)
|
|
33 SetActiveWindow(hPrevWindow);
|
|
34
|
2152
|
35 return GetLastError();
|
0
|
36 }
|
1545
|
37
|
|
38
|
|
39
|
|
40
|
|
41 void MsgBox(const wchar_t *msg, const wchar_t *title)
|
|
42 {
|
|
43 MessageBoxW(nullptr, msg, title, 0);
|
|
44 } |