ReactOS  0.4.15-dev-1399-g0db79d4
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.

Classes

class  CRAppsModule
 

Functions

static VOID InitializeAtlModule (HINSTANCE hInstance, BOOL bInitialize)
 
VOID InitializeGDIPlus (BOOL bInitialize)
 
INT WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nShowCmd)
 

Variables

LPCWSTR szWindowClass = L"ROSAPPMGR"
 
HWND hMainWnd
 
HINSTANCE hInst
 
SETTINGS_INFO SettingsInfo
 
CRAppsModule gModule
 
CAtlWinModule gWinModule
 
Gdiplus::GdiplusStartupInput gdiplusStartupInput
 
ULONG_PTR gdiplusToken
 

Function Documentation

◆ InitializeAtlModule()

static VOID InitializeAtlModule ( HINSTANCE  hInstance,
BOOL  bInitialize 
)
static

Definition at line 37 of file winmain.cpp.

38 {
39  if (bInitialize)
40  {
41  gModule.Init(ObjectMap, hInstance, NULL);
42  }
43  else
44  {
45  gModule.Term();
46  }
47 }
void Term()
Definition: atlbase.h:820
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE, const GUID *plibid)
Definition: atlbase.h:797
HINSTANCE hInstance
Definition: charmap.c:20
#define NULL
Definition: types.h:112
CRAppsModule gModule
Definition: winmain.cpp:30

Referenced by wWinMain().

◆ InitializeGDIPlus()

VOID InitializeGDIPlus ( BOOL  bInitialize)

Definition at line 49 of file winmain.cpp.

50 {
51  if (bInitialize)
52  {
54  }
55  else
56  {
58  }
59 }
void WINAPI GdiplusShutdown(ULONG_PTR)
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
Definition: gdiplus.c:81
Gdiplus::GdiplusStartupInput gdiplusStartupInput
Definition: winmain.cpp:33
ULONG_PTR gdiplusToken
Definition: winmain.cpp:34
#define NULL
Definition: types.h:112

Referenced by wWinMain().

◆ wWinMain()

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

Definition at line 61 of file winmain.cpp.

62 {
63  BOOL bIsFirstLaunch;
64 
67 
69  {
71  }
72 
73  hInst = hInstance;
74 
75  bIsFirstLaunch = !LoadSettings(&SettingsInfo);
76  if (bIsFirstLaunch)
77  {
79  }
80 
81  InitLogs();
83 
84  // parse cmd-line and perform the corresponding operation
86 
89 
90  return bSuccess ? 0 : 1;
91 }
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:806
static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize)
Definition: winmain.cpp:37
#define LAYOUT_RTL
Definition: wingdi.h:1370
#define TRUE
Definition: types.h:120
VOID FillDefaultSettings(PSETTINGS_INFO pSettingsInfo)
Definition: settings.cpp:167
#define SUBLANG_DEFAULT
Definition: nls.h:168
HINSTANCE hInst
Definition: winmain.cpp:19
#define LANG_HEBREW
Definition: nls.h:67
static BOOLEAN bSuccess
Definition: drive.cpp:419
HINSTANCE hInstance
Definition: charmap.c:20
VOID InitLogs()
Definition: misc.cpp:195
void LoadSettings(void)
Definition: settings.c:53
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2015
VOID InitializeGDIPlus(BOOL bInitialize)
Definition: winmain.cpp:49
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1720
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define GetModuleHandle
Definition: winbase.h:3667
#define NULL
Definition: types.h:112
BOOL ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
Definition: unattended.cpp:238
#define MAKELANGID(p, s)
Definition: nls.h:15
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:20

Variable Documentation

◆ gdiplusStartupInput

Gdiplus::GdiplusStartupInput gdiplusStartupInput

◆ gdiplusToken

ULONG_PTR gdiplusToken

Definition at line 34 of file winmain.cpp.

Referenced by ImageView_CreateWindow(), InitializeGDIPlus(), START_TEST(), and test_startup().

◆ gModule

CRAppsModule gModule

Definition at line 30 of file winmain.cpp.

Referenced by InitializeAtlModule().

◆ gWinModule

CAtlWinModule gWinModule

Definition at line 31 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"ROSAPPMGR"

Definition at line 16 of file winmain.cpp.