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