[HEADERS]
[reactos.git] / reactos / base / applications / mscutils / servman / servman.c
1 /*
2 * PROJECT: ReactOS Services
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/system/servman/servman.c
5 * PURPOSE: Program HQ
6 * COPYRIGHT: Copyright 2005 - 2006 Ged Murphy <gedmurphy@gmail.com>
7 *
8 */
9
10 #include "precomp.h"
11
12 HINSTANCE hInstance;
13 HANDLE ProcessHeap;
14
15 int WINAPI
16 _tWinMain(HINSTANCE hThisInstance,
17 HINSTANCE hPrevInstance,
18 LPTSTR lpCmdLine,
19 int nCmdShow)
20 {
21 LPTSTR lpAppName;
22 HWND hMainWnd;
23 MSG Msg;
24 int Ret = 1;
25 INITCOMMONCONTROLSEX icex;
26
27 hInstance = hThisInstance;
28 ProcessHeap = GetProcessHeap();
29
30 icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
31 icex.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES;
32 InitCommonControlsEx(&icex);
33
34 if (!AllocAndLoadString(&lpAppName,
35 hInstance,
36 IDS_APPNAME))
37 {
38 return 1;
39 }
40
41 if (InitMainWindowImpl())
42 {
43 hMainWnd = CreateMainWindow(lpAppName,
44 nCmdShow);
45 if (hMainWnd != NULL)
46 {
47 /* pump the message queue */
48 while( GetMessage( &Msg, NULL, 0, 0 ) )
49 {
50 //if(! IsDialogMessage(hProgDlg, &Msg) )
51 //{
52 TranslateMessage(&Msg);
53 DispatchMessage(&Msg);
54 //}
55 }
56
57 Ret = 0;
58 }
59
60 UninitMainWindowImpl();
61 }
62
63 LocalFree((HLOCAL)lpAppName);
64
65 return Ret;
66 }