ReactOS 0.4.15-dev-7906-g1b85a5f
winmain.cpp File Reference
#include "rapps.h"
#include "unattended.h"
#include "winmain.h"
#include <atlcom.h>
#include <gdiplus.h>
#include <conutils.h>
Include dependency graph for winmain.cpp:

Go to the source code of this file.

Functions

INT WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nShowCmd)
 

Variables

LPCWSTR szWindowClass = L"ROSAPPMGR2"
 
HWND hMainWnd
 
HINSTANCE hInst
 
SETTINGS_INFO SettingsInfo
 
CComModule gModule
 
CAtlWinModule gWinModule
 

Function Documentation

◆ wWinMain()

INT WINAPI wWinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPWSTR  lpCmdLine,
INT  nShowCmd 
)

Definition at line 29 of file winmain.cpp.

30{
31 Gdiplus::GdiplusStartupInput gdiplusStartupInput;
32 ULONG_PTR gdiplusToken;
33
34 gModule.Init(ObjectMap, hInstance, NULL);
35 Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
36
38 {
40 }
41
43
44 BOOL bIsFirstLaunch = !LoadSettings(&SettingsInfo);
45 if (bIsFirstLaunch)
46 {
48 }
49
50 InitLogs();
52
53 // parse cmd-line and perform the corresponding operation
55
56 Gdiplus::GdiplusShutdown(gdiplusToken);
57 gModule.Term();
58
59 return bSuccess ? 0 : 1;
60}
void LoadSettings(void)
Definition: settings.c:53
VOID InitLogs()
Definition: misc.cpp:180
VOID FillDefaultSettings(PSETTINGS_INFO pSettingsInfo)
Definition: settings.cpp:179
HINSTANCE hInstance
Definition: charmap.c:19
void Term()
Definition: atlbase.h:916
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE, const GUID *plibid)
Definition: atlbase.h:886
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
#define NULL
Definition: types.h:112
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2013
static BOOLEAN bSuccess
Definition: drive.cpp:433
unsigned int BOOL
Definition: ntddk_ex.h:94
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:816
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_HEBREW
Definition: nls.h:67
#define SUBLANG_DEFAULT
Definition: nls.h:168
uint32_t ULONG_PTR
Definition: typedefs.h:65
BOOL ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
Definition: unattended.cpp:221
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1719
#define LAYOUT_RTL
Definition: wingdi.h:1371
HINSTANCE hInst
Definition: winmain.cpp:19
CComModule gModule
Definition: winmain.cpp:25
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:20
#define SW_SHOWNORMAL
Definition: winuser.h:770

Variable Documentation

◆ gModule

CComModule gModule

Definition at line 25 of file winmain.cpp.

Referenced by wWinMain().

◆ gWinModule

CAtlWinModule gWinModule

Definition at line 26 of file winmain.cpp.

◆ hInst

HINSTANCE hInst

Definition at line 19 of file winmain.cpp.

Referenced by wWinMain().

◆ hMainWnd

HWND hMainWnd

Definition at line 18 of file winmain.cpp.

◆ SettingsInfo

◆ szWindowClass

LPCWSTR szWindowClass = L"ROSAPPMGR2"

Definition at line 16 of file winmain.cpp.