ReactOS 0.4.15-dev-7998-gdb93cb1
servman.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Services
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/applications/mscutils/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#include <winnls.h>
13
17
18int WINAPI
19wWinMain(HINSTANCE hThisInstance,
20 HINSTANCE hPrevInstance,
21 LPWSTR lpCmdLine,
22 int nCmdShow)
23{
24 LPWSTR lpAppName;
26 HACCEL hAccelTable;
27 MSG Msg;
28 int Ret = 1;
30
32 {
35 break;
36
37 default:
38 break;
39 }
40
41 hInstance = hThisInstance;
43
44 icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
47
48 if (!AllocAndLoadString(&lpAppName,
51 {
52 return 1;
53 }
54
55 hAccelTable = LoadAcceleratorsW(hInstance,
57
59 {
60 hMainWnd = CreateMainWindow(lpAppName,
61 nCmdShow);
62 if (hMainWnd != NULL)
63 {
64 /* pump the message queue */
65 while (GetMessageW( &Msg, NULL, 0, 0 ) )
66 {
67 //if ( !hProgDlg || !IsWindow(hProgDlg) || !IsDialogMessage(hProgDlg, &Msg) )
68 //if (!IsDialogMessage(g_hProgDlg, &Msg))
69 if (!TranslateAcceleratorW(hMainWnd, hAccelTable, &Msg))
70 {
73 }
74 }
75
76 Ret = 0;
77 }
78
80 }
81
82 LocalFree((HLOCAL)lpAppName);
83
84 return Ret;
85}
#define IDS_APPNAME
Definition: resource.h:49
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
VOID UninitMainWindowImpl(VOID)
Definition: mainwnd.c:990
BOOL InitMainWindowImpl(VOID)
Definition: mainwnd.c:964
#define IDA_SERVMAN
Definition: resource.h:5
HWND CreateMainWindow()
Definition: biditext.c:330
struct @1633 Msg[]
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:816
HWND hMainWnd
Definition: magnifier.c:32
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define ICC_COOL_CLASSES
Definition: commctrl.h:69
#define ICC_WIN95_CLASSES
Definition: commctrl.h:66
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_HEBREW
Definition: nls.h:67
#define SUBLANG_DEFAULT
Definition: nls.h:168
HANDLE ProcessHeap
Definition: servman.c:15
HINSTANCE hInstance
Definition: servman.c:14
int WINAPI wWinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
Definition: servman.c:19
HWND g_hProgDlg
Definition: servman.c:16
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1719
#define WINAPI
Definition: msvc.h:6
#define LAYOUT_RTL
Definition: wingdi.h:1371
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR * LPWSTR
Definition: xmlstorage.h:184