ReactOS 0.4.15-dev-5895-g2687c1b
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 LONG FSType; // file system type on partition
140 LONG FormatPart; // type of format the partition
141
142 LONG SelectedLangId; // selected language (table index)
143
144 /* txtsetup.sif data */
145 // LONG DefaultLang; // default language (table index)
146 // LONG DefaultKBLayout; // default keyboard layout (table index)
148 WCHAR DefaultLanguage[20]; // Copy of string inside LanguageList
149 WCHAR DefaultKBLayout[20]; // Copy of string inside KeyboardList
150
152
153extern HANDLE ProcessHeap;
155
156extern SETUPDATA SetupData;
157
158
159/*
160 * Attempts to convert a pure NT file path into a corresponding Win32 path.
161 * Adapted from GetInstallSourceWin32() in dll/win32/syssetup/wizard.c
162 */
163BOOL
166 OUT PWSTR pwszPath,
167 IN DWORD cchPathMax,
168 IN PCWSTR pwszNTPath);
169
170
171/* drivepage.c */
172
173BOOL
176 IN HWND hWndListView,
177 IN const UINT* pIDs,
178 IN const INT* pColsWidth,
179 IN const INT* pColsAlign,
180 IN UINT nNumOfColumns);
181
185 HWND hwndDlg,
186 UINT uMsg,
188 LPARAM lParam);
189
190#endif /* _REACTOS_PCH_ */
191
192/* 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:1498
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:296
BOOLEAN IsUnattendedSetup
Definition: reactos.c:40
struct _NT_WIN32_PATH_MAPPING * PNT_WIN32_PATH_MAPPING
struct _SETUPDATA * PSETUPDATA
SETUPDATA SetupData
Definition: reactos.c:41
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
LONG FormatPart
Definition: reactos.h:140
PCWSTR SelectedLanguageId
Definition: reactos.h:147
HFONT hTitleFont
Definition: reactos.h:117
LONG FSType
Definition: reactos.h:139
BOOL bStopInstall
Definition: reactos.h:121
LONG SelectedLangId
Definition: reactos.h:142
WCHAR DefaultKBLayout[20]
Definition: reactos.h:149
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:148
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