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>
17 _tWinMain(HINSTANCE hThisInstance
,
18 HINSTANCE hPrevInstance
,
26 INITCOMMONCONTROLSEX icex
;
28 hMutex
= CreateMutex(NULL
, TRUE
, _T("devmgmt_mutex"));
29 if (hMutex
== NULL
|| GetLastError() == ERROR_ALREADY_EXISTS
)
38 switch (GetUserDefaultUILanguage())
40 case MAKELANGID(LANG_HEBREW
, SUBLANG_DEFAULT
):
41 SetProcessDefaultLayout(LAYOUT_RTL
);
48 hInstance
= hThisInstance
;
49 ProcessHeap
= GetProcessHeap();
51 icex
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
52 icex
.dwICC
= ICC_BAR_CLASSES
| ICC_COOL_CLASSES
;
53 InitCommonControlsEx(&icex
);
55 if (!AllocAndLoadString(&lpAppName
,
62 if (InitMainWindowImpl())
64 hMainWnd
= CreateMainWindow(lpAppName
,
68 /* pump the message queue */
69 while( GetMessage( &Msg
, NULL
, 0, 0 ) )
71 TranslateMessage(&Msg
);
72 DispatchMessage(&Msg
);
79 UninitMainWindowImpl();
82 LocalFree((HLOCAL
)lpAppName
);