1 | /**
|
---|
2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
3 | * This file is part of the mingw-w64 runtime package.
|
---|
4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
5 | */
|
---|
6 | #ifndef _ADVPUB_H_
|
---|
7 | #define _ADVPUB_H_
|
---|
8 |
|
---|
9 | #ifdef __cplusplus
|
---|
10 | extern "C" {
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | #ifndef S_ASYNCHRONOUS
|
---|
14 | #define S_ASYNCHRONOUS _HRESULT_TYPEDEF_(0x401e8)
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #define achRUNSETUPCOMMANDFUNCTION "RunSetupCommand"
|
---|
18 |
|
---|
19 | HRESULT WINAPI RunSetupCommand(HWND hWnd,LPCSTR szCmdName,LPCSTR szInfSection,LPCSTR szDir,LPCSTR lpszTitle,HANDLE *phEXE,DWORD dwFlags,LPVOID pvReserved);
|
---|
20 |
|
---|
21 | typedef HRESULT (WINAPI *RUNSETUPCOMMAND)(HWND hWnd,LPCSTR szCmdName,LPCSTR szInfSection,LPCSTR szDir,LPCSTR szTitle,HANDLE *phEXE,DWORD dwFlags,LPVOID pvReserved);
|
---|
22 |
|
---|
23 | #define RSC_FLAG_INF 1
|
---|
24 | #define RSC_FLAG_SKIPDISKSPACECHECK 2
|
---|
25 | #define RSC_FLAG_QUIET 4
|
---|
26 | #define RSC_FLAG_NGCONV 8
|
---|
27 | #define RSC_FLAG_UPDHLPDLLS 16
|
---|
28 | #define RSC_FLAG_DELAYREGISTEROCX 512
|
---|
29 | #define RSC_FLAG_SETUPAPI 1024
|
---|
30 |
|
---|
31 | #define achNEEDREBOOTINITFUNCTION "NeedRebootInit"
|
---|
32 |
|
---|
33 | DWORD WINAPI NeedRebootInit(VOID);
|
---|
34 |
|
---|
35 | typedef DWORD (WINAPI *NEEDREBOOTINIT)(VOID);
|
---|
36 |
|
---|
37 | #define achNEEDREBOOTFUNCTION "NeedReboot"
|
---|
38 |
|
---|
39 | WINBOOL WINAPI NeedReboot(DWORD dwRebootCheck);
|
---|
40 |
|
---|
41 | typedef WINBOOL (WINAPI *NEEDREBOOT)(DWORD dwRebootCheck);
|
---|
42 |
|
---|
43 | #define achPRECHECKREBOOT "RebootCheckOnInstall"
|
---|
44 |
|
---|
45 | HRESULT WINAPI RebootCheckOnInstall(HWND hwnd,PCSTR pszINF,PCSTR pszSec,DWORD dwReserved);
|
---|
46 |
|
---|
47 | typedef HRESULT (WINAPI *REBOOTCHECKONINSTALL)(HWND,PCSTR,PCSTR,DWORD);
|
---|
48 |
|
---|
49 | #define c_szTRANSLATEINFSTRING "TranslateInfString"
|
---|
50 |
|
---|
51 | HRESULT WINAPI TranslateInfString(PCSTR pszInfFilename,PCSTR pszInstallSection,PCSTR pszTranslateSection,PCSTR pszTranslateKey,PSTR pszBuffer,DWORD dwBufferSize,PDWORD pdwRequiredSize,PVOID pvReserved);
|
---|
52 |
|
---|
53 | typedef HRESULT (WINAPI *TRANSLATEINFSTRING)(PCSTR pszInfFilename,PCSTR pszInstallSection,PCSTR pszTranslateSection,PCSTR pszTranslateKey,PSTR pszBuffer,DWORD dwBufferSize,PDWORD pdwRequiredSize,PVOID pvReserved);
|
---|
54 |
|
---|
55 | #define achREGINSTALL "RegInstall"
|
---|
56 |
|
---|
57 | typedef struct _StrEntry {
|
---|
58 | LPSTR pszName;
|
---|
59 | LPSTR pszValue;
|
---|
60 | } STRENTRY,*LPSTRENTRY;
|
---|
61 |
|
---|
62 | typedef const STRENTRY CSTRENTRY;
|
---|
63 | typedef CSTRENTRY *LPCSTRENTRY;
|
---|
64 |
|
---|
65 | typedef struct _StrTable {
|
---|
66 | DWORD cEntries;
|
---|
67 | LPSTRENTRY pse;
|
---|
68 | } STRTABLE,*LPSTRTABLE;
|
---|
69 |
|
---|
70 | typedef const STRTABLE CSTRTABLE;
|
---|
71 | typedef CSTRTABLE *LPCSTRTABLE;
|
---|
72 |
|
---|
73 | HRESULT WINAPI RegInstall(HMODULE hm,LPCSTR pszSection,LPCSTRTABLE pstTable);
|
---|
74 |
|
---|
75 | typedef HRESULT (WINAPI *REGINSTALL)(HMODULE hm,LPCSTR pszSection,LPCSTRTABLE pstTable);
|
---|
76 |
|
---|
77 | #define achLAUNCHINFSECTIONEX "LaunchINFSectionEx"
|
---|
78 |
|
---|
79 | HRESULT WINAPI LaunchINFSectionEx(HWND hwnd,HINSTANCE hInstance,PSTR pszParms,INT nShow);
|
---|
80 |
|
---|
81 | typedef HRESULT (WINAPI *LAUNCHINFSECTIONEX)(HWND hwnd,HINSTANCE hInst,PSTR pszParams,INT nShow);
|
---|
82 |
|
---|
83 | #define ALINF_QUIET 4
|
---|
84 | #define ALINF_NGCONV 8
|
---|
85 | #define ALINF_UPDHLPDLLS 16
|
---|
86 | #define ALINF_BKINSTALL 32
|
---|
87 | #define ALINF_ROLLBACK 64
|
---|
88 | #define ALINF_CHECKBKDATA 128
|
---|
89 | #define ALINF_ROLLBKDOALL 256
|
---|
90 | #define ALINF_DELAYREGISTEROCX 512
|
---|
91 |
|
---|
92 | #define achEXECUTECAB "ExecuteCab"
|
---|
93 |
|
---|
94 | typedef struct _CabInfo {
|
---|
95 | PSTR pszCab;
|
---|
96 | PSTR pszInf;
|
---|
97 | PSTR pszSection;
|
---|
98 | char szSrcPath[MAX_PATH];
|
---|
99 | DWORD dwFlags;
|
---|
100 | } CABINFO,*PCABINFO;
|
---|
101 |
|
---|
102 | HRESULT WINAPI ExecuteCab(HWND hwnd,PCABINFO pCab,LPVOID pReserved);
|
---|
103 |
|
---|
104 | typedef HRESULT (WINAPI *EXECUTECAB)(HWND hwnd,PCABINFO pCab,LPVOID pReserved);
|
---|
105 |
|
---|
106 | #define AIF_WARNIFSKIP 0x00000001
|
---|
107 | #define AIF_NOSKIP 0x00000002
|
---|
108 | #define AIF_NOVERSIONCHECK 0x00000004
|
---|
109 | #define AIF_FORCE_FILE_IN_USE 0x00000008
|
---|
110 | #define AIF_NOOVERWRITE 0x00000010
|
---|
111 |
|
---|
112 | #define AIF_NO_VERSION_DIALOG 0x00000020
|
---|
113 | #define AIF_REPLACEONLY 0x00000400
|
---|
114 |
|
---|
115 | #define AIF_NOLANGUAGECHECK 0x10000000
|
---|
116 |
|
---|
117 | #define AIF_QUIET 0x20000000
|
---|
118 |
|
---|
119 | #define achADVINSTALLFILE "AdvInstallFile"
|
---|
120 |
|
---|
121 | HRESULT WINAPI AdvInstallFile(HWND hwnd,LPCSTR lpszSourceDir,LPCSTR lpszSourceFile,LPCSTR lpszDestDir,LPCSTR lpszDestFile,DWORD dwFlags,DWORD dwReserved);
|
---|
122 |
|
---|
123 | typedef HRESULT (WINAPI *ADVINSTALLFILE)(HWND hwnd,LPCSTR lpszSourceDir,LPCSTR lpszSourceFile,LPCSTR lpszDestDir,LPCSTR lpszDestFile,DWORD dwFlags,DWORD dwReserved);
|
---|
124 |
|
---|
125 | #define IE4_RESTORE 0x00000001
|
---|
126 | #define IE4_BACKNEW 0x00000002
|
---|
127 | #define IE4_NODELETENEW 0x00000004
|
---|
128 | #define IE4_NOMESSAGES 0x00000008
|
---|
129 | #define IE4_NOPROGRESS 0x00000010
|
---|
130 | #define IE4_NOENUMKEY 0x00000020
|
---|
131 | #define IE4_NO_CRC_MAPPING 0x00000040
|
---|
132 |
|
---|
133 | #define IE4_REGSECTION 0x00000080
|
---|
134 | #define IE4_FRDOALL 0x00000100
|
---|
135 | #define IE4_UPDREFCNT 0x00000200
|
---|
136 | #define IE4_USEREFCNT 0x00000400
|
---|
137 | #define IE4_EXTRAINCREFCNT 0x00000800
|
---|
138 |
|
---|
139 | #define IE4_REMOVREGBKDATA 0x00001000
|
---|
140 |
|
---|
141 | HRESULT WINAPI RegSaveRestore(HWND hWnd,PCSTR pszTitleString,HKEY hkBckupKey,PCSTR pcszRootKey,PCSTR pcszSubKey,PCSTR pcszValueName,DWORD dwFlags);
|
---|
142 |
|
---|
143 | typedef HRESULT (WINAPI *REGSAVERESTORE)(HWND hWnd,PCSTR pszTitleString,HKEY hkBckupKey,PCSTR pcszRootKey,PCSTR pcszSubKey,PCSTR pcszValueName,DWORD dwFlags);
|
---|
144 |
|
---|
145 | HRESULT WINAPI RegSaveRestoreOnINF(HWND hWnd,PCSTR pszTitle,PCSTR pszINF,PCSTR pszSection,HKEY hHKLMBackKey,HKEY hHKCUBackKey,DWORD dwFlags);
|
---|
146 |
|
---|
147 | typedef HRESULT (WINAPI *REGSAVERESTOREONINF)(HWND hWnd,PCSTR pszTitle,PCSTR pszINF,PCSTR pszSection,HKEY hHKLMBackKey,HKEY hHKCUBackKey,DWORD dwFlags);
|
---|
148 |
|
---|
149 | #define ARSR_RESTORE IE4_RESTORE
|
---|
150 | #define ARSR_NOMESSAGES IE4_NOMESSAGES
|
---|
151 | #define ARSR_REGSECTION IE4_REGSECTION
|
---|
152 | #define ARSR_REMOVREGBKDATA IE4_REMOVREGBKDATA
|
---|
153 |
|
---|
154 | #define REG_SAVE_LOG_KEY "RegSaveLogFile"
|
---|
155 | #define REG_RESTORE_LOG_KEY "RegRestoreLogFile"
|
---|
156 |
|
---|
157 | HRESULT WINAPI RegRestoreAll(HWND hWnd,PSTR pszTitleString,HKEY hkBckupKey);
|
---|
158 | typedef HRESULT (WINAPI *REGRESTOREALL)(HWND hWnd,PSTR pszTitleString,HKEY hkBckupKey);
|
---|
159 |
|
---|
160 | HRESULT WINAPI FileSaveRestore(HWND hDlg,LPSTR lpFileList,LPSTR lpDir,LPSTR lpBaseName,DWORD dwFlags);
|
---|
161 |
|
---|
162 | typedef HRESULT (WINAPI *FILESAVERESTORE)(HWND hDlg,LPSTR lpFileList,LPSTR lpDir,LPSTR lpBaseName,DWORD dwFlags);
|
---|
163 |
|
---|
164 | HRESULT WINAPI FileSaveRestoreOnINF(HWND hWnd,PCSTR pszTitle,PCSTR pszINF,PCSTR pszSection,PCSTR pszBackupDir,PCSTR pszBaseBackupFile,DWORD dwFlags);
|
---|
165 |
|
---|
166 | typedef HRESULT (WINAPI *FILESAVERESTOREONINF)(HWND hDlg,PCSTR pszTitle,PCSTR pszINF,PCSTR pszSection,PCSTR pszBackupDir,PCSTR pszBaseBackFile,DWORD dwFlags);
|
---|
167 |
|
---|
168 | #define AFSR_RESTORE IE4_RESTORE
|
---|
169 | #define AFSR_BACKNEW IE4_BACKNEW
|
---|
170 | #define AFSR_NODELETENEW IE4_NODELETENEW
|
---|
171 | #define AFSR_NOMESSAGES IE4_NOMESSAGES
|
---|
172 | #define AFSR_NOPROGRESS IE4_NOPROGRESS
|
---|
173 | #define AFSR_UPDREFCNT IE4_UPDREFCNT
|
---|
174 | #define AFSR_USEREFCNT IE4_USEREFCNT
|
---|
175 | #define AFSR_EXTRAINCREFCNT IE4_EXTRAINCREFCNT
|
---|
176 |
|
---|
177 | HRESULT WINAPI AddDelBackupEntry(LPCSTR lpcszFileList,LPCSTR lpcszBackupDir,LPCSTR lpcszBaseName,DWORD dwFlags);
|
---|
178 |
|
---|
179 | typedef HRESULT (WINAPI *ADDDELBACKUPENTRY)(LPCSTR lpcszFileList,LPCSTR lpcszBackupDir,LPCSTR lpcszBaseName,DWORD dwFlags);
|
---|
180 |
|
---|
181 | #define AADBE_ADD_ENTRY 0x01
|
---|
182 | #define AADBE_DEL_ENTRY 0x02
|
---|
183 |
|
---|
184 | HRESULT WINAPI FileSaveMarkNotExist(LPSTR lpFileList,LPSTR lpDir,LPSTR lpBaseName);
|
---|
185 |
|
---|
186 | typedef HRESULT (WINAPI *FILESAVEMARKNOTEXIST)(LPSTR lpFileList,LPSTR lpDir,LPSTR lpBaseName);
|
---|
187 |
|
---|
188 | HRESULT WINAPI GetVersionFromFile(LPSTR lpszFilename,LPDWORD pdwMSVer,LPDWORD pdwLSVer,WINBOOL bVersion);
|
---|
189 |
|
---|
190 | typedef HRESULT (WINAPI *GETVERSIONFROMFILE)(LPSTR lpszFilename,LPDWORD pdwMSVer,LPDWORD pdwLSVer,WINBOOL bVersion);
|
---|
191 |
|
---|
192 | HRESULT WINAPI GetVersionFromFileEx(LPSTR lpszFilename,LPDWORD pdwMSVer,LPDWORD pdwLSVer,WINBOOL bVersion);
|
---|
193 |
|
---|
194 | typedef HRESULT (WINAPI *GETVERSIONFROMFILE)(LPSTR lpszFilename,LPDWORD pdwMSVer,LPDWORD pdwLSVer,WINBOOL bVersion);
|
---|
195 |
|
---|
196 | #define achISNTADMIN "IsNTAdmin"
|
---|
197 |
|
---|
198 | WINBOOL WINAPI IsNTAdmin(DWORD dwReserved,DWORD *lpdwReserved);
|
---|
199 |
|
---|
200 | typedef WINBOOL (WINAPI *ISNTADMIN)(DWORD,DWORD *);
|
---|
201 |
|
---|
202 | #define ADN_DEL_IF_EMPTY 0x00000001
|
---|
203 | #define ADN_DONT_DEL_SUBDIRS 0x00000002
|
---|
204 | #define ADN_DONT_DEL_DIR 0x00000004
|
---|
205 | #define ADN_DEL_UNC_PATHS 0x00000008
|
---|
206 |
|
---|
207 | #define achDELNODE "DelNode"
|
---|
208 |
|
---|
209 | HRESULT WINAPI DelNode(LPCSTR pszFileOrDirName,DWORD dwFlags);
|
---|
210 |
|
---|
211 | typedef HRESULT (WINAPI *DELNODE)(LPCSTR pszFileOrDirName,DWORD dwFlags);
|
---|
212 |
|
---|
213 | #define achDELNODERUNDLL32 "DelNodeRunDLL32"
|
---|
214 |
|
---|
215 | HRESULT WINAPI DelNodeRunDLL32(HWND hwnd,HINSTANCE hInstance,PSTR pszParms,INT nShow);
|
---|
216 |
|
---|
217 | typedef HRESULT (WINAPI *DELNODERUNDLL32)(HWND hwnd,HINSTANCE hInst,PSTR pszParams,INT nShow);
|
---|
218 | typedef PVOID HINF;
|
---|
219 |
|
---|
220 | HRESULT WINAPI OpenINFEngine(PCSTR pszInfFilename,PCSTR pszInstallSection,DWORD dwFlags,HINF *phInf,PVOID pvReserved);
|
---|
221 | HRESULT WINAPI TranslateInfStringEx(HINF hInf,PCSTR pszInfFilename,PCSTR pszTranslateSection,PCSTR pszTranslateKey,PSTR pszBuffer,DWORD dwBufferSize,PDWORD pdwRequiredSize,PVOID pvReserved);
|
---|
222 | HRESULT WINAPI CloseINFEngine(HINF hInf);
|
---|
223 | HRESULT WINAPI ExtractFiles(LPCSTR pszCabName,LPCSTR pszExpandDir,DWORD dwFlags,LPCSTR pszFileList,LPVOID lpReserved,DWORD dwReserved);
|
---|
224 | INT WINAPI LaunchINFSection(HWND,HINSTANCE,PSTR,INT);
|
---|
225 |
|
---|
226 | #define LIS_QUIET 0x0001
|
---|
227 | #define LIS_NOGRPCONV 0x0002
|
---|
228 |
|
---|
229 | #define RUNCMDS_QUIET 0x00000001
|
---|
230 | #define RUNCMDS_NOWAIT 0x00000002
|
---|
231 | #define RUNCMDS_DELAYPOSTCMD 0x00000004
|
---|
232 |
|
---|
233 | #define awchMSIE4GUID L"{89820200-ECBD-11cf-8B85-00AA005B4383}"
|
---|
234 | #define achUserInstStubWrapper "UserInstStubWrapper"
|
---|
235 | #define achUserUnInstStubWrapper "UserUnInstStubWrapper"
|
---|
236 |
|
---|
237 | typedef HRESULT (WINAPI *USERINSTSTUBWRAPPER)(HWND hwnd,HINSTANCE hInst,PSTR pszParams,INT nShow);
|
---|
238 | typedef HRESULT (WINAPI *USERUNINSTSTUBWRAPPER)(HWND hwnd,HINSTANCE hInst,PSTR pszParams,INT nShow);
|
---|
239 |
|
---|
240 | HRESULT WINAPI UserInstStubWrapper(HWND hwnd,HINSTANCE hInstance,PSTR pszParms,INT nShow);
|
---|
241 | HRESULT WINAPI UserUnInstStubWrapper(HWND hwnd,HINSTANCE hInstance,PSTR pszParms,INT nShow);
|
---|
242 |
|
---|
243 | typedef struct _PERUSERSECTION {
|
---|
244 | char szGUID[39+20];
|
---|
245 | char szDispName[128];
|
---|
246 | char szLocale[10];
|
---|
247 | char szStub[MAX_PATH*4];
|
---|
248 | char szVersion[32];
|
---|
249 | char szCompID[128];
|
---|
250 | DWORD dwIsInstalled;
|
---|
251 | WINBOOL bRollback;
|
---|
252 | } PERUSERSECTION,*PPERUSERSECTION;
|
---|
253 |
|
---|
254 | HRESULT WINAPI SetPerUserSecValues(PPERUSERSECTION pPerUser);
|
---|
255 |
|
---|
256 | #define achSetPerUserSecValues "SetPerUserSecValues"
|
---|
257 |
|
---|
258 | typedef HRESULT (WINAPI *SETPERUSERSECVALUES)(PPERUSERSECTION pPerUser);
|
---|
259 |
|
---|
260 | #ifdef __cplusplus
|
---|
261 | }
|
---|
262 | #endif
|
---|
263 | #endif
|
---|