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