ReactOS 0.4.15-dev-8241-g63935f8
reactos.h
Go to the documentation of this file.
1/*
2 * ReactOS applications
3 * Copyright (C) 2004-2008 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19/*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS GUI first stage setup application
22 * FILE: base/setup/reactos/reactos.c
23 * PROGRAMMERS: Matthias Kupfer
24 * Dmitry Chapyshev (dmitry@reactos.org)
25 */
26
27#ifndef _REACTOS_PCH_
28#define _REACTOS_PCH_
29
30/* C Headers */
31#include <stdlib.h>
32#include <stdarg.h>
33#include <tchar.h>
34
35/* PSDK/NDK */
36#define WIN32_NO_STATUS
37#include <windef.h>
38#include <winbase.h>
39#include <winreg.h>
40#include <wingdi.h>
41#include <winuser.h>
42
43#include <strsafe.h>
44
45#include <commctrl.h>
46#include <windowsx.h>
47
48/* These are public names and values determined from MFC, and compatible with Windows */
49// Property Sheet control id's (determined with Spy++)
50#define IDC_TAB_CONTROL 0x3020
51#define ID_APPLY_NOW 0x3021
52#define ID_WIZBACK 0x3023
53#define ID_WIZNEXT 0x3024
54#define ID_WIZFINISH 0x3025
55
56
57#include "treelist.h"
58
59#include <setupapi.h>
60#include <devguid.h>
61
62#define NTOS_MODE_USER
63#include <ndk/cmtypes.h> // For CM_DISK stuff
64#include <ndk/iofuncs.h> // For NtCreate/OpenFile
65#include <ndk/rtlfuncs.h>
66
67
68/* Setup library headers */
69// #include <reactos/rosioctl.h>
70#include <../lib/setuplib.h>
71
72#if 0
73typedef struct _KBLAYOUT
74{
75 TCHAR LayoutId[9];
76 TCHAR LayoutName[128];
77 TCHAR DllName[128];
78} KBLAYOUT, *PKBLAYOUT;
79#endif
80
81
82/*
83 * A mapping entry that maps an NT path to a corresponding Win32 path.
84 *
85 * Example is:
86 * NT path: "\Device\Harddisk0\Partition1\some\path1"
87 * Win32 path: "C:\some\path1"
88 *
89 * Here, the NT path prefix to be cached is only
90 * "\Device\Harddisk0\Partition1\", to be mapped with "C:\".
91 *
92 * Then the same entry would be reused if one wants to convert
93 * the NT path "\Device\Harddisk0\Partition1\another\path2",
94 * which converts to the Win32 path "C:\another\path2" .
95 */
97{
99 WCHAR NtPath[MAX_PATH]; // MAX_PATH for both entries should be more than enough.
102
103/* The list of NT to Win32 path prefix mappings */
105{
109
110
111typedef struct _SETUPDATA
112{
113 /* General */
116
118
122
125
127
129
130 BOOLEAN RepairUpdateFlag; // flag for update/repair an installed reactos
131
135
136
137 /* Settings */
138 LONG DestPartSize; // if partition doesn't exist, size of partition
139
140 /* txtsetup.sif data */
141 // LONG DefaultLang; // default language (table index)
142 // LONG DefaultKBLayout; // default keyboard layout (table index)
144 WCHAR DefaultLanguage[20]; // Copy of string inside LanguageList
145 WCHAR DefaultKBLayout[20]; // Copy of string inside KeyboardList
146
148
149extern HANDLE ProcessHeap;
151
152extern SETUPDATA SetupData;
153
154
155/*
156 * Attempts to convert a pure NT file path into a corresponding Win32 path.
157 * Adapted from GetInstallSourceWin32() in dll/win32/syssetup/wizard.c
158 */
159BOOL
162 OUT PWSTR pwszPath,
163 IN DWORD cchPathMax,
164 IN PCWSTR pwszNTPath);
165
166
167/* drivepage.c */
168
169BOOL
172 IN HWND hWndListView,
173 IN const UINT* pIDs,
174 IN const INT* pColsWidth,
175 IN const INT* pColsAlign,
176 IN UINT nNumOfColumns);
177
181 HWND hwndDlg,
182 UINT uMsg,
184 LPARAM lParam);
185
186#endif /* _REACTOS_PCH_ */
187
188/* EOP */
unsigned char BOOLEAN
struct _NT_WIN32_PATH_MAPPING_LIST NT_WIN32_PATH_MAPPING_LIST
struct _NT_WIN32_PATH_MAPPING NT_WIN32_PATH_MAPPING
struct _NT_WIN32_PATH_MAPPING_LIST * PNT_WIN32_PATH_MAPPING_LIST
BOOL ConvertNtPathToWin32Path(IN OUT PNT_WIN32_PATH_MAPPING_LIST MappingList, OUT PWSTR pwszPath, IN DWORD cchPathMax, IN PCWSTR pwszNTPath)
Definition: reactos.c:1523
HANDLE ProcessHeap
Definition: servman.c:15
INT_PTR CALLBACK DriveDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: drivepage.c:613
struct _SETUPDATA SETUPDATA
BOOL CreateListViewColumns(IN HINSTANCE hInstance, IN HWND hWndListView, IN const UINT *pIDs, IN const INT *pColsWidth, IN const INT *pColsAlign, IN UINT nNumOfColumns)
Definition: reactos.c:297
BOOLEAN IsUnattendedSetup
Definition: reactos.c:41
struct _NT_WIN32_PATH_MAPPING * PNT_WIN32_PATH_MAPPING
struct _SETUPDATA * PSETUPDATA
SETUPDATA SetupData
Definition: reactos.c:42
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static SIZE_T const char const D3D_SHADER_MACRO ID3DInclude * include
Definition: asm.c:31
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
Definition: typedefs.h:120
WCHAR NtPath[MAX_PATH]
Definition: reactos.h:99
WCHAR Win32Path[MAX_PATH]
Definition: reactos.h:100
LIST_ENTRY ListEntry
Definition: reactos.h:98
USETUP_DATA USetupData
Definition: reactos.h:128
HINSTANCE hInstance
Definition: reactos.h:114
PCWSTR SelectedLanguageId
Definition: reactos.h:143
HFONT hTitleFont
Definition: reactos.h:117
BOOL bStopInstall
Definition: reactos.h:121
WCHAR DefaultKBLayout[20]
Definition: reactos.h:145
HANDLE hInstallThread
Definition: reactos.h:119
PNTOS_INSTALLATION CurrentInstallation
Definition: reactos.h:133
TCHAR szAbortMessage[512]
Definition: reactos.h:123
PPARTLIST PartitionList
Definition: reactos.h:132
LONG DestPartSize
Definition: reactos.h:138
HANDLE hHaltInstallEvent
Definition: reactos.h:120
WCHAR DefaultLanguage[20]
Definition: reactos.h:144
PGENERIC_LIST NtOsInstallsList
Definition: reactos.h:134
NT_WIN32_PATH_MAPPING_LIST MappingList
Definition: reactos.h:126
BOOLEAN RepairUpdateFlag
Definition: reactos.h:130
BOOL bUnattend
Definition: reactos.h:115
TCHAR szAbortTitle[64]
Definition: reactos.h:124
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
char TCHAR
Definition: xmlstorage.h:189
__wchar_t WCHAR
Definition: xmlstorage.h:180