1 /*
2  * syssetup.h
3  *
4  * System setup API, native interface
5  *
6  * This file is part of the ReactOS Operating System.
7  *
8  * Contributors:
9  *  Created by Eric Kohl
10  *
11  *  THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  *  This source code is offered for use in the public domain. You may
14  *  use, modify or distribute it freely.
15  *
16  *  This code is distributed in the hope that it will be useful but
17  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  *  DISCLAMED. This includes but is not limited to warranties of
19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #ifndef __SYSSETUP_H_INCLUDED__
24 #define __SYSSETUP_H_INCLUDED__
25 
26 typedef enum _PRODUCT_OPTION
27 {
28     PRODUCT_OPTION_SERVER,
29     PRODUCT_OPTION_WORKSTATION,
30     PRODUCT_OPTION_DEFAULT = PRODUCT_OPTION_SERVER
31 } PRODUCT_OPTION, *PPRODUCT_OPTION;
32 
33 /* Private Setup data shared between syssetup.dll and netshell.dll */
34 typedef struct _SETUPDATA
35 {
36     HFONT hTitleFont;
37     HFONT hBoldFont;
38 
39     WCHAR SourcePath[MAX_PATH];   // PCWSTR
40     WCHAR UnattendFile[MAX_PATH]; // PCWSTR
41 
42     WCHAR OwnerName[51];
43     WCHAR OwnerOrganization[51];
44     WCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];  /* max. 15 characters */
45     WCHAR AdminPassword[128];                         /* max. 127 characters */
46     BOOL  UnattendSetup;
47     BOOL  DisableGeckoInst;
48 
49     SYSTEMTIME SystemTime;
50     struct _TIMEZONE_ENTRY* TimeZoneListHead;
51     struct _TIMEZONE_ENTRY* TimeZoneListTail;
52     DWORD TimeZoneIndex;
53     DWORD DisableAutoDaylightTimeSet;
54     LCID LocaleID;
55 
56     HINF hSetupInf;
57 
58     UINT uFirstNetworkWizardPage;
59     UINT uPostNetworkWizardPage;
60 
61     PRODUCT_OPTION ProductOption;
62 } SETUPDATA, *PSETUPDATA;
63 
64 
65 /* System setup APIs */
66 
67 NTSTATUS
68 WINAPI
69 SetAccountsDomainSid(
70     PSID DomainSid,
71     LPCWSTR DomainName);
72 
73 /* Log File APIs */
74 
75 BOOL WINAPI
76 InitializeSetupActionLog(IN BOOL bDeleteOldLogFile);
77 
78 VOID WINAPI
79 TerminateSetupActionLog(VOID);
80 
81 VOID
82 CDECL
83 pSetupDebugPrint(
84     IN PCWSTR pszFileName,
85     IN INT nLineNumber,
86     IN PCWSTR pszTag,
87     IN PCWSTR pszMessage,
88     ...);
89 
90 #define __WFILE__ TOWL1(__FILE__)
91 #define TOWL1(p) TOWL2(p)
92 #define TOWL2(p) L##p
93 
94 #if defined(_MSC_VER)
95 #define LogItem(lpTag, lpMessageText, ...) \
96     pSetupDebugPrint(__WFILE__, __LINE__, lpTag, lpMessageText, __VA_ARGS__)
97 #else
98 #define LogItem(lpTag, lpMessageText...) \
99     pSetupDebugPrint(__WFILE__, __LINE__, lpTag, lpMessageText)
100 #endif
101 
102 #endif /* __SYSSETUP_H_INCLUDED__ */
103 
104 /* EOF */
105