Mercurial > mm7
comparison OSAPI.cpp @ 0:9c0607679772
init
author | Ritor1 |
---|---|
date | Sat, 12 Jan 2013 09:45:18 +0600 |
parents | |
children | 739d8f3b50f9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9c0607679772 |
---|---|
1 #include "OSAPI.h" | |
2 #include "OSInfo.h" | |
3 #include "Log.h" | |
4 | |
5 | |
6 OSVersion *pVersion = nullptr; | |
7 | |
8 | |
9 //----- (00462C94) -------------------------------------------------------- | |
10 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd) | |
11 { | |
12 Log::Initialize(); | |
13 | |
14 //if (HWND hMM7Window = FindWindowW(L"MM7", 0)) | |
15 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0)) | |
16 { | |
17 if (IsIconic(hMM7Window)) | |
18 ShowWindow(hMM7Window, SW_RESTORE); | |
19 SetForegroundWindow(GetLastActivePopup(hMM7Window)); | |
20 return 0; | |
21 } | |
22 HWND hPrevWindow = GetActiveWindow(); | |
23 | |
24 pVersion = new OSVersion; | |
25 { | |
26 Log::Warning(L"OS init: ok"); | |
27 | |
28 extern bool MM_Main(const wchar_t *pCmdLine); | |
29 MM_Main(lpCmdLine); | |
30 } | |
31 delete pVersion; | |
32 pVersion = nullptr; | |
33 | |
34 SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); | |
35 if (hPrevWindow) | |
36 SetActiveWindow(hPrevWindow); | |
37 | |
38 __debugbreak(); | |
39 return 0; | |
40 } |