2 * PROJECT: ReactOS Device Managment
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/system/devmgmt/devmgmt.c
6 * COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
19 _tWinMain(HINSTANCE hThisInstance
,
20 HINSTANCE hPrevInstance
,
28 INITCOMMONCONTROLSEX icex
;
30 hMutex
= CreateMutex(NULL
, TRUE
, _T("devmgmt_mutex"));
31 if (hMutex
== NULL
|| GetLastError() == ERROR_ALREADY_EXISTS
)
40 switch (GetUserDefaultUILanguage())
42 case MAKELANGID(LANG_HEBREW
, SUBLANG_DEFAULT
):
43 SetProcessDefaultLayout(LAYOUT_RTL
);
50 hInstance
= hThisInstance
;
51 ProcessHeap
= GetProcessHeap();
53 icex
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
54 icex
.dwICC
= ICC_BAR_CLASSES
| ICC_COOL_CLASSES
;
55 InitCommonControlsEx(&icex
);
57 if (!AllocAndLoadString(&lpAppName
,
64 if (InitMainWindowImpl())
66 hMainWnd
= CreateMainWindow(lpAppName
,
70 /* pump the message queue */
71 while( GetMessage( &Msg
, NULL
, 0, 0 ) )
73 TranslateMessage(&Msg
);
74 DispatchMessage(&Msg
);
81 UninitMainWindowImpl();
84 LocalFree((HLOCAL
)lpAppName
);