ReactOS 0.4.17-dev-573-g8315b8c
userinit.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winreg.h>
#include <regstr.h>
#include <winnls.h>
#include <winuser.h>
#include <undocuser.h>
#include <strsafe.h>
#include <ndk/exfuncs.h>
#include <wine/debug.h>
#include "resource.h"
Include dependency graph for userinit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IMGINFO
 
struct  STATE
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 

Typedefs

typedef struct _IMGINFO IMGINFO
 
typedef struct _IMGINFOPIMGINFO
 
typedef struct STATEPSTATE
 

Enumerations

enum  PAGESTATE { LOCALEPAGE , STARTPAGE , DONE }
 
enum  RUN { SHELL , INSTALLER , REBOOT }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (userinit)
 
BOOL IsMiniNT (VOID)
 Check whether we are running in MiniNT mode (e.g. live medium).
 
VOID RunLiveCD (PSTATE State)
 

Variables

HINSTANCE hInstance
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 12 of file userinit.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 13 of file userinit.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 11 of file userinit.h.

Typedef Documentation

◆ IMGINFO

◆ PIMGINFO

◆ PSTATE

typedef struct STATE * PSTATE

Enumeration Type Documentation

◆ PAGESTATE

Enumerator
LOCALEPAGE 
STARTPAGE 
DONE 

Definition at line 33 of file userinit.h.

34{
37 DONE
38} PAGESTATE;
PAGESTATE
Definition: userinit.h:34
@ LOCALEPAGE
Definition: userinit.h:35
@ DONE
Definition: userinit.h:37
@ STARTPAGE
Definition: userinit.h:36

◆ RUN

Enumerator
SHELL 
INSTALLER 
REBOOT 

Definition at line 40 of file userinit.h.

41{
42 SHELL,
44 REBOOT
45} RUN;
RUN
Definition: userinit.h:41
@ REBOOT
Definition: userinit.h:44
@ INSTALLER
Definition: userinit.h:43
@ SHELL
Definition: userinit.h:42

Function Documentation

◆ IsMiniNT()

BOOL IsMiniNT ( VOID  )

Check whether we are running in MiniNT mode (e.g. live medium).

Definition at line 110 of file livecd.c.

111{
112 HKEY hKey;
113 LONG rc;
114
115 /* Check for the presence of the "MiniNT" registry key */
117 L"SYSTEM\\CurrentControlSet\\Control\\MiniNT",
118 0,
120 &hKey);
121 if (rc == ERROR_SUCCESS)
123
124 return (rc == ERROR_SUCCESS);
125}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
#define L(x)
Definition: resources.c:13
FxAutoRegKey hKey
#define KEY_QUERY_VALUE
Definition: nt_native.h:1019
long LONG
Definition: pedump.c:60
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

◆ RunLiveCD()

VOID RunLiveCD ( PSTATE  State)

Definition at line 978 of file livecd.c.

980{
981 LIVECD_UNATTEND Unattend = {0};
982 WCHAR UnattendInf[MAX_PATH];
983
984 /* Try to locate the ReactOS Installer */
985 if (!ExpandInstallerPath(L"reactos.exe", Installer, _countof(Installer)))
987 if (*Installer)
988 TRACE("ReactOS Installer: '%S'\n", Installer);
989 else
990 WARN("Could not find the ReactOS Installer\n");
991
992 GetWindowsDirectoryW(UnattendInf, _countof(UnattendInf));
993 wcscat(UnattendInf, L"\\unattend.inf");
994 ParseUnattend(UnattendInf, &Unattend);
995 pState->Unattend = &Unattend;
996
997 InitLogo(&pState->ImageInfo, NULL);
998
999 while (pState->NextPage != DONE)
1000 {
1001 switch (pState->NextPage)
1002 {
1003 case LOCALEPAGE:
1006 NULL,
1008 (LPARAM)pState);
1009 break;
1010
1011 case STARTPAGE:
1014 NULL,
1016 (LPARAM)pState);
1017 break;
1018
1019 default:
1020 break;
1021 }
1022 }
1023
1024 DeleteObject(pState->ImageInfo.hBitmap);
1025}
#define IDD_STARTPAGE
Definition: resource.h:27
#define WARN(fmt,...)
Definition: precomp.h:61
#define IDD_LOCALEPAGE
Definition: resource.h:13
HINSTANCE hInstance
Definition: charmap.c:19
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2271
pKey DeleteObject()
static INT_PTR CALLBACK LocaleDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: livecd.c:583
static BOOL ExpandInstallerPath(_In_ PCWSTR pInstallerName, _Out_writes_z_(PathSize) PWSTR pInstallerPath, _In_ SIZE_T PathSize)
Expands the path for the ReactOS Installer "reactos.exe". See also base/setup/welcome/welcome....
Definition: livecd.c:858
WCHAR Installer[MAX_PATH]
Definition: livecd.c:14
VOID ParseUnattend(LPCWSTR UnattendInf, LIVECD_UNATTEND *pUnattend)
Definition: livecd.c:812
static INT_PTR CALLBACK StartDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: livecd.c:720
static VOID InitLogo(PIMGINFO pImgInfo, HWND hwndDlg)
Definition: livecd.c:27
LONG_PTR LPARAM
Definition: minwindef.h:175
#define UNICODE_NULL
short WCHAR
Definition: pedump.c:58
#define DONE
Definition: rnr20lib.h:14
wcscat
#define _countof(array)
Definition: sndvol32.h:70
#define TRACE(s)
Definition: solgame.cpp:4
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)

Referenced by wWinMain().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( userinit  )

Variable Documentation

◆ hInstance

HINSTANCE hInstance
extern

Definition at line 19 of file charmap.c.