]>
Commit | Line | Data |
---|---|---|
ff7c6d11 XL |
1 | // Licensed under the Apache License, Version 2.0 |
2 | // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
3 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. | |
4 | // All files in the project carrying such notice may not be copied, modified, or distributed | |
5 | // except according to those terms. | |
6 | //! Public header file for Windows NT Setup and Device Installer services Dll. | |
7 | use ctypes::c_int; | |
8 | use shared::basetsd::{DWORD_PTR, UINT_PTR, ULONG_PTR}; | |
9 | use shared::devpropdef::{DEVPROPKEY, DEVPROPTYPE}; | |
10 | use shared::guiddef::{GUID, LPGUID}; | |
11 | use shared::minwindef::{ | |
12 | BOOL, BYTE, DWORD, FILETIME, HINSTANCE, HKEY, INT, LPARAM, LPCVOID, LPDWORD, MAX_PATH, PBOOL, | |
13 | PBYTE, PDWORD, PINT, PUINT, UINT, USHORT, WORD, | |
14 | }; | |
15 | use shared::windef::{HDC, HICON, HWND, RECT}; | |
16 | use um::commctrl::HIMAGELIST; | |
17 | use um::prsht::{HPROPSHEETPAGE, LPPROPSHEETHEADERA, LPPROPSHEETHEADERW}; | |
18 | use um::spapidef::SP_LOG_TOKEN; | |
19 | use um::winnt::{ | |
20 | ANYSIZE_ARRAY, APPLICATION_ERROR_MASK, CHAR, DWORDLONG, ERROR_SEVERITY_ERROR, HANDLE, LONG, | |
21 | LONGLONG, LPCSTR, LPCWSTR, PCSTR, PCWSTR, PSTR, PVOID, PWSTR, WCHAR, | |
22 | }; | |
23 | use um::winreg::REGSAM; | |
24 | pub const LINE_LEN: usize = 256; | |
25 | pub const MAX_INF_STRING_LENGTH: usize = 4096; | |
26 | pub const MAX_INF_SECTION_NAME_LENGTH: usize = 255; | |
27 | pub const MAX_TITLE_LEN: usize = 60; | |
28 | pub const MAX_INSTRUCTION_LEN: usize = 256; | |
29 | pub const MAX_LABEL_LEN: usize = 30; | |
30 | pub const MAX_SERVICE_NAME_LEN: usize = 256; | |
31 | pub const MAX_SUBTITLE_LEN: usize = 256; | |
32 | pub const SP_MAX_MACHINENAME_LENGTH: usize = MAX_PATH + 3; | |
33 | pub type HINF = PVOID; | |
8faf50e0 | 34 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct INFCONTEXT { |
ff7c6d11 XL |
35 | Inf: PVOID, |
36 | CurrentInf: PVOID, | |
37 | Section: UINT, | |
38 | Line: UINT, | |
39 | }} | |
40 | pub type PINFCONTEXT = *mut INFCONTEXT; | |
8faf50e0 | 41 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_INFORMATION { |
ff7c6d11 XL |
42 | InfStyle: DWORD, |
43 | InfCount: DWORD, | |
44 | VersionData: [BYTE; ANYSIZE_ARRAY], | |
45 | }} | |
46 | pub type PSP_INF_INFORMATION = *mut SP_INF_INFORMATION; | |
8faf50e0 | 47 | UNION!{#[cfg_attr(target_arch = "x86", repr(packed))] union SP_ALTPLATFORM_INFO_V3_u { |
ff7c6d11 XL |
48 | [u16; 1], |
49 | Reserved Reserved_mut: WORD, | |
50 | Flags Flags_mut: WORD, | |
51 | }} | |
8faf50e0 | 52 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ALTPLATFORM_INFO_V3 { |
ff7c6d11 XL |
53 | cbSize: DWORD, |
54 | Platform: DWORD, | |
55 | MajorVersion: DWORD, | |
56 | MinorVersion: DWORD, | |
57 | ProcessorArchitecture: WORD, | |
58 | u: SP_ALTPLATFORM_INFO_V3_u, | |
59 | FirstValidatedMajorVersion: DWORD, | |
60 | FirstValidatedMinorVersion: DWORD, | |
61 | ProductType: BYTE, | |
62 | SuiteMask: WORD, | |
63 | BuildNumber: DWORD, | |
64 | }} | |
65 | pub type PSP_ALTPLATFORM_INFO_V3 = *mut SP_ALTPLATFORM_INFO_V3; | |
8faf50e0 | 66 | UNION!{#[cfg_attr(target_arch = "x86", repr(packed))] union SP_ALTPLATFORM_INFO_V2_u { |
ff7c6d11 XL |
67 | [u16; 1], |
68 | Reserved Reserved_mut: WORD, | |
69 | Flags Flags_mut: WORD, | |
70 | }} | |
8faf50e0 | 71 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ALTPLATFORM_INFO_V2 { |
ff7c6d11 XL |
72 | cbSize: DWORD, |
73 | Platform: DWORD, | |
74 | MajorVersion: DWORD, | |
75 | MinorVersion: DWORD, | |
76 | ProcessorArchitecture: WORD, | |
77 | u: SP_ALTPLATFORM_INFO_V2_u, | |
78 | FirstValidatedMajorVersion: DWORD, | |
79 | FirstValidatedMinorVersion: DWORD, | |
80 | }} | |
81 | pub type PSP_ALTPLATFORM_INFO_V2 = *mut SP_ALTPLATFORM_INFO_V2; | |
8faf50e0 | 82 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ALTPLATFORM_INFO_V1 { |
ff7c6d11 XL |
83 | cbSize: DWORD, |
84 | Platform: DWORD, | |
85 | MajorVersion: DWORD, | |
86 | MinorVersion: DWORD, | |
87 | ProcessorArchitecture: WORD, | |
88 | Reserved: WORD, | |
89 | }} | |
90 | pub type PSP_ALTPLATFORM_INFO_V1 = *mut SP_ALTPLATFORM_INFO_V1; | |
91 | pub type SP_ALTPLATFORM_INFO = SP_ALTPLATFORM_INFO_V2; | |
92 | pub type PSP_ALTPLATFORM_INFO = PSP_ALTPLATFORM_INFO_V2; | |
93 | pub const SP_ALTPLATFORM_FLAGS_VERSION_RANGE: WORD = 0x0001; | |
94 | pub const SP_ALTPLATFORM_FLAGS_SUITE_MASK: WORD = 0x0002; | |
8faf50e0 | 95 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ORIGINAL_FILE_INFO_A { |
ff7c6d11 XL |
96 | cbSize: DWORD, |
97 | OriginalInfName: [CHAR; MAX_PATH], | |
98 | OriginalCatalogName: [CHAR; MAX_PATH], | |
99 | }} | |
100 | pub type PSP_ORIGINAL_FILE_INFO_A = *mut SP_ORIGINAL_FILE_INFO_A; | |
8faf50e0 | 101 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ORIGINAL_FILE_INFO_W { |
ff7c6d11 XL |
102 | cbSize: DWORD, |
103 | OriginalInfName: [WCHAR; MAX_PATH], | |
104 | OriginalCatalogName: [WCHAR; MAX_PATH], | |
105 | }} | |
106 | pub type PSP_ORIGINAL_FILE_INFO_W = *mut SP_ORIGINAL_FILE_INFO_W; | |
107 | pub const INF_STYLE_NONE: DWORD = 0x00000000; | |
108 | pub const INF_STYLE_OLDNT: DWORD = 0x00000001; | |
109 | pub const INF_STYLE_WIN4: DWORD = 0x00000002; | |
110 | pub const INF_STYLE_CACHE_ENABLE: DWORD = 0x00000010; | |
111 | pub const INF_STYLE_CACHE_DISABLE: DWORD = 0x00000020; | |
112 | pub const INF_STYLE_CACHE_IGNORE: DWORD = 0x00000040; | |
113 | pub const DIRID_ABSOLUTE: DWORD = -1i32 as u32; | |
114 | pub const DIRID_ABSOLUTE_16BIT: DWORD = 0xffff; | |
115 | pub const DIRID_NULL: DWORD = 0; | |
116 | pub const DIRID_SRCPATH: DWORD = 1; | |
117 | pub const DIRID_WINDOWS: DWORD = 10; | |
118 | pub const DIRID_SYSTEM: DWORD = 11; | |
119 | pub const DIRID_DRIVERS: DWORD = 12; | |
120 | pub const DIRID_IOSUBSYS: DWORD = DIRID_DRIVERS; | |
121 | pub const DIRID_DRIVER_STORE: DWORD = 13; | |
122 | pub const DIRID_INF: DWORD = 17; | |
123 | pub const DIRID_HELP: DWORD = 18; | |
124 | pub const DIRID_FONTS: DWORD = 20; | |
125 | pub const DIRID_VIEWERS: DWORD = 21; | |
126 | pub const DIRID_COLOR: DWORD = 23; | |
127 | pub const DIRID_APPS: DWORD = 24; | |
128 | pub const DIRID_SHARED: DWORD = 25; | |
129 | pub const DIRID_BOOT: DWORD = 30; | |
130 | pub const DIRID_SYSTEM16: DWORD = 50; | |
131 | pub const DIRID_SPOOL: DWORD = 51; | |
132 | pub const DIRID_SPOOLDRIVERS: DWORD = 52; | |
133 | pub const DIRID_USERPROFILE: DWORD = 53; | |
134 | pub const DIRID_LOADER: DWORD = 54; | |
135 | pub const DIRID_PRINTPROCESSOR: DWORD = 55; | |
136 | pub const DIRID_DEFAULT: DWORD = DIRID_SYSTEM; | |
137 | pub const DIRID_COMMON_STARTMENU: DWORD = 16406; | |
138 | pub const DIRID_COMMON_PROGRAMS: DWORD = 16407; | |
139 | pub const DIRID_COMMON_STARTUP: DWORD = 16408; | |
140 | pub const DIRID_COMMON_DESKTOPDIRECTORY: DWORD = 16409; | |
141 | pub const DIRID_COMMON_FAVORITES: DWORD = 16415; | |
142 | pub const DIRID_COMMON_APPDATA: DWORD = 16419; | |
143 | pub const DIRID_PROGRAM_FILES: DWORD = 16422; | |
144 | pub const DIRID_SYSTEM_X86: DWORD = 16425; | |
145 | pub const DIRID_PROGRAM_FILES_X86: DWORD = 16426; | |
146 | pub const DIRID_PROGRAM_FILES_COMMON: DWORD = 16427; | |
147 | pub const DIRID_PROGRAM_FILES_COMMONX86: DWORD = 16428; | |
148 | pub const DIRID_COMMON_TEMPLATES: DWORD = 16429; | |
149 | pub const DIRID_COMMON_DOCUMENTS: DWORD = 16430; | |
150 | pub const DIRID_USER: DWORD = 0x8000; | |
151 | FN!{stdcall PSP_FILE_CALLBACK_A( | |
152 | Context: PVOID, | |
153 | Notification: UINT, | |
154 | Param1: UINT_PTR, | |
155 | Param2: UINT_PTR, | |
156 | ) -> UINT} | |
157 | FN!{stdcall PSP_FILE_CALLBACK_W( | |
158 | Context: PVOID, | |
159 | Notification: UINT, | |
160 | Param1: UINT_PTR, | |
161 | Param2: UINT_PTR, | |
162 | ) -> UINT} | |
163 | pub const SPFILENOTIFY_STARTQUEUE: UINT = 0x00000001; | |
164 | pub const SPFILENOTIFY_ENDQUEUE: UINT = 0x00000002; | |
165 | pub const SPFILENOTIFY_STARTSUBQUEUE: UINT = 0x00000003; | |
166 | pub const SPFILENOTIFY_ENDSUBQUEUE: UINT = 0x00000004; | |
167 | pub const SPFILENOTIFY_STARTDELETE: UINT = 0x00000005; | |
168 | pub const SPFILENOTIFY_ENDDELETE: UINT = 0x00000006; | |
169 | pub const SPFILENOTIFY_DELETEERROR: UINT = 0x00000007; | |
170 | pub const SPFILENOTIFY_STARTRENAME: UINT = 0x00000008; | |
171 | pub const SPFILENOTIFY_ENDRENAME: UINT = 0x00000009; | |
172 | pub const SPFILENOTIFY_RENAMEERROR: UINT = 0x0000000a; | |
173 | pub const SPFILENOTIFY_STARTCOPY: UINT = 0x0000000b; | |
174 | pub const SPFILENOTIFY_ENDCOPY: UINT = 0x0000000c; | |
175 | pub const SPFILENOTIFY_COPYERROR: UINT = 0x0000000d; | |
176 | pub const SPFILENOTIFY_NEEDMEDIA: UINT = 0x0000000e; | |
177 | pub const SPFILENOTIFY_QUEUESCAN: UINT = 0x0000000f; | |
178 | pub const SPFILENOTIFY_CABINETINFO: UINT = 0x00000010; | |
179 | pub const SPFILENOTIFY_FILEINCABINET: UINT = 0x00000011; | |
180 | pub const SPFILENOTIFY_NEEDNEWCABINET: UINT = 0x00000012; | |
181 | pub const SPFILENOTIFY_FILEEXTRACTED: UINT = 0x00000013; | |
182 | pub const SPFILENOTIFY_FILEOPDELAYED: UINT = 0x00000014; | |
183 | pub const SPFILENOTIFY_STARTBACKUP: UINT = 0x00000015; | |
184 | pub const SPFILENOTIFY_BACKUPERROR: UINT = 0x00000016; | |
185 | pub const SPFILENOTIFY_ENDBACKUP: UINT = 0x00000017; | |
186 | pub const SPFILENOTIFY_QUEUESCAN_EX: UINT = 0x00000018; | |
187 | pub const SPFILENOTIFY_STARTREGISTRATION: UINT = 0x00000019; | |
188 | pub const SPFILENOTIFY_ENDREGISTRATION: UINT = 0x00000020; | |
189 | pub const SPFILENOTIFY_QUEUESCAN_SIGNERINFO: UINT = 0x00000040; | |
190 | pub const SPFILENOTIFY_LANGMISMATCH: UINT = 0x00010000; | |
191 | pub const SPFILENOTIFY_TARGETEXISTS: UINT = 0x00020000; | |
192 | pub const SPFILENOTIFY_TARGETNEWER: UINT = 0x00040000; | |
193 | pub const FILEOP_COPY: UINT = 0; | |
194 | pub const FILEOP_RENAME: UINT = 1; | |
195 | pub const FILEOP_DELETE: UINT = 2; | |
196 | pub const FILEOP_BACKUP: UINT = 3; | |
197 | pub const FILEOP_ABORT: UINT = 0; | |
198 | pub const FILEOP_DOIT: UINT = 1; | |
199 | pub const FILEOP_SKIP: UINT = 2; | |
200 | pub const FILEOP_RETRY: UINT = FILEOP_DOIT; | |
201 | pub const FILEOP_NEWPATH: UINT = 4; | |
202 | pub const COPYFLG_WARN_IF_SKIP: UINT = 0x00000001; | |
203 | pub const COPYFLG_NOSKIP: UINT = 0x00000002; | |
204 | pub const COPYFLG_NOVERSIONCHECK: UINT = 0x00000004; | |
205 | pub const COPYFLG_FORCE_FILE_IN_USE: UINT = 0x00000008; | |
206 | pub const COPYFLG_NO_OVERWRITE: UINT = 0x00000010; | |
207 | pub const COPYFLG_NO_VERSION_DIALOG: UINT = 0x00000020; | |
208 | pub const COPYFLG_OVERWRITE_OLDER_ONLY: UINT = 0x00000040; | |
209 | pub const COPYFLG_PROTECTED_WINDOWS_DRIVER_FILE: UINT = 0x00000100; | |
210 | pub const COPYFLG_REPLACEONLY: UINT = 0x00000400; | |
211 | pub const COPYFLG_NODECOMP: UINT = 0x00000800; | |
212 | pub const COPYFLG_REPLACE_BOOT_FILE: UINT = 0x00001000; | |
213 | pub const COPYFLG_NOPRUNE: UINT = 0x00002000; | |
214 | pub const COPYFLG_IN_USE_TRY_RENAME: UINT = 0x00004000; | |
215 | pub const DELFLG_IN_USE: UINT = 0x00000001; | |
216 | pub const DELFLG_IN_USE1: UINT = 0x00010000; | |
8faf50e0 | 217 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_A { |
ff7c6d11 XL |
218 | Target: PCSTR, |
219 | Source: PCSTR, | |
220 | Win32Error: UINT, | |
221 | Flags: DWORD, | |
222 | }} | |
223 | pub type PFILEPATHS_A = *mut FILEPATHS_A; | |
8faf50e0 | 224 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_W { |
ff7c6d11 XL |
225 | Target: PCWSTR, |
226 | Source: PCWSTR, | |
227 | Win32Error: UINT, | |
228 | Flags: DWORD, | |
229 | }} | |
230 | pub type PFILEPATHS_W = *mut FILEPATHS_W; | |
8faf50e0 | 231 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_SIGNERINFO_A { |
ff7c6d11 XL |
232 | Target: PCSTR, |
233 | Source: PCSTR, | |
234 | Win32Error: UINT, | |
235 | Flags: DWORD, | |
236 | DigitalSigner: PCSTR, | |
237 | Version: PCSTR, | |
238 | CatalogFile: PCSTR, | |
239 | }} | |
240 | pub type PFILEPATHS_SIGNERINFO_A = *mut FILEPATHS_SIGNERINFO_A; | |
8faf50e0 | 241 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_SIGNERINFO_W { |
ff7c6d11 XL |
242 | Target: PCWSTR, |
243 | Source: PCWSTR, | |
244 | Win32Error: UINT, | |
245 | Flags: DWORD, | |
246 | DigitalSigner: PCWSTR, | |
247 | Version: PCWSTR, | |
248 | CatalogFile: PCWSTR, | |
249 | }} | |
250 | pub type PFILEPATHS_SIGNERINFO_W = *mut FILEPATHS_SIGNERINFO_W; | |
8faf50e0 | 251 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SOURCE_MEDIA_A { |
ff7c6d11 XL |
252 | Reserved: PCSTR, |
253 | Tagfile: PCSTR, | |
254 | Description: PCSTR, | |
255 | SourcePath: PCSTR, | |
256 | SourceFile: PCSTR, | |
257 | Flags: DWORD, | |
258 | }} | |
259 | pub type PSOURCE_MEDIA_A = *mut SOURCE_MEDIA_A; | |
8faf50e0 | 260 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SOURCE_MEDIA_W { |
ff7c6d11 XL |
261 | Reserved: PCWSTR, |
262 | Tagfile: PCWSTR, | |
263 | Description: PCWSTR, | |
264 | SourcePath: PCWSTR, | |
265 | SourceFile: PCWSTR, | |
266 | Flags: DWORD, | |
267 | }} | |
268 | pub type PSOURCE_MEDIA_W = *mut SOURCE_MEDIA_W; | |
8faf50e0 | 269 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct CABINET_INFO_A { |
ff7c6d11 XL |
270 | CabinetPath: PCSTR, |
271 | CabinetFile: PCSTR, | |
272 | DiskName: PCSTR, | |
273 | SetId: USHORT, | |
274 | CabinetNumber: USHORT, | |
275 | }} | |
276 | pub type PCABINET_INFO_A = *mut CABINET_INFO_A; | |
8faf50e0 | 277 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct CABINET_INFO_W { |
ff7c6d11 XL |
278 | CabinetPath: PCWSTR, |
279 | CabinetFile: PCWSTR, | |
280 | DiskName: PCWSTR, | |
281 | SetId: USHORT, | |
282 | CabinetNumber: USHORT, | |
283 | }} | |
284 | pub type PCABINET_INFO_W = *mut CABINET_INFO_W; | |
8faf50e0 | 285 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILE_IN_CABINET_INFO_A { |
ff7c6d11 XL |
286 | NameInCabinet: PCSTR, |
287 | FileSize: DWORD, | |
288 | Win32Error: DWORD, | |
289 | DosDate: WORD, | |
290 | DosTime: WORD, | |
291 | DosAttribs: WORD, | |
292 | FullTargetName: [CHAR; MAX_PATH], | |
293 | }} | |
294 | pub type PFILE_IN_CABINET_INFO_A = *mut FILE_IN_CABINET_INFO_A; | |
8faf50e0 | 295 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILE_IN_CABINET_INFO_W { |
ff7c6d11 XL |
296 | NameInCabinet: PCWSTR, |
297 | FileSize: DWORD, | |
298 | Win32Error: DWORD, | |
299 | DosDate: WORD, | |
300 | DosTime: WORD, | |
301 | DosAttribs: WORD, | |
302 | FullTargetName: [WCHAR; MAX_PATH], | |
303 | }} | |
304 | pub type PFILE_IN_CABINET_INFO_W = *mut FILE_IN_CABINET_INFO_W; | |
8faf50e0 | 305 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_REGISTER_CONTROL_STATUSA { |
ff7c6d11 XL |
306 | cbSize: DWORD, |
307 | FileName: PCSTR, | |
308 | Win32Error: DWORD, | |
309 | FailureCode: DWORD, | |
310 | }} | |
311 | pub type PSP_REGISTER_CONTROL_STATUSA = *mut SP_REGISTER_CONTROL_STATUSA; | |
8faf50e0 | 312 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_REGISTER_CONTROL_STATUSW { |
ff7c6d11 XL |
313 | cbSize: DWORD, |
314 | FileName: PCWSTR, | |
315 | Win32Error: DWORD, | |
316 | FailureCode: DWORD, | |
317 | }} | |
318 | pub type PSP_REGISTER_CONTROL_STATUSW = *mut SP_REGISTER_CONTROL_STATUSW; | |
319 | pub const SPREG_SUCCESS: DWORD = 0x00000000; | |
320 | pub const SPREG_LOADLIBRARY: DWORD = 0x00000001; | |
321 | pub const SPREG_GETPROCADDR: DWORD = 0x00000002; | |
322 | pub const SPREG_REGSVR: DWORD = 0x00000003; | |
323 | pub const SPREG_DLLINSTALL: DWORD = 0x00000004; | |
324 | pub const SPREG_TIMEOUT: DWORD = 0x00000005; | |
325 | pub const SPREG_UNKNOWN: DWORD = 0xFFFFFFFF; | |
326 | pub type HSPFILEQ = PVOID; | |
8faf50e0 | 327 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_FILE_COPY_PARAMS_A { |
ff7c6d11 XL |
328 | cbSize: DWORD, |
329 | QueueHandle: HSPFILEQ, | |
330 | SourceRootPath: PCSTR, | |
331 | SourcePath: PCSTR, | |
332 | SourceFilename: PCSTR, | |
333 | SourceDescription: PCSTR, | |
334 | SourceTagfile: PCSTR, | |
335 | TargetDirectory: PCSTR, | |
336 | TargetFilename: PCSTR, | |
337 | CopyStyle: DWORD, | |
338 | LayoutInf: HINF, | |
339 | SecurityDescriptor: PCSTR, | |
340 | }} | |
341 | pub type PSP_FILE_COPY_PARAMS_A = *mut SP_FILE_COPY_PARAMS_A; | |
8faf50e0 | 342 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_FILE_COPY_PARAMS_W { |
ff7c6d11 XL |
343 | cbSize: DWORD, |
344 | QueueHandle: HSPFILEQ, | |
345 | SourceRootPath: PCWSTR, | |
346 | SourcePath: PCWSTR, | |
347 | SourceFilename: PCWSTR, | |
348 | SourceDescription: PCWSTR, | |
349 | SourceTagfile: PCWSTR, | |
350 | TargetDirectory: PCWSTR, | |
351 | TargetFilename: PCWSTR, | |
352 | CopyStyle: DWORD, | |
353 | LayoutInf: HINF, | |
354 | SecurityDescriptor: PCWSTR, | |
355 | }} | |
356 | pub type PSP_FILE_COPY_PARAMS_W = *mut SP_FILE_COPY_PARAMS_W; | |
357 | pub type HDSKSPC = PVOID; | |
358 | pub type HDEVINFO = PVOID; | |
8faf50e0 | 359 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINFO_DATA { |
ff7c6d11 XL |
360 | cbSize: DWORD, |
361 | ClassGuid: GUID, | |
362 | DevInst: DWORD, | |
363 | Reserved: ULONG_PTR, | |
364 | }} | |
365 | pub type PSP_DEVINFO_DATA = *mut SP_DEVINFO_DATA; | |
8faf50e0 | 366 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVICE_INTERFACE_DATA { |
ff7c6d11 XL |
367 | cbSize: DWORD, |
368 | InterfaceClassGuid: GUID, | |
369 | Flags: DWORD, | |
370 | Reserved: ULONG_PTR, | |
371 | }} | |
372 | pub type PSP_DEVICE_INTERFACE_DATA = *mut SP_DEVICE_INTERFACE_DATA; | |
373 | pub const SPINT_ACTIVE: DWORD = 0x00000001; | |
374 | pub const SPINT_DEFAULT: DWORD = 0x00000002; | |
375 | pub const SPINT_REMOVED: DWORD = 0x00000004; | |
376 | pub type SP_INTERFACE_DEVICE_DATA = SP_DEVICE_INTERFACE_DATA; | |
377 | pub type PSP_INTERFACE_DEVICE_DATA = PSP_DEVICE_INTERFACE_DATA; | |
378 | pub const SPID_ACTIVE: DWORD = SPINT_ACTIVE; | |
379 | pub const SPID_DEFAULT: DWORD = SPINT_DEFAULT; | |
380 | pub const SPID_REMOVED: DWORD = SPINT_REMOVED; | |
8faf50e0 | 381 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVICE_INTERFACE_DETAIL_DATA_A { |
ff7c6d11 XL |
382 | cbSize: DWORD, |
383 | DevicePath: [CHAR; ANYSIZE_ARRAY], | |
384 | }} | |
385 | pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_A = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_A; | |
8faf50e0 | 386 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVICE_INTERFACE_DETAIL_DATA_W { |
ff7c6d11 XL |
387 | cbSize: DWORD, |
388 | DevicePath: [WCHAR; ANYSIZE_ARRAY], | |
389 | }} | |
390 | pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_W = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_W; | |
8faf50e0 | 391 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINFO_LIST_DETAIL_DATA_A { |
ff7c6d11 XL |
392 | cbSize: DWORD, |
393 | ClassGuid: GUID, | |
394 | RemoteMachineHandle: HANDLE, | |
395 | RemoteMachineName: [CHAR; SP_MAX_MACHINENAME_LENGTH], | |
396 | }} | |
397 | pub type PSP_DEVINFO_LIST_DETAIL_DATA_A = *mut SP_DEVINFO_LIST_DETAIL_DATA_A; | |
8faf50e0 | 398 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINFO_LIST_DETAIL_DATA_W { |
ff7c6d11 XL |
399 | cbSize: DWORD, |
400 | ClassGuid: GUID, | |
401 | RemoteMachineHandle: HANDLE, | |
402 | RemoteMachineName: [WCHAR; SP_MAX_MACHINENAME_LENGTH], | |
403 | }} | |
404 | pub type PSP_DEVINFO_LIST_DETAIL_DATA_W = *mut SP_DEVINFO_LIST_DETAIL_DATA_W; | |
405 | pub const DIF_SELECTDEVICE: DI_FUNCTION = 0x00000001; | |
406 | pub const DIF_INSTALLDEVICE: DI_FUNCTION = 0x00000002; | |
407 | pub const DIF_ASSIGNRESOURCES: DI_FUNCTION = 0x00000003; | |
408 | pub const DIF_PROPERTIES: DI_FUNCTION = 0x00000004; | |
409 | pub const DIF_REMOVE: DI_FUNCTION = 0x00000005; | |
410 | pub const DIF_FIRSTTIMESETUP: DI_FUNCTION = 0x00000006; | |
411 | pub const DIF_FOUNDDEVICE: DI_FUNCTION = 0x00000007; | |
412 | pub const DIF_SELECTCLASSDRIVERS: DI_FUNCTION = 0x00000008; | |
413 | pub const DIF_VALIDATECLASSDRIVERS: DI_FUNCTION = 0x00000009; | |
414 | pub const DIF_INSTALLCLASSDRIVERS: DI_FUNCTION = 0x0000000A; | |
415 | pub const DIF_CALCDISKSPACE: DI_FUNCTION = 0x0000000B; | |
416 | pub const DIF_DESTROYPRIVATEDATA: DI_FUNCTION = 0x0000000C; | |
417 | pub const DIF_VALIDATEDRIVER: DI_FUNCTION = 0x0000000D; | |
418 | pub const DIF_DETECT: DI_FUNCTION = 0x0000000F; | |
419 | pub const DIF_INSTALLWIZARD: DI_FUNCTION = 0x00000010; | |
420 | pub const DIF_DESTROYWIZARDDATA: DI_FUNCTION = 0x00000011; | |
421 | pub const DIF_PROPERTYCHANGE: DI_FUNCTION = 0x00000012; | |
422 | pub const DIF_ENABLECLASS: DI_FUNCTION = 0x00000013; | |
423 | pub const DIF_DETECTVERIFY: DI_FUNCTION = 0x00000014; | |
424 | pub const DIF_INSTALLDEVICEFILES: DI_FUNCTION = 0x00000015; | |
425 | pub const DIF_UNREMOVE: DI_FUNCTION = 0x00000016; | |
426 | pub const DIF_SELECTBESTCOMPATDRV: DI_FUNCTION = 0x00000017; | |
427 | pub const DIF_ALLOW_INSTALL: DI_FUNCTION = 0x00000018; | |
428 | pub const DIF_REGISTERDEVICE: DI_FUNCTION = 0x00000019; | |
429 | pub const DIF_NEWDEVICEWIZARD_PRESELECT: DI_FUNCTION = 0x0000001A; | |
430 | pub const DIF_NEWDEVICEWIZARD_SELECT: DI_FUNCTION = 0x0000001B; | |
431 | pub const DIF_NEWDEVICEWIZARD_PREANALYZE: DI_FUNCTION = 0x0000001C; | |
432 | pub const DIF_NEWDEVICEWIZARD_POSTANALYZE: DI_FUNCTION = 0x0000001D; | |
433 | pub const DIF_NEWDEVICEWIZARD_FINISHINSTALL: DI_FUNCTION = 0x0000001E; | |
434 | pub const DIF_UNUSED1: DI_FUNCTION = 0x0000001F; | |
435 | pub const DIF_INSTALLINTERFACES: DI_FUNCTION = 0x00000020; | |
436 | pub const DIF_DETECTCANCEL: DI_FUNCTION = 0x00000021; | |
437 | pub const DIF_REGISTER_COINSTALLERS: DI_FUNCTION = 0x00000022; | |
438 | pub const DIF_ADDPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000023; | |
439 | pub const DIF_ADDPROPERTYPAGE_BASIC: DI_FUNCTION = 0x00000024; | |
440 | pub const DIF_RESERVED1: DI_FUNCTION = 0x00000025; | |
441 | pub const DIF_TROUBLESHOOTER: DI_FUNCTION = 0x00000026; | |
442 | pub const DIF_POWERMESSAGEWAKE: DI_FUNCTION = 0x00000027; | |
443 | pub const DIF_ADDREMOTEPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000028; | |
444 | pub const DIF_UPDATEDRIVER_UI: DI_FUNCTION = 0x00000029; | |
445 | pub const DIF_FINISHINSTALL_ACTION: DI_FUNCTION = 0x0000002A; | |
446 | pub const DIF_RESERVED2: DI_FUNCTION = 0x00000030; | |
447 | pub const DIF_MOVEDEVICE: DI_FUNCTION = 0x0000000E; | |
448 | pub type DI_FUNCTION = UINT; | |
8faf50e0 | 449 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINSTALL_PARAMS_A { |
ff7c6d11 XL |
450 | cbSize: DWORD, |
451 | Flags: DWORD, | |
452 | FlagsEx: DWORD, | |
453 | hwndParent: HWND, | |
454 | InstallMsgHandler: PSP_FILE_CALLBACK_A, | |
455 | InstallMsgHandlerContext: PVOID, | |
456 | FileQueue: HSPFILEQ, | |
457 | ClassInstallReserved: ULONG_PTR, | |
458 | Reserved: DWORD, | |
459 | DriverPath: [CHAR; MAX_PATH], | |
460 | }} | |
461 | pub type PSP_DEVINSTALL_PARAMS_A = *mut SP_DEVINSTALL_PARAMS_A; | |
8faf50e0 | 462 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINSTALL_PARAMS_W { |
ff7c6d11 XL |
463 | cbSize: DWORD, |
464 | Flags: DWORD, | |
465 | FlagsEx: DWORD, | |
466 | hwndParent: HWND, | |
467 | InstallMsgHandler: PSP_FILE_CALLBACK_W, | |
468 | InstallMsgHandlerContext: PVOID, | |
469 | FileQueue: HSPFILEQ, | |
470 | ClassInstallReserved: ULONG_PTR, | |
471 | Reserved: DWORD, | |
472 | DriverPath: [WCHAR; MAX_PATH], | |
473 | }} | |
474 | pub type PSP_DEVINSTALL_PARAMS_W = *mut SP_DEVINSTALL_PARAMS_W; | |
475 | pub const DI_SHOWOEM: DWORD = 0x00000001; | |
476 | pub const DI_SHOWCOMPAT: DWORD = 0x00000002; | |
477 | pub const DI_SHOWCLASS: DWORD = 0x00000004; | |
478 | pub const DI_SHOWALL: DWORD = 0x00000007; | |
479 | pub const DI_NOVCP: DWORD = 0x00000008; | |
480 | pub const DI_DIDCOMPAT: DWORD = 0x00000010; | |
481 | pub const DI_DIDCLASS: DWORD = 0x00000020; | |
482 | pub const DI_AUTOASSIGNRES: DWORD = 0x00000040; | |
483 | pub const DI_NEEDRESTART: DWORD = 0x00000080; | |
484 | pub const DI_NEEDREBOOT: DWORD = 0x00000100; | |
485 | pub const DI_NOBROWSE: DWORD = 0x00000200; | |
486 | pub const DI_MULTMFGS: DWORD = 0x00000400; | |
487 | pub const DI_DISABLED: DWORD = 0x00000800; | |
488 | pub const DI_GENERALPAGE_ADDED: DWORD = 0x00001000; | |
489 | pub const DI_RESOURCEPAGE_ADDED: DWORD = 0x00002000; | |
490 | pub const DI_PROPERTIES_CHANGE: DWORD = 0x00004000; | |
491 | pub const DI_INF_IS_SORTED: DWORD = 0x00008000; | |
492 | pub const DI_ENUMSINGLEINF: DWORD = 0x00010000; | |
493 | pub const DI_DONOTCALLCONFIGMG: DWORD = 0x00020000; | |
494 | pub const DI_INSTALLDISABLED: DWORD = 0x00040000; | |
495 | pub const DI_COMPAT_FROM_CLASS: DWORD = 0x00080000; | |
496 | pub const DI_CLASSINSTALLPARAMS: DWORD = 0x00100000; | |
497 | pub const DI_NODI_DEFAULTACTION: DWORD = 0x00200000; | |
498 | pub const DI_QUIETINSTALL: DWORD = 0x00800000; | |
499 | pub const DI_NOFILECOPY: DWORD = 0x01000000; | |
500 | pub const DI_FORCECOPY: DWORD = 0x02000000; | |
501 | pub const DI_DRIVERPAGE_ADDED: DWORD = 0x04000000; | |
502 | pub const DI_USECI_SELECTSTRINGS: DWORD = 0x08000000; | |
503 | pub const DI_OVERRIDE_INFFLAGS: DWORD = 0x10000000; | |
504 | pub const DI_PROPS_NOCHANGEUSAGE: DWORD = 0x20000000; | |
505 | pub const DI_NOSELECTICONS: DWORD = 0x40000000; | |
506 | pub const DI_NOWRITE_IDS: DWORD = 0x80000000; | |
507 | pub const DI_FLAGSEX_RESERVED2: DWORD = 0x00000001; | |
508 | pub const DI_FLAGSEX_RESERVED3: DWORD = 0x00000002; | |
509 | pub const DI_FLAGSEX_CI_FAILED: DWORD = 0x00000004; | |
510 | pub const DI_FLAGSEX_FINISHINSTALL_ACTION: DWORD = 0x00000008; | |
511 | pub const DI_FLAGSEX_DIDINFOLIST: DWORD = 0x00000010; | |
512 | pub const DI_FLAGSEX_DIDCOMPATINFO: DWORD = 0x00000020; | |
513 | pub const DI_FLAGSEX_FILTERCLASSES: DWORD = 0x00000040; | |
514 | pub const DI_FLAGSEX_SETFAILEDINSTALL: DWORD = 0x00000080; | |
515 | pub const DI_FLAGSEX_DEVICECHANGE: DWORD = 0x00000100; | |
516 | pub const DI_FLAGSEX_ALWAYSWRITEIDS: DWORD = 0x00000200; | |
517 | pub const DI_FLAGSEX_PROPCHANGE_PENDING: DWORD = 0x00000400; | |
518 | pub const DI_FLAGSEX_ALLOWEXCLUDEDDRVS: DWORD = 0x00000800; | |
519 | pub const DI_FLAGSEX_NOUIONQUERYREMOVE: DWORD = 0x00001000; | |
520 | pub const DI_FLAGSEX_USECLASSFORCOMPAT: DWORD = 0x00002000; | |
521 | pub const DI_FLAGSEX_RESERVED4: DWORD = 0x00004000; | |
522 | pub const DI_FLAGSEX_NO_DRVREG_MODIFY: DWORD = 0x00008000; | |
523 | pub const DI_FLAGSEX_IN_SYSTEM_SETUP: DWORD = 0x00010000; | |
524 | pub const DI_FLAGSEX_INET_DRIVER: DWORD = 0x00020000; | |
525 | pub const DI_FLAGSEX_APPENDDRIVERLIST: DWORD = 0x00040000; | |
526 | pub const DI_FLAGSEX_PREINSTALLBACKUP: DWORD = 0x00080000; | |
527 | pub const DI_FLAGSEX_BACKUPONREPLACE: DWORD = 0x00100000; | |
528 | pub const DI_FLAGSEX_DRIVERLIST_FROM_URL: DWORD = 0x00200000; | |
529 | pub const DI_FLAGSEX_RESERVED1: DWORD = 0x00400000; | |
530 | pub const DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS: DWORD = 0x00800000; | |
531 | pub const DI_FLAGSEX_POWERPAGE_ADDED: DWORD = 0x01000000; | |
532 | pub const DI_FLAGSEX_FILTERSIMILARDRIVERS: DWORD = 0x02000000; | |
533 | pub const DI_FLAGSEX_INSTALLEDDRIVER: DWORD = 0x04000000; | |
534 | pub const DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE: DWORD = 0x08000000; | |
535 | pub const DI_FLAGSEX_ALTPLATFORM_DRVSEARCH: DWORD = 0x10000000; | |
536 | pub const DI_FLAGSEX_RESTART_DEVICE_ONLY: DWORD = 0x20000000; | |
537 | pub const DI_FLAGSEX_RECURSIVESEARCH: DWORD = 0x40000000; | |
538 | pub const DI_FLAGSEX_SEARCH_PUBLISHED_INFS: DWORD = 0x80000000; | |
8faf50e0 | 539 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_CLASSINSTALL_HEADER { |
ff7c6d11 XL |
540 | cbSize: DWORD, |
541 | InstallFunction: DI_FUNCTION, | |
542 | }} | |
543 | pub type PSP_CLASSINSTALL_HEADER = *mut SP_CLASSINSTALL_HEADER; | |
8faf50e0 | 544 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ENABLECLASS_PARAMS { |
ff7c6d11 XL |
545 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
546 | ClassGuid: GUID, | |
547 | EnableMessage: DWORD, | |
548 | }} | |
549 | pub type PSP_ENABLECLASS_PARAMS = *mut SP_ENABLECLASS_PARAMS; | |
550 | pub const ENABLECLASS_QUERY: DWORD = 0; | |
551 | pub const ENABLECLASS_SUCCESS: DWORD = 1; | |
552 | pub const ENABLECLASS_FAILURE: DWORD = 2; | |
553 | pub const DICS_ENABLE: DWORD = 0x00000001; | |
554 | pub const DICS_DISABLE: DWORD = 0x00000002; | |
555 | pub const DICS_PROPCHANGE: DWORD = 0x00000003; | |
556 | pub const DICS_START: DWORD = 0x00000004; | |
557 | pub const DICS_STOP: DWORD = 0x00000005; | |
558 | pub const DICS_FLAG_GLOBAL: DWORD = 0x00000001; | |
559 | pub const DICS_FLAG_CONFIGSPECIFIC: DWORD = 0x00000002; | |
560 | pub const DICS_FLAG_CONFIGGENERAL: DWORD = 0x00000004; | |
8faf50e0 | 561 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_PROPCHANGE_PARAMS { |
ff7c6d11 XL |
562 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
563 | StateChange: DWORD, | |
564 | Scope: DWORD, | |
565 | HwProfile: DWORD, | |
566 | }} | |
567 | pub type PSP_PROPCHANGE_PARAMS = *mut SP_PROPCHANGE_PARAMS; | |
8faf50e0 | 568 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_REMOVEDEVICE_PARAMS { |
ff7c6d11 XL |
569 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
570 | Scope: DWORD, | |
571 | HwProfile: DWORD, | |
572 | }} | |
573 | pub type PSP_REMOVEDEVICE_PARAMS = *mut SP_REMOVEDEVICE_PARAMS; | |
574 | pub const DI_REMOVEDEVICE_GLOBAL: DWORD = 0x00000001; | |
575 | pub const DI_REMOVEDEVICE_CONFIGSPECIFIC: DWORD = 0x00000002; | |
8faf50e0 | 576 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_UNREMOVEDEVICE_PARAMS { |
ff7c6d11 XL |
577 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
578 | Scope: DWORD, | |
579 | HwProfile: DWORD, | |
580 | }} | |
581 | pub type PSP_UNREMOVEDEVICE_PARAMS = *mut SP_UNREMOVEDEVICE_PARAMS; | |
582 | pub const DI_UNREMOVEDEVICE_CONFIGSPECIFIC: DWORD = 0x00000002; | |
8faf50e0 | 583 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_SELECTDEVICE_PARAMS_A { |
ff7c6d11 XL |
584 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
585 | Title: [CHAR; MAX_TITLE_LEN], | |
586 | Instructions: [CHAR; MAX_INSTRUCTION_LEN], | |
587 | ListLabel: [CHAR; MAX_LABEL_LEN], | |
588 | SubTitle: [CHAR; MAX_SUBTITLE_LEN], | |
589 | Reserved: [BYTE; 2], | |
590 | }} | |
591 | pub type PSP_SELECTDEVICE_PARAMS_A = *mut SP_SELECTDEVICE_PARAMS_A; | |
8faf50e0 | 592 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_SELECTDEVICE_PARAMS_W { |
ff7c6d11 XL |
593 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
594 | Title: [WCHAR; MAX_TITLE_LEN], | |
595 | Instructions: [WCHAR; MAX_INSTRUCTION_LEN], | |
596 | ListLabel: [WCHAR; MAX_LABEL_LEN], | |
597 | SubTitle: [WCHAR; MAX_SUBTITLE_LEN], | |
598 | }} | |
599 | pub type PSP_SELECTDEVICE_PARAMS_W = *mut SP_SELECTDEVICE_PARAMS_W; | |
600 | FN!{stdcall PDETECT_PROGRESS_NOTIFY( | |
601 | ProgressNotifyParam: PVOID, | |
602 | DetectComplete: DWORD, | |
603 | ) -> BOOL} | |
8faf50e0 | 604 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DETECTDEVICE_PARAMS { |
ff7c6d11 XL |
605 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
606 | DetectProgressNotify: PDETECT_PROGRESS_NOTIFY, | |
607 | ProgressNotifyParam: PVOID, | |
608 | }} | |
609 | pub type PSP_DETECTDEVICE_PARAMS = *mut SP_DETECTDEVICE_PARAMS; | |
610 | pub const MAX_INSTALLWIZARD_DYNAPAGES: usize = 20; | |
8faf50e0 | 611 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INSTALLWIZARD_DATA { |
ff7c6d11 XL |
612 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
613 | Flags: DWORD, | |
614 | DynamicPages: [HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES], | |
615 | NumDynamicPages: DWORD, | |
616 | DynamicPageFlags: DWORD, | |
617 | PrivateFlags: DWORD, | |
618 | PrivateData: LPARAM, | |
619 | hwndWizardDlg: HWND, | |
620 | }} | |
621 | pub type PSP_INSTALLWIZARD_DATA = *mut SP_INSTALLWIZARD_DATA; | |
622 | pub const NDW_INSTALLFLAG_DIDFACTDEFS: DWORD = 0x00000001; | |
623 | pub const NDW_INSTALLFLAG_HARDWAREALLREADYIN: DWORD = 0x00000002; | |
624 | pub const NDW_INSTALLFLAG_NEEDRESTART: DWORD = DI_NEEDRESTART; | |
625 | pub const NDW_INSTALLFLAG_NEEDREBOOT: DWORD = DI_NEEDREBOOT; | |
626 | pub const NDW_INSTALLFLAG_NEEDSHUTDOWN: DWORD = 0x00000200; | |
627 | pub const NDW_INSTALLFLAG_EXPRESSINTRO: DWORD = 0x00000400; | |
628 | pub const NDW_INSTALLFLAG_SKIPISDEVINSTALLED: DWORD = 0x00000800; | |
629 | pub const NDW_INSTALLFLAG_NODETECTEDDEVS: DWORD = 0x00001000; | |
630 | pub const NDW_INSTALLFLAG_INSTALLSPECIFIC: DWORD = 0x00002000; | |
631 | pub const NDW_INSTALLFLAG_SKIPCLASSLIST: DWORD = 0x00004000; | |
632 | pub const NDW_INSTALLFLAG_CI_PICKED_OEM: DWORD = 0x00008000; | |
633 | pub const NDW_INSTALLFLAG_PCMCIAMODE: DWORD = 0x00010000; | |
634 | pub const NDW_INSTALLFLAG_PCMCIADEVICE: DWORD = 0x00020000; | |
635 | pub const NDW_INSTALLFLAG_USERCANCEL: DWORD = 0x00040000; | |
636 | pub const NDW_INSTALLFLAG_KNOWNCLASS: DWORD = 0x00080000; | |
637 | pub const DYNAWIZ_FLAG_PAGESADDED: DWORD = 0x00000001; | |
638 | pub const DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT: DWORD = 0x00000008; | |
639 | pub const DYNAWIZ_FLAG_INSTALLDET_NEXT: DWORD = 0x00000002; | |
640 | pub const DYNAWIZ_FLAG_INSTALLDET_PREV: DWORD = 0x00000004; | |
641 | pub const MIN_IDD_DYNAWIZ_RESOURCE_ID: c_int = 10000; | |
642 | pub const MAX_IDD_DYNAWIZ_RESOURCE_ID: c_int = 11000; | |
643 | pub const IDD_DYNAWIZ_FIRSTPAGE: c_int = 10000; | |
644 | pub const IDD_DYNAWIZ_SELECT_PREVPAGE: c_int = 10001; | |
645 | pub const IDD_DYNAWIZ_SELECT_NEXTPAGE: c_int = 10002; | |
646 | pub const IDD_DYNAWIZ_ANALYZE_PREVPAGE: c_int = 10003; | |
647 | pub const IDD_DYNAWIZ_ANALYZE_NEXTPAGE: c_int = 10004; | |
648 | pub const IDD_DYNAWIZ_SELECTDEV_PAGE: c_int = 10009; | |
649 | pub const IDD_DYNAWIZ_ANALYZEDEV_PAGE: c_int = 10010; | |
650 | pub const IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE: c_int = 10011; | |
651 | pub const IDD_DYNAWIZ_SELECTCLASS_PAGE: c_int = 10012; | |
652 | pub const IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE: c_int = 10006; | |
653 | pub const IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE: c_int = 10007; | |
654 | pub const IDD_DYNAWIZ_INSTALLDETECTED_NODEVS: c_int = 10008; | |
8faf50e0 | 655 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_NEWDEVICEWIZARD_DATA { |
ff7c6d11 XL |
656 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
657 | Flags: DWORD, | |
658 | DynamicPages: [HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES], | |
659 | NumDynamicPages: DWORD, | |
660 | hwndWizardDlg: HWND, | |
661 | }} | |
662 | pub type PSP_NEWDEVICEWIZARD_DATA = *mut SP_NEWDEVICEWIZARD_DATA; | |
663 | pub type SP_ADDPROPERTYPAGE_DATA = SP_NEWDEVICEWIZARD_DATA; | |
664 | pub type PSP_ADDPROPERTYPAGE_DATA = PSP_NEWDEVICEWIZARD_DATA; | |
8faf50e0 | 665 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_TROUBLESHOOTER_PARAMS_A { |
ff7c6d11 XL |
666 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
667 | ChmFile: [CHAR; MAX_PATH], | |
668 | HtmlTroubleShooter: [CHAR; MAX_PATH], | |
669 | }} | |
670 | pub type PSP_TROUBLESHOOTER_PARAMS_A = *mut SP_TROUBLESHOOTER_PARAMS_A; | |
8faf50e0 | 671 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_TROUBLESHOOTER_PARAMS_W { |
ff7c6d11 XL |
672 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
673 | ChmFile: [WCHAR; MAX_PATH], | |
674 | HtmlTroubleShooter: [WCHAR; MAX_PATH], | |
675 | }} | |
676 | pub type PSP_TROUBLESHOOTER_PARAMS_W = *mut SP_TROUBLESHOOTER_PARAMS_W; | |
8faf50e0 | 677 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_POWERMESSAGEWAKE_PARAMS_A { |
ff7c6d11 XL |
678 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
679 | PowerMessageWake: [CHAR; LINE_LEN * 2], | |
680 | }} | |
681 | pub type PSP_POWERMESSAGEWAKE_PARAMS_A = *mut SP_POWERMESSAGEWAKE_PARAMS_A; | |
8faf50e0 | 682 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_POWERMESSAGEWAKE_PARAMS_W { |
ff7c6d11 XL |
683 | ClassInstallHeader: SP_CLASSINSTALL_HEADER, |
684 | PowerMessageWake: [WCHAR; LINE_LEN * 2], | |
685 | }} | |
686 | pub type PSP_POWERMESSAGEWAKE_PARAMS_W = *mut SP_POWERMESSAGEWAKE_PARAMS_W; | |
8faf50e0 | 687 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V2_A { |
ff7c6d11 XL |
688 | cbSize: DWORD, |
689 | DriverType: DWORD, | |
690 | Reserved: ULONG_PTR, | |
691 | Description: [CHAR; LINE_LEN], | |
692 | MfgName: [CHAR; LINE_LEN], | |
693 | ProviderName: [CHAR; LINE_LEN], | |
694 | DriverDate: FILETIME, | |
695 | DriverVersion: DWORDLONG, | |
696 | }} | |
697 | pub type PSP_DRVINFO_DATA_V2_A = *mut SP_DRVINFO_DATA_V2_A; | |
8faf50e0 | 698 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V2_W { |
ff7c6d11 XL |
699 | cbSize: DWORD, |
700 | DriverType: DWORD, | |
701 | Reserved: ULONG_PTR, | |
702 | Description: [WCHAR; LINE_LEN], | |
703 | MfgName: [WCHAR; LINE_LEN], | |
704 | ProviderName: [WCHAR; LINE_LEN], | |
705 | DriverDate: FILETIME, | |
706 | DriverVersion: DWORDLONG, | |
707 | }} | |
708 | pub type PSP_DRVINFO_DATA_V2_W = *mut SP_DRVINFO_DATA_V2_W; | |
8faf50e0 | 709 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V1_A { |
ff7c6d11 XL |
710 | cbSize: DWORD, |
711 | DriverType: DWORD, | |
712 | Reserved: ULONG_PTR, | |
713 | Description: [CHAR; LINE_LEN], | |
714 | MfgName: [CHAR; LINE_LEN], | |
715 | ProviderName: [CHAR; LINE_LEN], | |
716 | }} | |
717 | pub type PSP_DRVINFO_DATA_V1_A = *mut SP_DRVINFO_DATA_V1_A; | |
8faf50e0 | 718 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V1_W { |
ff7c6d11 XL |
719 | cbSize: DWORD, |
720 | DriverType: DWORD, | |
721 | Reserved: ULONG_PTR, | |
722 | Description: [WCHAR; LINE_LEN], | |
723 | MfgName: [WCHAR; LINE_LEN], | |
724 | ProviderName: [WCHAR; LINE_LEN], | |
725 | }} | |
726 | pub type PSP_DRVINFO_DATA_V1_W = *mut SP_DRVINFO_DATA_V1_W; | |
727 | pub type SP_DRVINFO_DATA_A = SP_DRVINFO_DATA_V2_A; | |
728 | pub type PSP_DRVINFO_DATA_A = PSP_DRVINFO_DATA_V2_A; | |
729 | pub type SP_DRVINFO_DATA_W = SP_DRVINFO_DATA_V2_W; | |
730 | pub type PSP_DRVINFO_DATA_W = PSP_DRVINFO_DATA_V2_W; | |
8faf50e0 | 731 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DETAIL_DATA_A { |
ff7c6d11 XL |
732 | cbSize: DWORD, |
733 | InfDate: FILETIME, | |
734 | CompatIDsOffset: DWORD, | |
735 | CompatIDsLength: DWORD, | |
736 | Reserved: ULONG_PTR, | |
737 | SectionName: [CHAR; LINE_LEN], | |
738 | InfFileName: [CHAR; MAX_PATH], | |
739 | DrvDescription: [CHAR; LINE_LEN], | |
740 | HardwareID: [CHAR; ANYSIZE_ARRAY], | |
741 | }} | |
742 | pub type PSP_DRVINFO_DETAIL_DATA_A = *mut SP_DRVINFO_DETAIL_DATA_A; | |
8faf50e0 | 743 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DETAIL_DATA_W { |
ff7c6d11 XL |
744 | cbSize: DWORD, |
745 | InfDate: FILETIME, | |
746 | CompatIDsOffset: DWORD, | |
747 | CompatIDsLength: DWORD, | |
748 | Reserved: ULONG_PTR, | |
749 | SectionName: [WCHAR; LINE_LEN], | |
750 | InfFileName: [WCHAR; MAX_PATH], | |
751 | DrvDescription: [WCHAR; LINE_LEN], | |
752 | HardwareID: [WCHAR; ANYSIZE_ARRAY], | |
753 | }} | |
754 | pub type PSP_DRVINFO_DETAIL_DATA_W = *mut SP_DRVINFO_DETAIL_DATA_W; | |
8faf50e0 | 755 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINSTALL_PARAMS { |
ff7c6d11 XL |
756 | cbSize: DWORD, |
757 | Rank: DWORD, | |
758 | Flags: DWORD, | |
759 | PrivateData: DWORD_PTR, | |
760 | Reserved: DWORD, | |
761 | }} | |
762 | pub type PSP_DRVINSTALL_PARAMS = *mut SP_DRVINSTALL_PARAMS; | |
763 | pub const DNF_DUPDESC: DWORD = 0x00000001; | |
764 | pub const DNF_OLDDRIVER: DWORD = 0x00000002; | |
765 | pub const DNF_EXCLUDEFROMLIST: DWORD = 0x00000004; | |
766 | pub const DNF_NODRIVER: DWORD = 0x00000008; | |
767 | pub const DNF_LEGACYINF: DWORD = 0x00000010; | |
768 | pub const DNF_CLASS_DRIVER: DWORD = 0x00000020; | |
769 | pub const DNF_COMPATIBLE_DRIVER: DWORD = 0x00000040; | |
770 | pub const DNF_INET_DRIVER: DWORD = 0x00000080; | |
771 | pub const DNF_UNUSED1: DWORD = 0x00000100; | |
772 | pub const DNF_UNUSED2: DWORD = 0x00000200; | |
773 | pub const DNF_OLD_INET_DRIVER: DWORD = 0x00000400; | |
774 | pub const DNF_BAD_DRIVER: DWORD = 0x00000800; | |
775 | pub const DNF_DUPPROVIDER: DWORD = 0x00001000; | |
776 | pub const DNF_INF_IS_SIGNED: DWORD = 0x00002000; | |
777 | pub const DNF_OEM_F6_INF: DWORD = 0x00004000; | |
778 | pub const DNF_DUPDRIVERVER: DWORD = 0x00008000; | |
779 | pub const DNF_BASIC_DRIVER: DWORD = 0x00010000; | |
780 | pub const DNF_AUTHENTICODE_SIGNED: DWORD = 0x00020000; | |
781 | pub const DNF_INSTALLEDDRIVER: DWORD = 0x00040000; | |
782 | pub const DNF_ALWAYSEXCLUDEFROMLIST: DWORD = 0x00080000; | |
783 | pub const DNF_INBOX_DRIVER: DWORD = 0x00100000; | |
784 | pub const DNF_REQUESTADDITIONALSOFTWARE: DWORD = 0x00200000; | |
785 | pub const DNF_UNUSED_22: DWORD = 0x00400000; | |
786 | pub const DNF_UNUSED_23: DWORD = 0x00800000; | |
787 | pub const DNF_UNUSED_24: DWORD = 0x01000000; | |
788 | pub const DNF_UNUSED_25: DWORD = 0x02000000; | |
789 | pub const DNF_UNUSED_26: DWORD = 0x04000000; | |
790 | pub const DNF_UNUSED_27: DWORD = 0x08000000; | |
791 | pub const DNF_UNUSED_28: DWORD = 0x10000000; | |
792 | pub const DNF_UNUSED_29: DWORD = 0x20000000; | |
793 | pub const DNF_UNUSED_30: DWORD = 0x40000000; | |
794 | pub const DNF_UNUSED_31: DWORD = 0x80000000; | |
795 | pub const DRIVER_HARDWAREID_RANK: DWORD = 0x00000FFF; | |
796 | pub const DRIVER_HARDWAREID_MASK: DWORD = 0x80000FFF; | |
797 | pub const DRIVER_UNTRUSTED_RANK: DWORD = 0x80000000; | |
798 | pub const DRIVER_W9X_SUSPECT_RANK: DWORD = 0xC0000000; | |
799 | FN!{stdcall PSP_DETSIG_CMPPROC( | |
800 | DeviceInfoSet: HDEVINFO, | |
801 | NewDeviceData: PSP_DEVINFO_DATA, | |
802 | ExistingDeviceData: PSP_DEVINFO_DATA, | |
803 | CompareContext: PVOID, | |
804 | ) -> DWORD} | |
8faf50e0 | 805 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct COINSTALLER_CONTEXT_DATA { |
ff7c6d11 XL |
806 | PostProcessing: BOOL, |
807 | InstallResult: DWORD, | |
808 | PrivateData: PVOID, | |
809 | }} | |
810 | pub type PCOINSTALLER_CONTEXT_DATA = *mut COINSTALLER_CONTEXT_DATA; | |
8faf50e0 | 811 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_CLASSIMAGELIST_DATA { |
ff7c6d11 XL |
812 | cbSize: DWORD, |
813 | ImageList: HIMAGELIST, | |
814 | Reserved: ULONG_PTR, | |
815 | }} | |
816 | pub type PSP_CLASSIMAGELIST_DATA = *mut SP_CLASSIMAGELIST_DATA; | |
8faf50e0 | 817 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_PROPSHEETPAGE_REQUEST { |
ff7c6d11 XL |
818 | cbSize: DWORD, |
819 | PageRequested: DWORD, | |
820 | DeviceInfoSet: HDEVINFO, | |
821 | DeviceInfoData: PSP_DEVINFO_DATA, | |
822 | }} | |
823 | pub type PSP_PROPSHEETPAGE_REQUEST = *mut SP_PROPSHEETPAGE_REQUEST; | |
824 | pub const SPPSR_SELECT_DEVICE_RESOURCES: DWORD = 1; | |
825 | pub const SPPSR_ENUM_BASIC_DEVICE_PROPERTIES: DWORD = 2; | |
826 | pub const SPPSR_ENUM_ADV_DEVICE_PROPERTIES: DWORD = 3; | |
8faf50e0 | 827 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V2_A { |
ff7c6d11 XL |
828 | cbSize: DWORD, |
829 | FullInfPath: [CHAR; MAX_PATH], | |
830 | FilenameOffset: INT, | |
831 | ReinstallInstance: [CHAR; MAX_PATH], | |
832 | }} | |
833 | pub type PSP_BACKUP_QUEUE_PARAMS_V2_A = *mut SP_BACKUP_QUEUE_PARAMS_V2_A; | |
8faf50e0 | 834 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V2_W { |
ff7c6d11 XL |
835 | cbSize: DWORD, |
836 | FullInfPath: [WCHAR; MAX_PATH], | |
837 | FilenameOffset: INT, | |
838 | ReinstallInstance: [WCHAR; MAX_PATH], | |
839 | }} | |
840 | pub type PSP_BACKUP_QUEUE_PARAMS_V2_W = *mut SP_BACKUP_QUEUE_PARAMS_V2_W; | |
8faf50e0 | 841 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V1_A { |
ff7c6d11 XL |
842 | cbSize: DWORD, |
843 | FullInfPath: [CHAR; MAX_PATH], | |
844 | FilenameOffset: INT, | |
845 | }} | |
846 | pub type PSP_BACKUP_QUEUE_PARAMS_V1_A = *mut SP_BACKUP_QUEUE_PARAMS_V1_A; | |
8faf50e0 | 847 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V1_W { |
ff7c6d11 XL |
848 | cbSize: DWORD, |
849 | FullInfPath: [WCHAR; MAX_PATH], | |
850 | FilenameOffset: INT, | |
851 | }} | |
852 | pub type PSP_BACKUP_QUEUE_PARAMS_V1_W = *mut SP_BACKUP_QUEUE_PARAMS_V1_W; | |
853 | pub type SP_BACKUP_QUEUE_PARAMS_A = SP_BACKUP_QUEUE_PARAMS_V2_A; | |
854 | pub type PSP_BACKUP_QUEUE_PARAMS_A = PSP_BACKUP_QUEUE_PARAMS_V2_A; | |
855 | pub type SP_BACKUP_QUEUE_PARAMS_W = SP_BACKUP_QUEUE_PARAMS_V2_W; | |
856 | pub type PSP_BACKUP_QUEUE_PARAMS_W = PSP_BACKUP_QUEUE_PARAMS_V2_W; | |
857 | pub const ERROR_EXPECTED_SECTION_NAME: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0; | |
858 | pub const ERROR_BAD_SECTION_NAME_LINE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 1; | |
859 | pub const ERROR_SECTION_NAME_TOO_LONG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 2; | |
860 | pub const ERROR_GENERAL_SYNTAX: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 3; | |
861 | pub const ERROR_WRONG_INF_STYLE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x100; | |
862 | pub const ERROR_SECTION_NOT_FOUND: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x101; | |
863 | pub const ERROR_LINE_NOT_FOUND: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x102; | |
864 | pub const ERROR_NO_BACKUP: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x103; | |
865 | pub const ERROR_NO_ASSOCIATED_CLASS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x200; | |
866 | pub const ERROR_CLASS_MISMATCH: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x201; | |
867 | pub const ERROR_DUPLICATE_FOUND: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x202; | |
868 | pub const ERROR_NO_DRIVER_SELECTED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x203; | |
869 | pub const ERROR_KEY_DOES_NOT_EXIST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x204; | |
870 | pub const ERROR_INVALID_DEVINST_NAME: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
871 | | 0x205; | |
872 | pub const ERROR_INVALID_CLASS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x206; | |
873 | pub const ERROR_DEVINST_ALREADY_EXISTS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
874 | | 0x207; | |
875 | pub const ERROR_DEVINFO_NOT_REGISTERED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
876 | | 0x208; | |
877 | pub const ERROR_INVALID_REG_PROPERTY: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
878 | | 0x209; | |
879 | pub const ERROR_NO_INF: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20A; | |
880 | pub const ERROR_NO_SUCH_DEVINST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20B; | |
881 | pub const ERROR_CANT_LOAD_CLASS_ICON: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
882 | | 0x20C; | |
883 | pub const ERROR_INVALID_CLASS_INSTALLER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
884 | | 0x20D; | |
885 | pub const ERROR_DI_DO_DEFAULT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20E; | |
886 | pub const ERROR_DI_NOFILECOPY: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20F; | |
887 | pub const ERROR_INVALID_HWPROFILE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x210; | |
888 | pub const ERROR_NO_DEVICE_SELECTED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x211; | |
889 | pub const ERROR_DEVINFO_LIST_LOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x212; | |
890 | pub const ERROR_DEVINFO_DATA_LOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x213; | |
891 | pub const ERROR_DI_BAD_PATH: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x214; | |
892 | pub const ERROR_NO_CLASSINSTALL_PARAMS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
893 | | 0x215; | |
894 | pub const ERROR_FILEQUEUE_LOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x216; | |
895 | pub const ERROR_BAD_SERVICE_INSTALLSECT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
896 | | 0x217; | |
897 | pub const ERROR_NO_CLASS_DRIVER_LIST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
898 | | 0x218; | |
899 | pub const ERROR_NO_ASSOCIATED_SERVICE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
900 | | 0x219; | |
901 | pub const ERROR_NO_DEFAULT_DEVICE_INTERFACE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
902 | | 0x21A; | |
903 | pub const ERROR_DEVICE_INTERFACE_ACTIVE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
904 | | 0x21B; | |
905 | pub const ERROR_DEVICE_INTERFACE_REMOVED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
906 | | 0x21C; | |
907 | pub const ERROR_BAD_INTERFACE_INSTALLSECT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
908 | | 0x21D; | |
909 | pub const ERROR_NO_SUCH_INTERFACE_CLASS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
910 | | 0x21E; | |
911 | pub const ERROR_INVALID_REFERENCE_STRING: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
912 | | 0x21F; | |
913 | pub const ERROR_INVALID_MACHINENAME: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x220; | |
914 | pub const ERROR_REMOTE_COMM_FAILURE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x221; | |
915 | pub const ERROR_MACHINE_UNAVAILABLE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x222; | |
916 | pub const ERROR_NO_CONFIGMGR_SERVICES: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
917 | | 0x223; | |
918 | pub const ERROR_INVALID_PROPPAGE_PROVIDER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
919 | | 0x224; | |
920 | pub const ERROR_NO_SUCH_DEVICE_INTERFACE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
921 | | 0x225; | |
922 | pub const ERROR_DI_POSTPROCESSING_REQUIRED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
923 | | 0x226; | |
924 | pub const ERROR_INVALID_COINSTALLER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x227; | |
925 | pub const ERROR_NO_COMPAT_DRIVERS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x228; | |
926 | pub const ERROR_NO_DEVICE_ICON: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x229; | |
927 | pub const ERROR_INVALID_INF_LOGCONFIG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
928 | | 0x22A; | |
929 | pub const ERROR_DI_DONT_INSTALL: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x22B; | |
930 | pub const ERROR_INVALID_FILTER_DRIVER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
931 | | 0x22C; | |
932 | pub const ERROR_NON_WINDOWS_NT_DRIVER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
933 | | 0x22D; | |
934 | pub const ERROR_NON_WINDOWS_DRIVER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x22E; | |
935 | pub const ERROR_NO_CATALOG_FOR_OEM_INF: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
936 | | 0x22F; | |
937 | pub const ERROR_DEVINSTALL_QUEUE_NONNATIVE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
938 | | 0x230; | |
939 | pub const ERROR_NOT_DISABLEABLE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x231; | |
940 | pub const ERROR_CANT_REMOVE_DEVINST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x232; | |
941 | pub const ERROR_INVALID_TARGET: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x233; | |
942 | pub const ERROR_DRIVER_NONNATIVE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x234; | |
943 | pub const ERROR_IN_WOW64: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x235; | |
944 | pub const ERROR_SET_SYSTEM_RESTORE_POINT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
945 | | 0x236; | |
946 | pub const ERROR_SCE_DISABLED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x238; | |
947 | pub const ERROR_UNKNOWN_EXCEPTION: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x239; | |
948 | pub const ERROR_PNP_REGISTRY_ERROR: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x23A; | |
949 | pub const ERROR_REMOTE_REQUEST_UNSUPPORTED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
950 | | 0x23B; | |
951 | pub const ERROR_NOT_AN_INSTALLED_OEM_INF: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
952 | | 0x23C; | |
953 | pub const ERROR_INF_IN_USE_BY_DEVICES: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
954 | | 0x23D; | |
955 | pub const ERROR_DI_FUNCTION_OBSOLETE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
956 | | 0x23E; | |
957 | pub const ERROR_NO_AUTHENTICODE_CATALOG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
958 | | 0x23F; | |
959 | pub const ERROR_AUTHENTICODE_DISALLOWED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
960 | | 0x240; | |
961 | pub const ERROR_AUTHENTICODE_TRUSTED_PUBLISHER: DWORD = APPLICATION_ERROR_MASK | |
962 | | ERROR_SEVERITY_ERROR | 0x241; | |
963 | pub const ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED: DWORD = APPLICATION_ERROR_MASK | |
964 | | ERROR_SEVERITY_ERROR | 0x242; | |
965 | pub const ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED: DWORD = APPLICATION_ERROR_MASK | |
966 | | ERROR_SEVERITY_ERROR | 0x243; | |
967 | pub const ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH: DWORD = APPLICATION_ERROR_MASK | |
968 | | ERROR_SEVERITY_ERROR | 0x244; | |
969 | pub const ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE: DWORD = APPLICATION_ERROR_MASK | |
970 | | ERROR_SEVERITY_ERROR | 0x245; | |
971 | pub const ERROR_DEVICE_INSTALLER_NOT_READY: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
972 | | 0x246; | |
973 | pub const ERROR_DRIVER_STORE_ADD_FAILED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
974 | | 0x247; | |
975 | pub const ERROR_DEVICE_INSTALL_BLOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
976 | | 0x248; | |
977 | pub const ERROR_DRIVER_INSTALL_BLOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
978 | | 0x249; | |
979 | pub const ERROR_WRONG_INF_TYPE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x24A; | |
980 | pub const ERROR_FILE_HASH_NOT_IN_CATALOG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
981 | | 0x24B; | |
982 | pub const ERROR_DRIVER_STORE_DELETE_FAILED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
983 | | 0x24C; | |
984 | pub const ERROR_UNRECOVERABLE_STACK_OVERFLOW: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
985 | | 0x300; | |
986 | pub const EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW: DWORD = ERROR_UNRECOVERABLE_STACK_OVERFLOW; | |
987 | pub const ERROR_NO_DEFAULT_INTERFACE_DEVICE: DWORD = ERROR_NO_DEFAULT_DEVICE_INTERFACE; | |
988 | pub const ERROR_INTERFACE_DEVICE_ACTIVE: DWORD = ERROR_DEVICE_INTERFACE_ACTIVE; | |
989 | pub const ERROR_INTERFACE_DEVICE_REMOVED: DWORD = ERROR_DEVICE_INTERFACE_REMOVED; | |
990 | pub const ERROR_NO_SUCH_INTERFACE_DEVICE: DWORD = ERROR_NO_SUCH_DEVICE_INTERFACE; | |
991 | pub const ERROR_NOT_INSTALLED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | |
992 | | 0x1000; | |
993 | extern "system" { | |
994 | pub fn SetupGetInfInformationA( | |
995 | InfSpec: LPCVOID, | |
996 | SearchControl: DWORD, | |
997 | ReturnBuffer: PSP_INF_INFORMATION, | |
998 | ReturnBufferSize: DWORD, | |
999 | RequiredSize: PDWORD, | |
1000 | ) -> BOOL; | |
1001 | pub fn SetupGetInfInformationW( | |
1002 | InfSpec: LPCVOID, | |
1003 | SearchControl: DWORD, | |
1004 | ReturnBuffer: PSP_INF_INFORMATION, | |
1005 | ReturnBufferSize: DWORD, | |
1006 | RequiredSize: PDWORD, | |
1007 | ) -> BOOL; | |
1008 | } | |
1009 | pub const INFINFO_INF_SPEC_IS_HINF: DWORD = 1; | |
1010 | pub const INFINFO_INF_NAME_IS_ABSOLUTE: DWORD = 2; | |
1011 | pub const INFINFO_DEFAULT_SEARCH: DWORD = 3; | |
1012 | pub const INFINFO_REVERSE_DEFAULT_SEARCH: DWORD = 4; | |
1013 | pub const INFINFO_INF_PATH_LIST_SEARCH: DWORD = 5; | |
1014 | extern "system" { | |
1015 | pub fn SetupQueryInfFileInformationA( | |
1016 | InfInformation: PSP_INF_INFORMATION, | |
1017 | InfIndex: UINT, | |
1018 | ReturnBuffer: PSTR, | |
1019 | ReturnBufferSize: DWORD, | |
1020 | RequiredSize: PDWORD, | |
1021 | ) -> BOOL; | |
1022 | pub fn SetupQueryInfFileInformationW( | |
1023 | InfInformation: PSP_INF_INFORMATION, | |
1024 | InfIndex: UINT, | |
1025 | ReturnBuffer: PWSTR, | |
1026 | ReturnBufferSize: DWORD, | |
1027 | RequiredSize: PDWORD, | |
1028 | ) -> BOOL; | |
1029 | pub fn SetupQueryInfOriginalFileInformationA( | |
1030 | InfInformation: PSP_INF_INFORMATION, | |
1031 | InfIndex: UINT, | |
1032 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
1033 | OriginalFileInfo: PSP_ORIGINAL_FILE_INFO_A, | |
1034 | ) -> BOOL; | |
1035 | pub fn SetupQueryInfOriginalFileInformationW( | |
1036 | InfInformation: PSP_INF_INFORMATION, | |
1037 | InfIndex: UINT, | |
1038 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
1039 | OriginalFileInfo: PSP_ORIGINAL_FILE_INFO_W, | |
1040 | ) -> BOOL; | |
1041 | pub fn SetupQueryInfVersionInformationA( | |
1042 | InfInformation: PSP_INF_INFORMATION, | |
1043 | InfIndex: UINT, | |
1044 | Key: PCSTR, | |
1045 | ReturnBuffer: PSTR, | |
1046 | ReturnBufferSize: DWORD, | |
1047 | RequiredSize: PDWORD, | |
1048 | ) -> BOOL; | |
1049 | pub fn SetupQueryInfVersionInformationW( | |
1050 | InfInformation: PSP_INF_INFORMATION, | |
1051 | InfIndex: UINT, | |
1052 | Key: PCWSTR, | |
1053 | ReturnBuffer: PWSTR, | |
1054 | ReturnBufferSize: DWORD, | |
1055 | RequiredSize: PDWORD, | |
1056 | ) -> BOOL; | |
1057 | pub fn SetupGetInfDriverStoreLocationA( | |
1058 | FileName: PCSTR, | |
1059 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
1060 | LocaleName: PCSTR, | |
1061 | ReturnBuffer: PSTR, | |
1062 | ReturnBufferSize: DWORD, | |
1063 | RequiredSize: PDWORD, | |
1064 | ) -> BOOL; | |
1065 | pub fn SetupGetInfDriverStoreLocationW( | |
1066 | FileName: PCWSTR, | |
1067 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
1068 | LocaleName: PCWSTR, | |
1069 | ReturnBuffer: PWSTR, | |
1070 | ReturnBufferSize: DWORD, | |
1071 | RequiredSize: PDWORD, | |
1072 | ) -> BOOL; | |
1073 | pub fn SetupGetInfPublishedNameA( | |
1074 | DriverStoreLocation: PCSTR, | |
1075 | ReturnBuffer: PSTR, | |
1076 | ReturnBufferSize: DWORD, | |
1077 | RequiredSize: PDWORD, | |
1078 | ) -> BOOL; | |
1079 | pub fn SetupGetInfPublishedNameW( | |
1080 | DriverStoreLocation: PCWSTR, | |
1081 | ReturnBuffer: PWSTR, | |
1082 | ReturnBufferSize: DWORD, | |
1083 | RequiredSize: PDWORD, | |
1084 | ) -> BOOL; | |
1085 | pub fn SetupGetInfFileListA( | |
1086 | DirectoryPath: PCSTR, | |
1087 | InfStyle: DWORD, | |
1088 | ReturnBuffer: PSTR, | |
1089 | ReturnBufferSize: DWORD, | |
1090 | RequiredSize: PDWORD, | |
1091 | ) -> BOOL; | |
1092 | pub fn SetupGetInfFileListW( | |
1093 | DirectoryPath: PCWSTR, | |
1094 | InfStyle: DWORD, | |
1095 | ReturnBuffer: PWSTR, | |
1096 | ReturnBufferSize: DWORD, | |
1097 | RequiredSize: PDWORD, | |
1098 | ) -> BOOL; | |
1099 | pub fn SetupOpenInfFileW( | |
1100 | FileName: PCWSTR, | |
1101 | InfClass: PCWSTR, | |
1102 | InfStyle: DWORD, | |
1103 | ErrorLine: PUINT, | |
1104 | ) -> HINF; | |
1105 | pub fn SetupOpenInfFileA( | |
1106 | FileName: PCSTR, | |
1107 | InfClass: PCSTR, | |
1108 | InfStyle: DWORD, | |
1109 | ErrorLine: PUINT, | |
1110 | ) -> HINF; | |
1111 | pub fn SetupOpenMasterInf() -> HINF; | |
1112 | pub fn SetupOpenAppendInfFileW( | |
1113 | FileName: PCWSTR, | |
1114 | InfHandle: HINF, | |
1115 | ErrorLine: PUINT, | |
1116 | ) -> BOOL; | |
1117 | pub fn SetupOpenAppendInfFileA( | |
1118 | FileName: PCSTR, | |
1119 | InfHandle: HINF, | |
1120 | ErrorLine: PUINT, | |
1121 | ) -> BOOL; | |
1122 | pub fn SetupCloseInfFile( | |
1123 | InfHandle: HINF, | |
1124 | ) -> (); | |
1125 | pub fn SetupFindFirstLineA( | |
1126 | InfHandle: HINF, | |
1127 | Section: PCSTR, | |
1128 | Key: PCSTR, | |
1129 | Context: PINFCONTEXT, | |
1130 | ) -> BOOL; | |
1131 | pub fn SetupFindFirstLineW( | |
1132 | InfHandle: HINF, | |
1133 | Section: PCWSTR, | |
1134 | Key: PCWSTR, | |
1135 | Context: PINFCONTEXT, | |
1136 | ) -> BOOL; | |
1137 | pub fn SetupFindNextLine( | |
1138 | ContextIn: PINFCONTEXT, | |
1139 | ContextOut: PINFCONTEXT, | |
1140 | ) -> BOOL; | |
1141 | pub fn SetupFindNextMatchLineA( | |
1142 | ContextIn: PINFCONTEXT, | |
1143 | Key: PCSTR, | |
1144 | ContextOut: PINFCONTEXT, | |
1145 | ) -> BOOL; | |
1146 | pub fn SetupFindNextMatchLineW( | |
1147 | ContextIn: PINFCONTEXT, | |
1148 | Key: PCWSTR, | |
1149 | ContextOut: PINFCONTEXT, | |
1150 | ) -> BOOL; | |
1151 | pub fn SetupGetLineByIndexA( | |
1152 | InfHandle: HINF, | |
1153 | Section: PCSTR, | |
1154 | Index: DWORD, | |
1155 | Context: PINFCONTEXT, | |
1156 | ) -> BOOL; | |
1157 | pub fn SetupGetLineByIndexW( | |
1158 | InfHandle: HINF, | |
1159 | Section: PCWSTR, | |
1160 | Index: DWORD, | |
1161 | Context: PINFCONTEXT, | |
1162 | ) -> BOOL; | |
1163 | pub fn SetupGetLineCountA( | |
1164 | InfHandle: HINF, | |
1165 | Section: PCSTR, | |
1166 | ) -> LONG; | |
1167 | pub fn SetupGetLineCountW( | |
1168 | InfHandle: HINF, | |
1169 | Section: PCWSTR, | |
1170 | ) -> LONG; | |
1171 | pub fn SetupGetLineTextA( | |
1172 | Context: PINFCONTEXT, | |
1173 | InfHandle: HINF, | |
1174 | Section: PCSTR, | |
1175 | Key: PCSTR, | |
1176 | ReturnBuffer: PSTR, | |
1177 | ReturnBufferSize: DWORD, | |
1178 | ReturnBufferSize: PDWORD, | |
1179 | ) -> BOOL; | |
1180 | pub fn SetupGetLineTextW( | |
1181 | Context: PINFCONTEXT, | |
1182 | InfHandle: HINF, | |
1183 | Section: PCWSTR, | |
1184 | Key: PCWSTR, | |
1185 | ReturnBuffer: PWSTR, | |
1186 | ReturnBufferSize: DWORD, | |
1187 | ReturnBufferSize: PDWORD, | |
1188 | ) -> BOOL; | |
1189 | pub fn SetupGetFieldCount( | |
1190 | Context: PINFCONTEXT, | |
1191 | ) -> DWORD; | |
1192 | pub fn SetupGetStringFieldA( | |
1193 | Context: PINFCONTEXT, | |
1194 | FieldIndex: DWORD, | |
1195 | ReturnBuffer: PSTR, | |
1196 | ReturnBufferSize: DWORD, | |
1197 | RequiredSize: PDWORD, | |
1198 | ) -> BOOL; | |
1199 | pub fn SetupGetStringFieldW( | |
1200 | Context: PINFCONTEXT, | |
1201 | FieldIndex: DWORD, | |
1202 | ReturnBuffer: PWSTR, | |
1203 | ReturnBufferSize: DWORD, | |
1204 | RequiredSize: PDWORD, | |
1205 | ) -> BOOL; | |
1206 | pub fn SetupGetIntField( | |
1207 | Context: PINFCONTEXT, | |
1208 | FieldIndex: DWORD, | |
1209 | IntegerValue: PINT, | |
1210 | ) -> BOOL; | |
1211 | pub fn SetupGetMultiSzFieldA( | |
1212 | Context: PINFCONTEXT, | |
1213 | FieldIndex: DWORD, | |
1214 | ReturnBuffer: PSTR, | |
1215 | ReturnBufferSize: DWORD, | |
1216 | RequiredSize: LPDWORD, | |
1217 | ) -> BOOL; | |
1218 | pub fn SetupGetMultiSzFieldW( | |
1219 | Context: PINFCONTEXT, | |
1220 | FieldIndex: DWORD, | |
1221 | ReturnBuffer: PWSTR, | |
1222 | ReturnBufferSize: DWORD, | |
1223 | RequiredSize: LPDWORD, | |
1224 | ) -> BOOL; | |
1225 | pub fn SetupGetBinaryField( | |
1226 | Context: PINFCONTEXT, | |
1227 | FieldIndex: DWORD, | |
1228 | ReturnBuffer: PBYTE, | |
1229 | ReturnBufferSize: DWORD, | |
1230 | RequiredSize: LPDWORD, | |
1231 | ) -> BOOL; | |
1232 | pub fn SetupGetFileCompressionInfoA( | |
1233 | SourceFileName: PCSTR, | |
1234 | ActualSourceFileName: *mut PSTR, | |
1235 | SourceFileSize: PDWORD, | |
1236 | TargetFileSize: PDWORD, | |
1237 | CompressionType: PUINT, | |
1238 | ) -> DWORD; | |
1239 | pub fn SetupGetFileCompressionInfoW( | |
1240 | SourceFileName: PCWSTR, | |
1241 | ActualSourceFileName: *mut PWSTR, | |
1242 | SourceFileSize: PDWORD, | |
1243 | TargetFileSize: PDWORD, | |
1244 | CompressionType: PUINT, | |
1245 | ) -> DWORD; | |
1246 | pub fn SetupGetFileCompressionInfoExA( | |
1247 | SourceFileName: PCSTR, | |
1248 | ActualSourceFileNameBuffer: PSTR, | |
1249 | ActualSourceFileNameBufferLen: DWORD, | |
1250 | RequiredBufferLen: PDWORD, | |
1251 | SourceFileSize: PDWORD, | |
1252 | TargetFileSize: PDWORD, | |
1253 | CompressionType: PUINT, | |
1254 | ) -> BOOL; | |
1255 | pub fn SetupGetFileCompressionInfoExW( | |
1256 | SourceFileName: PCWSTR, | |
1257 | ActualSourceFileNameBuffer: PWSTR, | |
1258 | ActualSourceFileNameBufferLen: DWORD, | |
1259 | RequiredBufferLen: PDWORD, | |
1260 | SourceFileSize: PDWORD, | |
1261 | TargetFileSize: PDWORD, | |
1262 | CompressionType: PUINT, | |
1263 | ) -> BOOL; | |
1264 | } | |
1265 | pub const FILE_COMPRESSION_NONE: UINT = 0; | |
1266 | pub const FILE_COMPRESSION_WINLZA: UINT = 1; | |
1267 | pub const FILE_COMPRESSION_MSZIP: UINT = 2; | |
1268 | pub const FILE_COMPRESSION_NTCAB: UINT = 3; | |
1269 | extern "system" { | |
1270 | pub fn SetupDecompressOrCopyFileA( | |
1271 | SourceFileName: PCSTR, | |
1272 | TargetFileName: PCSTR, | |
1273 | CompressionType: PUINT, | |
1274 | ) -> DWORD; | |
1275 | pub fn SetupDecompressOrCopyFileW( | |
1276 | SourceFileName: PCWSTR, | |
1277 | TargetFileName: PCWSTR, | |
1278 | CompressionType: PUINT, | |
1279 | ) -> DWORD; | |
1280 | pub fn SetupGetSourceFileLocationA( | |
1281 | InfHandle: HINF, | |
1282 | InfContext: PINFCONTEXT, | |
1283 | FileName: PCSTR, | |
1284 | SourceId: PUINT, | |
1285 | ReturnBuffer: PSTR, | |
1286 | ReturnBufferSize: DWORD, | |
1287 | RequiredSize: PDWORD, | |
1288 | ) -> BOOL; | |
1289 | pub fn SetupGetSourceFileLocationW( | |
1290 | InfHandle: HINF, | |
1291 | InfContext: PINFCONTEXT, | |
1292 | FileName: PCWSTR, | |
1293 | SourceId: PUINT, | |
1294 | ReturnBuffer: PWSTR, | |
1295 | ReturnBufferSize: DWORD, | |
1296 | RequiredSize: PDWORD, | |
1297 | ) -> BOOL; | |
1298 | pub fn SetupGetSourceFileSizeA( | |
1299 | InfHandle: HINF, | |
1300 | InfContext: PINFCONTEXT, | |
1301 | FileName: PCSTR, | |
1302 | Section: PCSTR, | |
1303 | FileSize: PDWORD, | |
1304 | RoundingFactor: UINT, | |
1305 | ) -> BOOL; | |
1306 | pub fn SetupGetSourceFileSizeW( | |
1307 | InfHandle: HINF, | |
1308 | InfContext: PINFCONTEXT, | |
1309 | FileName: PCWSTR, | |
1310 | Section: PCWSTR, | |
1311 | FileSize: PDWORD, | |
1312 | RoundingFactor: UINT, | |
1313 | ) -> BOOL; | |
1314 | pub fn SetupGetTargetPathA( | |
1315 | InfHandle: HINF, | |
1316 | InfContext: PINFCONTEXT, | |
1317 | Section: PCSTR, | |
1318 | ReturnBuffer: PSTR, | |
1319 | ReturnBufferSize: DWORD, | |
1320 | RequiredSize: PDWORD, | |
1321 | ) -> BOOL; | |
1322 | pub fn SetupGetTargetPathW( | |
1323 | InfHandle: HINF, | |
1324 | InfContext: PINFCONTEXT, | |
1325 | Section: PCWSTR, | |
1326 | ReturnBuffer: PWSTR, | |
1327 | ReturnBufferSize: DWORD, | |
1328 | RequiredSize: PDWORD, | |
1329 | ) -> BOOL; | |
1330 | } | |
1331 | pub const SRCLIST_TEMPORARY: DWORD = 0x00000001; | |
1332 | pub const SRCLIST_NOBROWSE: DWORD = 0x00000002; | |
1333 | pub const SRCLIST_SYSTEM: DWORD = 0x00000010; | |
1334 | pub const SRCLIST_USER: DWORD = 0x00000020; | |
1335 | pub const SRCLIST_SYSIFADMIN: DWORD = 0x00000040; | |
1336 | pub const SRCLIST_SUBDIRS: DWORD = 0x00000100; | |
1337 | pub const SRCLIST_APPEND: DWORD = 0x00000200; | |
1338 | pub const SRCLIST_NOSTRIPPLATFORM: DWORD = 0x00000400; | |
1339 | extern "system" { | |
1340 | pub fn SetupSetSourceListA( | |
1341 | Flags: DWORD, | |
1342 | SourceList: *mut PCSTR, | |
1343 | SourceCount: UINT, | |
1344 | ) -> BOOL; | |
1345 | pub fn SetupSetSourceListW( | |
1346 | Flags: DWORD, | |
1347 | SourceList: *mut PCWSTR, | |
1348 | SourceCount: UINT, | |
1349 | ) -> BOOL; | |
1350 | pub fn SetupCancelTemporarySourceList() -> BOOL; | |
1351 | pub fn SetupAddToSourceListA( | |
1352 | Flags: DWORD, | |
1353 | Source: PCSTR, | |
1354 | ) -> BOOL; | |
1355 | pub fn SetupAddToSourceListW( | |
1356 | Flags: DWORD, | |
1357 | Source: PCWSTR, | |
1358 | ) -> BOOL; | |
1359 | pub fn SetupRemoveFromSourceListA( | |
1360 | Flags: DWORD, | |
1361 | Source: PCSTR, | |
1362 | ) -> BOOL; | |
1363 | pub fn SetupRemoveFromSourceListW( | |
1364 | Flags: DWORD, | |
1365 | Source: PCWSTR, | |
1366 | ) -> BOOL; | |
1367 | pub fn SetupQuerySourceListA( | |
1368 | Flags: DWORD, | |
1369 | List: *mut *mut PCSTR, | |
1370 | Count: PUINT, | |
1371 | ) -> BOOL; | |
1372 | pub fn SetupQuerySourceListW( | |
1373 | Flags: DWORD, | |
1374 | List: *mut *mut PCWSTR, | |
1375 | Count: PUINT, | |
1376 | ) -> BOOL; | |
1377 | pub fn SetupFreeSourceListA( | |
1378 | List: *mut *mut PCSTR, | |
1379 | Count: UINT, | |
1380 | ) -> BOOL; | |
1381 | pub fn SetupFreeSourceListW( | |
1382 | List: *mut *mut PCWSTR, | |
1383 | Count: UINT, | |
1384 | ) -> BOOL; | |
1385 | pub fn SetupPromptForDiskA( | |
1386 | hwndParent: HWND, | |
1387 | DialogTitle: PCSTR, | |
1388 | DiskName: PCSTR, | |
1389 | PathToSource: PCSTR, | |
1390 | FileSought: PCSTR, | |
1391 | TagFile: PCSTR, | |
1392 | DiskPromptStyle: DWORD, | |
1393 | PathBuffer: PSTR, | |
1394 | PathBufferSize: DWORD, | |
1395 | PathRequiredSize: PDWORD, | |
1396 | ) -> UINT; | |
1397 | pub fn SetupPromptForDiskW( | |
1398 | hwndParent: HWND, | |
1399 | DialogTitle: PCWSTR, | |
1400 | DiskName: PCWSTR, | |
1401 | PathToSource: PCWSTR, | |
1402 | FileSought: PCWSTR, | |
1403 | TagFile: PCWSTR, | |
1404 | DiskPromptStyle: DWORD, | |
1405 | PathBuffer: PWSTR, | |
1406 | PathBufferSize: DWORD, | |
1407 | PathRequiredSize: PDWORD, | |
1408 | ) -> UINT; | |
1409 | pub fn SetupCopyErrorA( | |
1410 | hwndParent: HWND, | |
1411 | DialogTitle: PCSTR, | |
1412 | DiskName: PCSTR, | |
1413 | PathToSource: PCSTR, | |
1414 | SourceFile: PCSTR, | |
1415 | TargetPathFile: PCSTR, | |
1416 | Win32ErrorCode: UINT, | |
1417 | Style: DWORD, | |
1418 | PathBuffer: PSTR, | |
1419 | PathBufferSize: DWORD, | |
1420 | PathRequiredSize: PDWORD, | |
1421 | ) -> UINT; | |
1422 | pub fn SetupCopyErrorW( | |
1423 | hwndParent: HWND, | |
1424 | DialogTitle: PCWSTR, | |
1425 | DiskName: PCWSTR, | |
1426 | PathToSource: PCWSTR, | |
1427 | SourceFile: PCWSTR, | |
1428 | TargetPathFile: PCWSTR, | |
1429 | Win32ErrorCode: UINT, | |
1430 | Style: DWORD, | |
1431 | PathBuffer: PWSTR, | |
1432 | PathBufferSize: DWORD, | |
1433 | PathRequiredSize: PDWORD, | |
1434 | ) -> UINT; | |
1435 | pub fn SetupRenameErrorA( | |
1436 | hwndParent: HWND, | |
1437 | DialogTitle: PCSTR, | |
1438 | SourceFile: PCSTR, | |
1439 | TargetFile: PCSTR, | |
1440 | Win32ErrorCode: UINT, | |
1441 | Style: DWORD, | |
1442 | ) -> UINT; | |
1443 | pub fn SetupRenameErrorW( | |
1444 | hwndParent: HWND, | |
1445 | DialogTitle: PCWSTR, | |
1446 | SourceFile: PCWSTR, | |
1447 | TargetFile: PCWSTR, | |
1448 | Win32ErrorCode: UINT, | |
1449 | Style: DWORD, | |
1450 | ) -> UINT; | |
1451 | pub fn SetupDeleteErrorA( | |
1452 | hwndParent: HWND, | |
1453 | DialogTitle: PCSTR, | |
1454 | File: PCSTR, | |
1455 | Win32ErrorCode: UINT, | |
1456 | Style: DWORD, | |
1457 | ) -> UINT; | |
1458 | pub fn SetupDeleteErrorW( | |
1459 | hwndParent: HWND, | |
1460 | DialogTitle: PCWSTR, | |
1461 | File: PCWSTR, | |
1462 | Win32ErrorCode: UINT, | |
1463 | Style: DWORD, | |
1464 | ) -> UINT; | |
1465 | pub fn SetupBackupErrorA( | |
1466 | hwndParent: HWND, | |
1467 | DialogTitle: PCSTR, | |
1468 | SourceFile: PCSTR, | |
1469 | TargetFile: PCSTR, | |
1470 | Win32ErrorCode: UINT, | |
1471 | Style: DWORD, | |
1472 | ) -> UINT; | |
1473 | pub fn SetupBackupErrorW( | |
1474 | hwndParent: HWND, | |
1475 | DialogTitle: PCWSTR, | |
1476 | SourceFile: PCWSTR, | |
1477 | TargetFile: PCWSTR, | |
1478 | Win32ErrorCode: UINT, | |
1479 | Style: DWORD, | |
1480 | ) -> UINT; | |
1481 | } | |
1482 | pub const IDF_NOBROWSE: DWORD = 0x00000001; | |
1483 | pub const IDF_NOSKIP: DWORD = 0x00000002; | |
1484 | pub const IDF_NODETAILS: DWORD = 0x00000004; | |
1485 | pub const IDF_NOCOMPRESSED: DWORD = 0x00000008; | |
1486 | pub const IDF_CHECKFIRST: DWORD = 0x00000100; | |
1487 | pub const IDF_NOBEEP: DWORD = 0x00000200; | |
1488 | pub const IDF_NOFOREGROUND: DWORD = 0x00000400; | |
1489 | pub const IDF_WARNIFSKIP: DWORD = 0x00000800; | |
1490 | pub const IDF_NOREMOVABLEMEDIAPROMPT: DWORD = 0x00001000; | |
1491 | pub const IDF_USEDISKNAMEASPROMPT: DWORD = 0x00002000; | |
1492 | pub const IDF_OEMDISK: DWORD = 0x80000000; | |
1493 | pub const DPROMPT_SUCCESS: UINT = 0; | |
1494 | pub const DPROMPT_CANCEL: UINT = 1; | |
1495 | pub const DPROMPT_SKIPFILE: UINT = 2; | |
1496 | pub const DPROMPT_BUFFERTOOSMALL: UINT = 3; | |
1497 | pub const DPROMPT_OUTOFMEMORY: UINT = 4; | |
1498 | extern "system" { | |
1499 | pub fn SetupSetDirectoryIdA( | |
1500 | InfHandle: HINF, | |
1501 | Id: DWORD, | |
1502 | Directory: PCSTR, | |
1503 | ) -> BOOL; | |
1504 | pub fn SetupSetDirectoryIdW( | |
1505 | InfHandle: HINF, | |
1506 | Id: DWORD, | |
1507 | Directory: PCWSTR, | |
1508 | ) -> BOOL; | |
1509 | pub fn SetupSetDirectoryIdExA( | |
1510 | InfHandle: HINF, | |
1511 | Id: DWORD, | |
1512 | Directory: PCSTR, | |
1513 | Flags: DWORD, | |
1514 | Reserved1: DWORD, | |
1515 | Reserved2: PVOID, | |
1516 | ) -> BOOL; | |
1517 | pub fn SetupSetDirectoryIdExW( | |
1518 | InfHandle: HINF, | |
1519 | Id: DWORD, | |
1520 | Directory: PCWSTR, | |
1521 | Flags: DWORD, | |
1522 | Reserved1: DWORD, | |
1523 | Reserved2: PVOID, | |
1524 | ) -> BOOL; | |
1525 | } | |
1526 | pub const SETDIRID_NOT_FULL_PATH: DWORD = 0x00000001; | |
1527 | extern "system" { | |
1528 | pub fn SetupGetSourceInfoA( | |
1529 | InfHandle: HINF, | |
1530 | SourceId: UINT, | |
1531 | InfoDesired: UINT, | |
1532 | ReturnBuffer: PSTR, | |
1533 | ReturnBufferSize: DWORD, | |
1534 | RequiredSize: PDWORD, | |
1535 | ) -> BOOL; | |
1536 | pub fn SetupGetSourceInfoW( | |
1537 | InfHandle: HINF, | |
1538 | SourceId: UINT, | |
1539 | InfoDesired: UINT, | |
1540 | ReturnBuffer: PWSTR, | |
1541 | ReturnBufferSize: DWORD, | |
1542 | RequiredSize: PDWORD, | |
1543 | ) -> BOOL; | |
1544 | } | |
1545 | pub const SRCINFO_PATH: UINT = 1; | |
1546 | pub const SRCINFO_TAGFILE: UINT = 2; | |
1547 | pub const SRCINFO_DESCRIPTION: UINT = 3; | |
1548 | pub const SRCINFO_FLAGS: UINT = 4; | |
1549 | pub const SRCINFO_TAGFILE2: UINT = 4; | |
1550 | pub const SRC_FLAGS_CABFILE: UINT = 0x0010; | |
1551 | extern "system" { | |
1552 | pub fn SetupInstallFileA( | |
1553 | InfHandle: HINF, | |
1554 | InfContext: PINFCONTEXT, | |
1555 | SourceFile: PCSTR, | |
1556 | SourcePathRoot: PCSTR, | |
1557 | DestinationName: PCSTR, | |
1558 | CopyStyle: DWORD, | |
1559 | CopyMsgHandler: PSP_FILE_CALLBACK_A, | |
1560 | Context: PVOID, | |
1561 | ) -> BOOL; | |
1562 | pub fn SetupInstallFileW( | |
1563 | InfHandle: HINF, | |
1564 | InfContext: PINFCONTEXT, | |
1565 | SourceFile: PCWSTR, | |
1566 | SourcePathRoot: PCWSTR, | |
1567 | DestinationName: PCWSTR, | |
1568 | CopyStyle: DWORD, | |
1569 | CopyMsgHandler: PSP_FILE_CALLBACK_W, | |
1570 | Context: PVOID, | |
1571 | ) -> BOOL; | |
1572 | pub fn SetupInstallFileExA( | |
1573 | InfHandle: HINF, | |
1574 | InfContext: PINFCONTEXT, | |
1575 | SourceFile: PCSTR, | |
1576 | SourcePathRoot: PCSTR, | |
1577 | DestinationName: PCSTR, | |
1578 | CopyStyle: DWORD, | |
1579 | CopyMsgHandler: PSP_FILE_CALLBACK_A, | |
1580 | Context: PVOID, | |
1581 | FileWasInUse: PBOOL, | |
1582 | ) -> BOOL; | |
1583 | pub fn SetupInstallFileExW( | |
1584 | InfHandle: HINF, | |
1585 | InfContext: PINFCONTEXT, | |
1586 | SourceFile: PCWSTR, | |
1587 | SourcePathRoot: PCWSTR, | |
1588 | DestinationName: PCWSTR, | |
1589 | CopyStyle: DWORD, | |
1590 | CopyMsgHandler: PSP_FILE_CALLBACK_W, | |
1591 | Context: PVOID, | |
1592 | FileWasInUse: PBOOL, | |
1593 | ) -> BOOL; | |
1594 | } | |
1595 | pub const SP_COPY_DELETESOURCE: DWORD = 0x0000001; | |
1596 | pub const SP_COPY_REPLACEONLY: DWORD = 0x0000002; | |
1597 | pub const SP_COPY_NEWER: DWORD = 0x0000004; | |
1598 | pub const SP_COPY_NEWER_OR_SAME: DWORD = SP_COPY_NEWER; | |
1599 | pub const SP_COPY_NOOVERWRITE: DWORD = 0x0000008; | |
1600 | pub const SP_COPY_NODECOMP: DWORD = 0x0000010; | |
1601 | pub const SP_COPY_LANGUAGEAWARE: DWORD = 0x0000020; | |
1602 | pub const SP_COPY_SOURCE_ABSOLUTE: DWORD = 0x0000040; | |
1603 | pub const SP_COPY_SOURCEPATH_ABSOLUTE: DWORD = 0x0000080; | |
1604 | pub const SP_COPY_IN_USE_NEEDS_REBOOT: DWORD = 0x0000100; | |
1605 | pub const SP_COPY_FORCE_IN_USE: DWORD = 0x0000200; | |
1606 | pub const SP_COPY_NOSKIP: DWORD = 0x0000400; | |
1607 | pub const SP_FLAG_CABINETCONTINUATION: DWORD = 0x0000800; | |
1608 | pub const SP_COPY_FORCE_NOOVERWRITE: DWORD = 0x0001000; | |
1609 | pub const SP_COPY_FORCE_NEWER: DWORD = 0x0002000; | |
1610 | pub const SP_COPY_WARNIFSKIP: DWORD = 0x0004000; | |
1611 | pub const SP_COPY_NOBROWSE: DWORD = 0x0008000; | |
1612 | pub const SP_COPY_NEWER_ONLY: DWORD = 0x0010000; | |
1613 | pub const SP_COPY_RESERVED: DWORD = 0x0020000; | |
1614 | pub const SP_COPY_OEMINF_CATALOG_ONLY: DWORD = 0x0040000; | |
1615 | pub const SP_COPY_REPLACE_BOOT_FILE: DWORD = 0x0080000; | |
1616 | pub const SP_COPY_NOPRUNE: DWORD = 0x0100000; | |
1617 | pub const SP_COPY_OEM_F6_INF: DWORD = 0x0200000; | |
1618 | pub const SP_COPY_ALREADYDECOMP: DWORD = 0x0400000; | |
1619 | pub const SP_COPY_WINDOWS_SIGNED: DWORD = 0x1000000; | |
1620 | pub const SP_COPY_PNPLOCKED: DWORD = 0x2000000; | |
1621 | pub const SP_COPY_IN_USE_TRY_RENAME: DWORD = 0x4000000; | |
1622 | pub const SP_COPY_INBOX_INF: DWORD = 0x8000000; | |
1623 | pub const SP_COPY_HARDLINK: DWORD = 0x10000000; | |
1624 | pub const SP_BACKUP_BACKUPPASS: DWORD = 0x00000001; | |
1625 | pub const SP_BACKUP_DEMANDPASS: DWORD = 0x00000002; | |
1626 | pub const SP_BACKUP_SPECIAL: DWORD = 0x00000004; | |
1627 | pub const SP_BACKUP_BOOTFILE: DWORD = 0x00000008; | |
1628 | extern "system" { | |
60c5eb7d | 1629 | pub fn SetupOpenFileQueue() -> HSPFILEQ; |
ff7c6d11 XL |
1630 | pub fn SetupCloseFileQueue( |
1631 | QueueHandle: HSPFILEQ, | |
1632 | ) -> BOOL; | |
1633 | pub fn SetupSetFileQueueAlternatePlatformA( | |
1634 | QueueHandle: HSPFILEQ, | |
1635 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
1636 | AlternateDefaultCatalogFile: PCSTR, | |
1637 | ) -> BOOL; | |
1638 | pub fn SetupSetFileQueueAlternatePlatformW( | |
1639 | QueueHandle: HSPFILEQ, | |
1640 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
1641 | AlternateDefaultCatalogFile: PCWSTR, | |
1642 | ) -> BOOL; | |
1643 | pub fn SetupSetPlatformPathOverrideA( | |
1644 | Override: PCSTR, | |
1645 | ) -> BOOL; | |
1646 | pub fn SetupSetPlatformPathOverrideW( | |
1647 | Override: PCWSTR, | |
1648 | ) -> BOOL; | |
1649 | pub fn SetupQueueCopyA( | |
1650 | QueueHandle: HSPFILEQ, | |
1651 | SourceRootPath: PCSTR, | |
1652 | SourcePath: PCSTR, | |
1653 | SourceFilename: PCSTR, | |
1654 | SourceDescription: PCSTR, | |
1655 | SourceTagfile: PCSTR, | |
1656 | TargetDirectory: PCSTR, | |
1657 | TargetFilename: PCSTR, | |
1658 | CopyStyle: DWORD, | |
1659 | ) -> BOOL; | |
1660 | pub fn SetupQueueCopyW( | |
1661 | QueueHandle: HSPFILEQ, | |
1662 | SourceRootPath: PCWSTR, | |
1663 | SourcePath: PCWSTR, | |
1664 | SourceFilename: PCWSTR, | |
1665 | SourceDescription: PCWSTR, | |
1666 | SourceTagfile: PCWSTR, | |
1667 | TargetDirectory: PCWSTR, | |
1668 | TargetFilename: PCWSTR, | |
1669 | CopyStyle: DWORD, | |
1670 | ) -> BOOL; | |
1671 | pub fn SetupQueueCopyIndirectA( | |
1672 | CopyParams: PSP_FILE_COPY_PARAMS_A, | |
1673 | ) -> BOOL; | |
1674 | pub fn SetupQueueCopyIndirectW( | |
1675 | CopyParams: PSP_FILE_COPY_PARAMS_W, | |
1676 | ) -> BOOL; | |
1677 | pub fn SetupQueueDefaultCopyA( | |
1678 | QueueHandle: HSPFILEQ, | |
1679 | InfHandle: HINF, | |
1680 | SourceRootPath: PCSTR, | |
1681 | SourceFilename: PCSTR, | |
1682 | TargetFilename: PCSTR, | |
1683 | CopyStyle: DWORD, | |
1684 | ) -> BOOL; | |
1685 | pub fn SetupQueueDefaultCopyW( | |
1686 | QueueHandle: HSPFILEQ, | |
1687 | InfHandle: HINF, | |
1688 | SourceRootPath: PCWSTR, | |
1689 | SourceFilename: PCWSTR, | |
1690 | TargetFilename: PCWSTR, | |
1691 | CopyStyle: DWORD, | |
1692 | ) -> BOOL; | |
1693 | pub fn SetupQueueCopySectionA( | |
1694 | QueueHandle: HSPFILEQ, | |
1695 | SourceRootPath: PCSTR, | |
1696 | InfHandle: HINF, | |
1697 | ListInfHandle: HINF, | |
1698 | Section: PCSTR, | |
1699 | CopyStyle: DWORD, | |
1700 | ) -> BOOL; | |
1701 | pub fn SetupQueueCopySectionW( | |
1702 | QueueHandle: HSPFILEQ, | |
1703 | SourceRootPath: PCWSTR, | |
1704 | InfHandle: HINF, | |
1705 | ListInfHandle: HINF, | |
1706 | Section: PCWSTR, | |
1707 | CopyStyle: DWORD, | |
1708 | ) -> BOOL; | |
1709 | pub fn SetupQueueDeleteA( | |
1710 | QueueHandle: HSPFILEQ, | |
1711 | PathPart1: PCSTR, | |
1712 | PathPart2: PCSTR, | |
1713 | ) -> BOOL; | |
1714 | pub fn SetupQueueDeleteW( | |
1715 | QueueHandle: HSPFILEQ, | |
1716 | PathPart1: PCWSTR, | |
1717 | PathPart2: PCWSTR, | |
1718 | ) -> BOOL; | |
1719 | pub fn SetupQueueDeleteSectionA( | |
1720 | QueueHandle: HSPFILEQ, | |
1721 | InfHandle: HINF, | |
1722 | ListInfHandle: HINF, | |
1723 | Section: PCSTR, | |
1724 | ) -> BOOL; | |
1725 | pub fn SetupQueueDeleteSectionW( | |
1726 | QueueHandle: HSPFILEQ, | |
1727 | InfHandle: HINF, | |
1728 | ListInfHandle: HINF, | |
1729 | Section: PCWSTR, | |
1730 | ) -> BOOL; | |
1731 | pub fn SetupQueueRenameA( | |
1732 | QueueHandle: HSPFILEQ, | |
1733 | SourcePath: PCSTR, | |
1734 | SourceFilename: PCSTR, | |
1735 | TargetPath: PCSTR, | |
1736 | TargetFilename: PCSTR, | |
1737 | ) -> BOOL; | |
1738 | pub fn SetupQueueRenameW( | |
1739 | QueueHandle: HSPFILEQ, | |
1740 | SourcePath: PCWSTR, | |
1741 | SourceFilename: PCWSTR, | |
1742 | TargetPath: PCWSTR, | |
1743 | TargetFilename: PCWSTR, | |
1744 | ) -> BOOL; | |
1745 | pub fn SetupQueueRenameSectionA( | |
1746 | QueueHandle: HSPFILEQ, | |
1747 | InfHandle: HINF, | |
1748 | ListInfHandle: HINF, | |
1749 | Section: PCSTR, | |
1750 | ) -> BOOL; | |
1751 | pub fn SetupQueueRenameSectionW( | |
1752 | QueueHandle: HSPFILEQ, | |
1753 | InfHandle: HINF, | |
1754 | ListInfHandle: HINF, | |
1755 | Section: PCWSTR, | |
1756 | ) -> BOOL; | |
1757 | pub fn SetupCommitFileQueueA( | |
1758 | Owner: HWND, | |
1759 | QueueHandle: HSPFILEQ, | |
1760 | MsgHandler: PSP_FILE_CALLBACK_A, | |
1761 | Context: PVOID, | |
1762 | ) -> BOOL; | |
1763 | pub fn SetupCommitFileQueueW( | |
1764 | Owner: HWND, | |
1765 | QueueHandle: HSPFILEQ, | |
1766 | MsgHandler: PSP_FILE_CALLBACK_W, | |
1767 | Context: PVOID, | |
1768 | ) -> BOOL; | |
1769 | pub fn SetupScanFileQueueA( | |
1770 | FileQueue: HSPFILEQ, | |
1771 | Flags: DWORD, | |
1772 | Window: HWND, | |
1773 | CallbackRoutine: PSP_FILE_CALLBACK_A, | |
1774 | CallbackContext: PVOID, | |
1775 | Result: PDWORD, | |
1776 | ) -> BOOL; | |
1777 | pub fn SetupScanFileQueueW( | |
1778 | FileQueue: HSPFILEQ, | |
1779 | Flags: DWORD, | |
1780 | Window: HWND, | |
1781 | CallbackRoutine: PSP_FILE_CALLBACK_W, | |
1782 | CallbackContext: PVOID, | |
1783 | Result: PDWORD, | |
1784 | ) -> BOOL; | |
1785 | } | |
1786 | pub const SPQ_SCAN_FILE_PRESENCE: DWORD = 0x00000001; | |
1787 | pub const SPQ_SCAN_FILE_VALIDITY: DWORD = 0x00000002; | |
1788 | pub const SPQ_SCAN_USE_CALLBACK: DWORD = 0x00000004; | |
1789 | pub const SPQ_SCAN_USE_CALLBACKEX: DWORD = 0x00000008; | |
1790 | pub const SPQ_SCAN_INFORM_USER: DWORD = 0x00000010; | |
1791 | pub const SPQ_SCAN_PRUNE_COPY_QUEUE: DWORD = 0x00000020; | |
1792 | pub const SPQ_SCAN_USE_CALLBACK_SIGNERINFO: DWORD = 0x00000040; | |
1793 | pub const SPQ_SCAN_PRUNE_DELREN: DWORD = 0x00000080; | |
1794 | pub const SPQ_SCAN_FILE_PRESENCE_WITHOUT_SOURCE: DWORD = 0x00000100; | |
1795 | pub const SPQ_SCAN_FILE_COMPARISON: DWORD = 0x00000200; | |
1796 | pub const SPQ_SCAN_ACTIVATE_DRP: DWORD = 0x00000400; | |
1797 | pub const SPQ_DELAYED_COPY: DWORD = 0x00000001; | |
1798 | extern "system" { | |
1799 | pub fn SetupGetFileQueueCount( | |
1800 | FileQueue: HSPFILEQ, | |
1801 | SubQueueFileOp: UINT, | |
1802 | NumOperations: PUINT, | |
1803 | ) -> BOOL; | |
1804 | pub fn SetupGetFileQueueFlags( | |
1805 | FileQueue: HSPFILEQ, | |
1806 | Flags: PDWORD, | |
1807 | ) -> BOOL; | |
1808 | pub fn SetupSetFileQueueFlags( | |
1809 | FileQueue: HSPFILEQ, | |
1810 | FlagMask: DWORD, | |
1811 | Flags: DWORD, | |
1812 | ) -> BOOL; | |
1813 | } | |
1814 | pub const SPQ_FLAG_BACKUP_AWARE: DWORD = 0x00000001; | |
1815 | pub const SPQ_FLAG_ABORT_IF_UNSIGNED: DWORD = 0x00000002; | |
1816 | pub const SPQ_FLAG_FILES_MODIFIED: DWORD = 0x00000004; | |
1817 | pub const SPQ_FLAG_DO_SHUFFLEMOVE: DWORD = 0x00000008; | |
1818 | pub const SPQ_FLAG_VALID: DWORD = 0x0000000F; | |
1819 | pub const SPOST_NONE: DWORD = 0; | |
1820 | pub const SPOST_PATH: DWORD = 1; | |
1821 | pub const SPOST_URL: DWORD = 2; | |
1822 | pub const SPOST_MAX: DWORD = 3; | |
1823 | extern "system" { | |
1824 | pub fn SetupCopyOEMInfA( | |
1825 | SourceInfFileName: PCSTR, | |
1826 | OEMSourceMediaLocation: PCSTR, | |
1827 | OEMSourceMediaType: DWORD, | |
1828 | CopyStyle: DWORD, | |
1829 | DestinationInfFileName: PSTR, | |
1830 | DestinationInfFileNameSize: DWORD, | |
1831 | RequiredSize: PDWORD, | |
1832 | DestinationInfFileNameComponent: *mut PSTR, | |
1833 | ) -> BOOL; | |
1834 | pub fn SetupCopyOEMInfW( | |
1835 | SourceInfFileName: PCWSTR, | |
1836 | OEMSourceMediaLocation: PCWSTR, | |
1837 | OEMSourceMediaType: DWORD, | |
1838 | CopyStyle: DWORD, | |
1839 | DestinationInfFileName: PWSTR, | |
1840 | DestinationInfFileNameSize: DWORD, | |
1841 | RequiredSize: PDWORD, | |
1842 | DestinationInfFileNameComponent: *mut PWSTR, | |
1843 | ) -> BOOL; | |
1844 | } | |
1845 | pub const SUOI_FORCEDELETE: DWORD = 0x00000001; | |
1846 | pub const SUOI_INTERNAL1: DWORD = 0x00000002; | |
1847 | extern "system" { | |
1848 | pub fn SetupUninstallOEMInfA( | |
1849 | InfFileName: PCSTR, | |
1850 | Flags: DWORD, | |
1851 | Reserved: PVOID, | |
1852 | ) -> BOOL; | |
1853 | pub fn SetupUninstallOEMInfW( | |
1854 | InfFileName: PCWSTR, | |
1855 | Flags: DWORD, | |
1856 | Reserved: PVOID, | |
1857 | ) -> BOOL; | |
1858 | pub fn SetupUninstallNewlyCopiedInfs( | |
1859 | FileQueue: HSPFILEQ, | |
1860 | Flags: DWORD, | |
1861 | Reserved: PVOID, | |
1862 | ) -> BOOL; | |
1863 | pub fn SetupCreateDiskSpaceListA( | |
1864 | Reserved1: PVOID, | |
1865 | Reserved2: DWORD, | |
1866 | Flags: UINT, | |
1867 | ) -> HDSKSPC; | |
1868 | pub fn SetupCreateDiskSpaceListW( | |
1869 | Reserved1: PVOID, | |
1870 | Reserved2: DWORD, | |
1871 | Flags: UINT, | |
1872 | ) -> HDSKSPC; | |
1873 | } | |
1874 | pub const SPDSL_IGNORE_DISK: UINT = 0x00000001; | |
1875 | pub const SPDSL_DISALLOW_NEGATIVE_ADJUST: UINT = 0x00000002; | |
1876 | extern "system" { | |
1877 | pub fn SetupDuplicateDiskSpaceListA( | |
1878 | DiskSpace: HDSKSPC, | |
1879 | Reserved1: PVOID, | |
1880 | Reserved2: DWORD, | |
1881 | Flags: UINT, | |
1882 | ) -> HDSKSPC; | |
1883 | pub fn SetupDuplicateDiskSpaceListW( | |
1884 | DiskSpace: HDSKSPC, | |
1885 | Reserved1: PVOID, | |
1886 | Reserved2: DWORD, | |
1887 | Flags: UINT, | |
1888 | ) -> HDSKSPC; | |
1889 | pub fn SetupDestroyDiskSpaceList( | |
1890 | DiskSpace: HDSKSPC, | |
1891 | ) -> BOOL; | |
1892 | pub fn SetupQueryDrivesInDiskSpaceListA( | |
1893 | DiskSpace: HDSKSPC, | |
1894 | ReturnBuffer: PSTR, | |
1895 | ReturnBufferSize: DWORD, | |
1896 | RequiredSize: PDWORD, | |
1897 | ) -> BOOL; | |
1898 | pub fn SetupQueryDrivesInDiskSpaceListW( | |
1899 | DiskSpace: HDSKSPC, | |
1900 | ReturnBuffer: PWSTR, | |
1901 | ReturnBufferSize: DWORD, | |
1902 | RequiredSize: PDWORD, | |
1903 | ) -> BOOL; | |
1904 | pub fn SetupQuerySpaceRequiredOnDriveA( | |
1905 | DiskSpace: HDSKSPC, | |
1906 | DriveSpec: PCSTR, | |
1907 | SpaceRequired: *mut LONGLONG, | |
1908 | Reserved1: PVOID, | |
1909 | Reserved2: UINT, | |
1910 | ) -> BOOL; | |
1911 | pub fn SetupQuerySpaceRequiredOnDriveW( | |
1912 | DiskSpace: HDSKSPC, | |
1913 | DriveSpec: PCWSTR, | |
1914 | SpaceRequired: *mut LONGLONG, | |
1915 | Reserved1: PVOID, | |
1916 | Reserved2: UINT, | |
1917 | ) -> BOOL; | |
1918 | pub fn SetupAdjustDiskSpaceListA( | |
1919 | DiskSpace: HDSKSPC, | |
1920 | DriveRoot: LPCSTR, | |
1921 | Amount: LONGLONG, | |
1922 | Reserved1: PVOID, | |
1923 | Reserved2: UINT, | |
1924 | ) -> BOOL; | |
1925 | pub fn SetupAdjustDiskSpaceListW( | |
1926 | DiskSpace: HDSKSPC, | |
1927 | DriveRoot: LPCWSTR, | |
1928 | Amount: LONGLONG, | |
1929 | Reserved1: PVOID, | |
1930 | Reserved2: UINT, | |
1931 | ) -> BOOL; | |
1932 | pub fn SetupAddToDiskSpaceListA( | |
1933 | DiskSpace: HDSKSPC, | |
1934 | TargetFilespec: PCSTR, | |
1935 | FileSize: LONGLONG, | |
1936 | Operation: UINT, | |
1937 | Reserved1: PVOID, | |
1938 | Reserved2: UINT, | |
1939 | ) -> BOOL; | |
1940 | pub fn SetupAddToDiskSpaceListW( | |
1941 | DiskSpace: HDSKSPC, | |
1942 | TargetFilespec: PCWSTR, | |
1943 | FileSize: LONGLONG, | |
1944 | Operation: UINT, | |
1945 | Reserved1: PVOID, | |
1946 | Reserved2: UINT, | |
1947 | ) -> BOOL; | |
1948 | pub fn SetupAddSectionToDiskSpaceListA( | |
1949 | DiskSpace: HDSKSPC, | |
1950 | InfHandle: HINF, | |
1951 | ListInfHandle: HINF, | |
1952 | SectionName: PCSTR, | |
1953 | Operation: UINT, | |
1954 | Reserved1: PVOID, | |
1955 | Reserved2: UINT, | |
1956 | ) -> BOOL; | |
1957 | pub fn SetupAddSectionToDiskSpaceListW( | |
1958 | DiskSpace: HDSKSPC, | |
1959 | InfHandle: HINF, | |
1960 | ListInfHandle: HINF, | |
1961 | SectionName: PCWSTR, | |
1962 | Operation: UINT, | |
1963 | Reserved1: PVOID, | |
1964 | Reserved2: UINT, | |
1965 | ) -> BOOL; | |
1966 | pub fn SetupAddInstallSectionToDiskSpaceListA( | |
1967 | DiskSpace: HDSKSPC, | |
1968 | InfHandle: HINF, | |
1969 | LayoutInfHandle: HINF, | |
1970 | SectionName: PCSTR, | |
1971 | Reserved1: PVOID, | |
1972 | Reserved2: UINT, | |
1973 | ) -> BOOL; | |
1974 | pub fn SetupAddInstallSectionToDiskSpaceListW( | |
1975 | DiskSpace: HDSKSPC, | |
1976 | InfHandle: HINF, | |
1977 | LayoutInfHandle: HINF, | |
1978 | SectionName: PCWSTR, | |
1979 | Reserved1: PVOID, | |
1980 | Reserved2: UINT, | |
1981 | ) -> BOOL; | |
1982 | pub fn SetupRemoveFromDiskSpaceListA( | |
1983 | DiskSpace: HDSKSPC, | |
1984 | TargetFilespec: PCSTR, | |
1985 | Operation: UINT, | |
1986 | Reserved1: PVOID, | |
1987 | Reserved2: UINT, | |
1988 | ) -> BOOL; | |
1989 | pub fn SetupRemoveFromDiskSpaceListW( | |
1990 | DiskSpace: HDSKSPC, | |
1991 | TargetFilespec: PCWSTR, | |
1992 | Operation: UINT, | |
1993 | Reserved1: PVOID, | |
1994 | Reserved2: UINT, | |
1995 | ) -> BOOL; | |
1996 | pub fn SetupRemoveSectionFromDiskSpaceListA( | |
1997 | DiskSpace: HDSKSPC, | |
1998 | InfHandle: HINF, | |
1999 | ListInfHandle: HINF, | |
2000 | SectionName: PCSTR, | |
2001 | Operation: UINT, | |
2002 | Reserved1: PVOID, | |
2003 | Reserved2: UINT, | |
2004 | ) -> BOOL; | |
2005 | pub fn SetupRemoveSectionFromDiskSpaceListW( | |
2006 | DiskSpace: HDSKSPC, | |
2007 | InfHandle: HINF, | |
2008 | ListInfHandle: HINF, | |
2009 | SectionName: PCWSTR, | |
2010 | Operation: UINT, | |
2011 | Reserved1: PVOID, | |
2012 | Reserved2: UINT, | |
2013 | ) -> BOOL; | |
2014 | pub fn SetupRemoveInstallSectionFromDiskSpaceListA( | |
2015 | DiskSpace: HDSKSPC, | |
2016 | InfHandle: HINF, | |
2017 | LayoutInfHandle: HINF, | |
2018 | SectionName: PCSTR, | |
2019 | Reserved1: PVOID, | |
2020 | Reserved2: UINT, | |
2021 | ) -> BOOL; | |
2022 | pub fn SetupRemoveInstallSectionFromDiskSpaceListW( | |
2023 | DiskSpace: HDSKSPC, | |
2024 | InfHandle: HINF, | |
2025 | LayoutInfHandle: HINF, | |
2026 | SectionName: PCWSTR, | |
2027 | Reserved1: PVOID, | |
2028 | Reserved2: UINT, | |
2029 | ) -> BOOL; | |
2030 | pub fn SetupIterateCabinetA( | |
2031 | CabinetFile: PCSTR, | |
2032 | Reserved: DWORD, | |
2033 | MsgHandler: PSP_FILE_CALLBACK_A, | |
2034 | Context: PVOID, | |
2035 | ) -> BOOL; | |
2036 | pub fn SetupIterateCabinetW( | |
2037 | CabinetFile: PCWSTR, | |
2038 | Reserved: DWORD, | |
2039 | MsgHandler: PSP_FILE_CALLBACK_W, | |
2040 | Context: PVOID, | |
2041 | ) -> BOOL; | |
2042 | pub fn SetupPromptReboot( | |
2043 | FileQueue: HSPFILEQ, | |
2044 | Owner: HWND, | |
2045 | ScanOnly: BOOL, | |
2046 | ) -> INT; | |
2047 | } | |
2048 | pub const SPFILEQ_FILE_IN_USE: INT = 0x00000001; | |
2049 | pub const SPFILEQ_REBOOT_RECOMMENDED: INT = 0x00000002; | |
2050 | pub const SPFILEQ_REBOOT_IN_PROGRESS: INT = 0x00000004; | |
2051 | extern "system" { | |
2052 | pub fn SetupInitDefaultQueueCallback( | |
2053 | OwnerWindow: HWND, | |
2054 | ) -> PVOID; | |
2055 | pub fn SetupInitDefaultQueueCallbackEx( | |
2056 | OwnerWindow: HWND, | |
2057 | AlternateProgressWindow: HWND, | |
2058 | ProgressMessage: UINT, | |
2059 | Reserved1: DWORD, | |
2060 | Reserved2: PVOID, | |
2061 | ) -> PVOID; | |
2062 | pub fn SetupTermDefaultQueueCallback( | |
2063 | Context: PVOID, | |
2064 | ) -> (); | |
2065 | pub fn SetupDefaultQueueCallbackA( | |
2066 | Context: PVOID, | |
2067 | Notification: UINT, | |
2068 | Param1: UINT_PTR, | |
2069 | Param2: UINT_PTR, | |
2070 | ) -> UINT; | |
2071 | pub fn SetupDefaultQueueCallbackW( | |
2072 | Context: PVOID, | |
2073 | Notification: UINT, | |
2074 | Param1: UINT_PTR, | |
2075 | Param2: UINT_PTR, | |
2076 | ) -> UINT; | |
2077 | } | |
2078 | pub const FLG_ADDREG_DELREG_BIT: DWORD = 0x00008000; | |
2079 | pub const FLG_ADDREG_BINVALUETYPE: DWORD = 0x00000001; | |
2080 | pub const FLG_ADDREG_NOCLOBBER: DWORD = 0x00000002; | |
2081 | pub const FLG_ADDREG_DELVAL: DWORD = 0x00000004; | |
2082 | pub const FLG_ADDREG_APPEND: DWORD = 0x00000008; | |
2083 | pub const FLG_ADDREG_KEYONLY: DWORD = 0x00000010; | |
2084 | pub const FLG_ADDREG_OVERWRITEONLY: DWORD = 0x00000020; | |
2085 | pub const FLG_ADDREG_64BITKEY: DWORD = 0x00001000; | |
2086 | pub const FLG_ADDREG_KEYONLY_COMMON: DWORD = 0x00002000; | |
2087 | pub const FLG_ADDREG_32BITKEY: DWORD = 0x00004000; | |
2088 | pub const FLG_ADDREG_TYPE_MASK: DWORD = 0xFFFF0000 | FLG_ADDREG_BINVALUETYPE; | |
2089 | pub const FLG_ADDREG_TYPE_SZ: DWORD = 0x00000000; | |
2090 | pub const FLG_ADDREG_TYPE_MULTI_SZ: DWORD = 0x00010000; | |
2091 | pub const FLG_ADDREG_TYPE_EXPAND_SZ: DWORD = 0x00020000; | |
2092 | pub const FLG_ADDREG_TYPE_BINARY: DWORD = 0x00000000 | FLG_ADDREG_BINVALUETYPE; | |
2093 | pub const FLG_ADDREG_TYPE_DWORD: DWORD = 0x00010000 | FLG_ADDREG_BINVALUETYPE; | |
2094 | pub const FLG_ADDREG_TYPE_NONE: DWORD = 0x00020000 | FLG_ADDREG_BINVALUETYPE; | |
2095 | pub const FLG_DELREG_VALUE: DWORD = 0x00000000; | |
2096 | pub const FLG_DELREG_TYPE_MASK: DWORD = FLG_ADDREG_TYPE_MASK; | |
2097 | pub const FLG_DELREG_TYPE_SZ: DWORD = FLG_ADDREG_TYPE_SZ; | |
2098 | pub const FLG_DELREG_TYPE_MULTI_SZ: DWORD = FLG_ADDREG_TYPE_MULTI_SZ; | |
2099 | pub const FLG_DELREG_TYPE_EXPAND_SZ: DWORD = FLG_ADDREG_TYPE_EXPAND_SZ; | |
2100 | pub const FLG_DELREG_TYPE_BINARY: DWORD = FLG_ADDREG_TYPE_BINARY; | |
2101 | pub const FLG_DELREG_TYPE_DWORD: DWORD = FLG_ADDREG_TYPE_DWORD; | |
2102 | pub const FLG_DELREG_TYPE_NONE: DWORD = FLG_ADDREG_TYPE_NONE; | |
2103 | pub const FLG_DELREG_64BITKEY: DWORD = FLG_ADDREG_64BITKEY; | |
2104 | pub const FLG_DELREG_KEYONLY_COMMON: DWORD = FLG_ADDREG_KEYONLY_COMMON; | |
2105 | pub const FLG_DELREG_32BITKEY: DWORD = FLG_ADDREG_32BITKEY; | |
2106 | pub const FLG_DELREG_OPERATION_MASK: DWORD = 0x000000FE; | |
2107 | pub const FLG_DELREG_MULTI_SZ_DELSTRING: DWORD = FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT | |
2108 | | 0x00000002; | |
2109 | pub const FLG_BITREG_CLEARBITS: DWORD = 0x00000000; | |
2110 | pub const FLG_BITREG_SETBITS: DWORD = 0x00000001; | |
2111 | pub const FLG_BITREG_64BITKEY: DWORD = 0x00001000; | |
2112 | pub const FLG_BITREG_32BITKEY: DWORD = 0x00004000; | |
2113 | pub const FLG_INI2REG_64BITKEY: DWORD = 0x00001000; | |
2114 | pub const FLG_INI2REG_32BITKEY: DWORD = 0x00004000; | |
2115 | pub const FLG_REGSVR_DLLREGISTER: DWORD = 0x00000001; | |
2116 | pub const FLG_REGSVR_DLLINSTALL: DWORD = 0x00000002; | |
2117 | pub const FLG_PROFITEM_CURRENTUSER: DWORD = 0x00000001; | |
2118 | pub const FLG_PROFITEM_DELETE: DWORD = 0x00000002; | |
2119 | pub const FLG_PROFITEM_GROUP: DWORD = 0x00000004; | |
2120 | pub const FLG_PROFITEM_CSIDL: DWORD = 0x00000008; | |
2121 | pub const FLG_ADDPROPERTY_NOCLOBBER: DWORD = 0x00000001; | |
2122 | pub const FLG_ADDPROPERTY_OVERWRITEONLY: DWORD = 0x00000002; | |
2123 | pub const FLG_ADDPROPERTY_APPEND: DWORD = 0x00000004; | |
2124 | pub const FLG_ADDPROPERTY_OR: DWORD = 0x00000008; | |
2125 | pub const FLG_ADDPROPERTY_AND: DWORD = 0x00000010; | |
2126 | pub const FLG_DELPROPERTY_MULTI_SZ_DELSTRING: DWORD = 0x00000001; | |
2127 | extern "system" { | |
2128 | pub fn SetupInstallFromInfSectionA( | |
2129 | Owner: HWND, | |
2130 | InfHandle: HINF, | |
2131 | SectionName: PCSTR, | |
2132 | Flags: UINT, | |
2133 | RelativeKeyRoot: HKEY, | |
2134 | SourceRootPath: PCSTR, | |
2135 | CopyFlags: UINT, | |
2136 | MsgHandler: PSP_FILE_CALLBACK_A, | |
2137 | Context: PVOID, | |
2138 | DeviceInfoSet: HDEVINFO, | |
2139 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2140 | ) -> BOOL; | |
2141 | pub fn SetupInstallFromInfSectionW( | |
2142 | Owner: HWND, | |
2143 | InfHandle: HINF, | |
2144 | SectionName: PCWSTR, | |
2145 | Flags: UINT, | |
2146 | RelativeKeyRoot: HKEY, | |
2147 | SourceRootPath: PCWSTR, | |
2148 | CopyFlags: UINT, | |
2149 | MsgHandler: PSP_FILE_CALLBACK_W, | |
2150 | Context: PVOID, | |
2151 | DeviceInfoSet: HDEVINFO, | |
2152 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2153 | ) -> BOOL; | |
2154 | } | |
2155 | pub const SPINST_LOGCONFIG: UINT = 0x00000001; | |
2156 | pub const SPINST_INIFILES: UINT = 0x00000002; | |
2157 | pub const SPINST_REGISTRY: UINT = 0x00000004; | |
2158 | pub const SPINST_INI2REG: UINT = 0x00000008; | |
2159 | pub const SPINST_FILES: UINT = 0x00000010; | |
2160 | pub const SPINST_BITREG: UINT = 0x00000020; | |
2161 | pub const SPINST_REGSVR: UINT = 0x00000040; | |
2162 | pub const SPINST_UNREGSVR: UINT = 0x00000080; | |
2163 | pub const SPINST_PROFILEITEMS: UINT = 0x00000100; | |
2164 | pub const SPINST_COPYINF: UINT = 0x00000200; | |
2165 | pub const SPINST_PROPERTIES: UINT = 0x00000400; | |
2166 | pub const SPINST_ALL: UINT = 0x000007ff; | |
2167 | pub const SPINST_SINGLESECTION: UINT = 0x00010000; | |
2168 | pub const SPINST_LOGCONFIG_IS_FORCED: UINT = 0x00020000; | |
2169 | pub const SPINST_LOGCONFIGS_ARE_OVERRIDES: UINT = 0x00040000; | |
2170 | pub const SPINST_REGISTERCALLBACKAWARE: UINT = 0x00080000; | |
2171 | pub const SPINST_DEVICEINSTALL: UINT = 0x00100000; | |
2172 | extern "system" { | |
2173 | pub fn SetupInstallFilesFromInfSectionA( | |
2174 | InfHandle: HINF, | |
2175 | LayoutInfHandle: HINF, | |
2176 | FileQueue: HSPFILEQ, | |
2177 | SectionName: PCSTR, | |
2178 | SourceRootPath: PCSTR, | |
2179 | CopyFlags: UINT, | |
2180 | ) -> BOOL; | |
2181 | pub fn SetupInstallFilesFromInfSectionW( | |
2182 | InfHandle: HINF, | |
2183 | LayoutInfHandle: HINF, | |
2184 | FileQueue: HSPFILEQ, | |
2185 | SectionName: PCWSTR, | |
2186 | SourceRootPath: PCWSTR, | |
2187 | CopyFlags: UINT, | |
2188 | ) -> BOOL; | |
2189 | } | |
2190 | pub const SPSVCINST_TAGTOFRONT: DWORD = 0x00000001; | |
2191 | pub const SPSVCINST_ASSOCSERVICE: DWORD = 0x00000002; | |
2192 | pub const SPSVCINST_DELETEEVENTLOGENTRY: DWORD = 0x00000004; | |
2193 | pub const SPSVCINST_NOCLOBBER_DISPLAYNAME: DWORD = 0x00000008; | |
2194 | pub const SPSVCINST_NOCLOBBER_STARTTYPE: DWORD = 0x00000010; | |
2195 | pub const SPSVCINST_NOCLOBBER_ERRORCONTROL: DWORD = 0x00000020; | |
2196 | pub const SPSVCINST_NOCLOBBER_LOADORDERGROUP: DWORD = 0x00000040; | |
2197 | pub const SPSVCINST_NOCLOBBER_DEPENDENCIES: DWORD = 0x00000080; | |
2198 | pub const SPSVCINST_NOCLOBBER_DESCRIPTION: DWORD = 0x00000100; | |
2199 | pub const SPSVCINST_STOPSERVICE: DWORD = 0x00000200; | |
2200 | pub const SPSVCINST_CLOBBER_SECURITY: DWORD = 0x00000400; | |
2201 | pub const SPSVCINST_STARTSERVICE: DWORD = 0x00000800; | |
2202 | pub const SPSVCINST_NOCLOBBER_REQUIREDPRIVILEGES: DWORD = 0x00001000; | |
2203 | extern "system" { | |
2204 | pub fn SetupInstallServicesFromInfSectionA( | |
2205 | InfHandle: HINF, | |
2206 | SectionName: PCSTR, | |
2207 | Flags: DWORD, | |
2208 | ) -> BOOL; | |
2209 | pub fn SetupInstallServicesFromInfSectionW( | |
2210 | InfHandle: HINF, | |
2211 | SectionName: PCWSTR, | |
2212 | Flags: DWORD, | |
2213 | ) -> BOOL; | |
2214 | pub fn SetupInstallServicesFromInfSectionExA( | |
2215 | InfHandle: HINF, | |
2216 | SectionName: PCSTR, | |
2217 | Flags: DWORD, | |
2218 | DeviceInfoSet: HDEVINFO, | |
2219 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2220 | Reserved1: PVOID, | |
2221 | Reserved2: PVOID, | |
2222 | ) -> BOOL; | |
2223 | pub fn SetupInstallServicesFromInfSectionExW( | |
2224 | InfHandle: HINF, | |
2225 | SectionName: PCWSTR, | |
2226 | Flags: DWORD, | |
2227 | DeviceInfoSet: HDEVINFO, | |
2228 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2229 | Reserved1: PVOID, | |
2230 | Reserved2: PVOID, | |
2231 | ) -> BOOL; | |
2232 | pub fn InstallHinfSectionA( | |
2233 | Window: HWND, | |
2234 | ModuleHandle: HINSTANCE, | |
2235 | CommandLine: PCSTR, | |
2236 | ShowCommand: INT, | |
2237 | ) -> (); | |
2238 | pub fn InstallHinfSectionW( | |
2239 | Window: HWND, | |
2240 | ModuleHandle: HINSTANCE, | |
2241 | CommandLine: PCWSTR, | |
2242 | ShowCommand: INT, | |
2243 | ) -> (); | |
2244 | } | |
2245 | pub type HSPFILELOG = PVOID; | |
2246 | extern "system" { | |
2247 | pub fn SetupInitializeFileLogA( | |
2248 | LogFileName: PCSTR, | |
2249 | Flags: DWORD, | |
2250 | ) -> HSPFILELOG; | |
2251 | pub fn SetupInitializeFileLogW( | |
2252 | LogFileName: PCWSTR, | |
2253 | Flags: DWORD, | |
2254 | ) -> HSPFILELOG; | |
2255 | } | |
2256 | pub const SPFILELOG_SYSTEMLOG: DWORD = 0x00000001; | |
2257 | pub const SPFILELOG_FORCENEW: DWORD = 0x00000002; | |
2258 | pub const SPFILELOG_QUERYONLY: DWORD = 0x00000004; | |
2259 | extern "system" { | |
2260 | pub fn SetupTerminateFileLog( | |
2261 | FileLogHandle: HSPFILELOG, | |
2262 | ) -> BOOL; | |
2263 | pub fn SetupLogFileA( | |
2264 | FileLogHandle: HSPFILELOG, | |
2265 | LogSectionName: PCSTR, | |
2266 | SourceFilename: PCSTR, | |
2267 | TargetFilename: PCSTR, | |
2268 | Checksum: DWORD, | |
2269 | DiskTagfile: PCSTR, | |
2270 | DiskDescription: PCSTR, | |
2271 | OtherInfo: PCSTR, | |
2272 | Flags: DWORD, | |
2273 | ) -> BOOL; | |
2274 | pub fn SetupLogFileW( | |
2275 | FileLogHandle: HSPFILELOG, | |
2276 | LogSectionName: PCWSTR, | |
2277 | SourceFilename: PCWSTR, | |
2278 | TargetFilename: PCWSTR, | |
2279 | Checksum: DWORD, | |
2280 | DiskTagfile: PCWSTR, | |
2281 | DiskDescription: PCWSTR, | |
2282 | OtherInfo: PCWSTR, | |
2283 | Flags: DWORD, | |
2284 | ) -> BOOL; | |
2285 | } | |
2286 | pub const SPFILELOG_OEMFILE: DWORD = 0x00000001; | |
2287 | extern "system" { | |
2288 | pub fn SetupRemoveFileLogEntryA( | |
2289 | FileLogHandle: HSPFILELOG, | |
2290 | LogSectionName: PCSTR, | |
2291 | TargetFilename: PCSTR, | |
2292 | ) -> BOOL; | |
2293 | pub fn SetupRemoveFileLogEntryW( | |
2294 | FileLogHandle: HSPFILELOG, | |
2295 | LogSectionName: PCWSTR, | |
2296 | TargetFilename: PCWSTR, | |
2297 | ) -> BOOL; | |
2298 | } | |
2299 | ENUM!{enum SetupFileLogInfo { | |
2300 | SetupFileLogSourceFilename, | |
2301 | SetupFileLogChecksum, | |
2302 | SetupFileLogDiskTagfile, | |
2303 | SetupFileLogDiskDescription, | |
2304 | SetupFileLogOtherInfo, | |
2305 | SetupFileLogMax, | |
2306 | }} | |
2307 | extern "system" { | |
2308 | pub fn SetupQueryFileLogA( | |
2309 | FileLogHandle: HSPFILELOG, | |
2310 | LogSectionName: PCSTR, | |
2311 | TargetFilename: PCSTR, | |
2312 | DesiredInfo: SetupFileLogInfo, | |
2313 | DataOut: PSTR, | |
2314 | ReturnBufferSize: DWORD, | |
2315 | RequiredSize: PDWORD, | |
2316 | ) -> BOOL; | |
2317 | pub fn SetupQueryFileLogW( | |
2318 | FileLogHandle: HSPFILELOG, | |
2319 | LogSectionName: PCWSTR, | |
2320 | TargetFilename: PCWSTR, | |
2321 | DesiredInfo: SetupFileLogInfo, | |
2322 | DataOut: PWSTR, | |
2323 | ReturnBufferSize: DWORD, | |
2324 | RequiredSize: PDWORD, | |
2325 | ) -> BOOL; | |
2326 | } | |
2327 | pub type LogSeverity = DWORD; | |
2328 | pub const LogSevInformation: LogSeverity = 0x00000000; | |
2329 | pub const LogSevWarning: LogSeverity = 0x00000001; | |
2330 | pub const LogSevError: LogSeverity = 0x00000002; | |
2331 | pub const LogSevFatalError: LogSeverity = 0x00000003; | |
2332 | pub const LogSevMaximum: LogSeverity = 0x00000004; | |
2333 | extern "system" { | |
2334 | pub fn SetupOpenLog( | |
2335 | Erase: BOOL, | |
2336 | ) -> BOOL; | |
2337 | pub fn SetupLogErrorA( | |
2338 | MessageString: LPCSTR, | |
2339 | Severity: LogSeverity, | |
2340 | ) -> BOOL; | |
2341 | pub fn SetupLogErrorW( | |
2342 | MessageString: LPCWSTR, | |
2343 | Severity: LogSeverity, | |
2344 | ) -> BOOL; | |
2345 | pub fn SetupCloseLog() -> (); | |
2346 | pub fn SetupGetThreadLogToken() -> SP_LOG_TOKEN; | |
2347 | pub fn SetupSetThreadLogToken( | |
2348 | LogToken: SP_LOG_TOKEN, | |
2349 | ) -> (); | |
2350 | } | |
2351 | //pub fn SetupWriteTextLog() -> (); | |
2352 | //pub fn SetupWriteTextLogError() -> (); | |
2353 | extern "system" { | |
2354 | pub fn SetupWriteTextLogInfLine( | |
2355 | LogToken: SP_LOG_TOKEN, | |
2356 | Flags: DWORD, | |
2357 | InfHandle: HINF, | |
2358 | Context: PINFCONTEXT, | |
2359 | ) -> (); | |
2360 | pub fn SetupGetBackupInformationA( | |
2361 | QueueHandle: HSPFILEQ, | |
2362 | BackupParams: PSP_BACKUP_QUEUE_PARAMS_A, | |
2363 | ) -> BOOL; | |
2364 | pub fn SetupGetBackupInformationW( | |
2365 | QueueHandle: HSPFILEQ, | |
2366 | BackupParams: PSP_BACKUP_QUEUE_PARAMS_W, | |
2367 | ) -> BOOL; | |
2368 | pub fn SetupPrepareQueueForRestoreA( | |
2369 | QueueHandle: HSPFILEQ, | |
2370 | BackupPath: PCSTR, | |
2371 | RestoreFlags: DWORD, | |
2372 | ) -> BOOL; | |
2373 | pub fn SetupPrepareQueueForRestoreW( | |
2374 | QueueHandle: HSPFILEQ, | |
2375 | BackupPath: PCWSTR, | |
2376 | RestoreFlags: DWORD, | |
2377 | ) -> BOOL; | |
2378 | pub fn SetupSetNonInteractiveMode( | |
2379 | NonInteractiveFlag: BOOL, | |
2380 | ) -> BOOL; | |
2381 | pub fn SetupGetNonInteractiveMode() -> BOOL; | |
2382 | pub fn SetupDiCreateDeviceInfoList( | |
2383 | ClassGuid: *const GUID, | |
2384 | hwndParent: HWND, | |
2385 | ) -> HDEVINFO; | |
2386 | pub fn SetupDiCreateDeviceInfoListExA( | |
2387 | ClassGuid: *const GUID, | |
2388 | hwndParent: HWND, | |
2389 | MachineName: PCSTR, | |
2390 | Reserved: PVOID, | |
2391 | ) -> HDEVINFO; | |
2392 | pub fn SetupDiCreateDeviceInfoListExW( | |
2393 | ClassGuid: *const GUID, | |
2394 | hwndParent: HWND, | |
2395 | MachineName: PCWSTR, | |
2396 | Reserved: PVOID, | |
2397 | ) -> HDEVINFO; | |
2398 | pub fn SetupDiGetDeviceInfoListClass( | |
2399 | DeviceInfoSet: HDEVINFO, | |
2400 | ClassGuid: LPGUID, | |
2401 | ) -> BOOL; | |
2402 | pub fn SetupDiGetDeviceInfoListDetailA( | |
2403 | DeviceInfoSet: HDEVINFO, | |
2404 | DeviceInfoSetDetailData: PSP_DEVINFO_LIST_DETAIL_DATA_A, | |
2405 | ) -> BOOL; | |
2406 | pub fn SetupDiGetDeviceInfoListDetailW( | |
2407 | DeviceInfoSet: HDEVINFO, | |
2408 | DeviceInfoSetDetailData: PSP_DEVINFO_LIST_DETAIL_DATA_W, | |
2409 | ) -> BOOL; | |
2410 | } | |
2411 | pub const DICD_GENERATE_ID: DWORD = 0x00000001; | |
2412 | pub const DICD_INHERIT_CLASSDRVS: DWORD = 0x00000002; | |
2413 | extern "system" { | |
2414 | pub fn SetupDiCreateDeviceInfoA( | |
2415 | DeviceInfoSet: HDEVINFO, | |
2416 | DeviceName: PCSTR, | |
2417 | ClassGuid: *const GUID, | |
2418 | DeviceDescription: PCSTR, | |
2419 | hwndParent: HWND, | |
2420 | CreationFlags: DWORD, | |
2421 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2422 | ) -> BOOL; | |
2423 | pub fn SetupDiCreateDeviceInfoW( | |
2424 | DeviceInfoSet: HDEVINFO, | |
2425 | DeviceName: PCWSTR, | |
2426 | ClassGuid: *const GUID, | |
2427 | DeviceDescription: PCWSTR, | |
2428 | hwndParent: HWND, | |
2429 | CreationFlags: DWORD, | |
2430 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2431 | ) -> BOOL; | |
2432 | } | |
2433 | pub const DIOD_INHERIT_CLASSDRVS: DWORD = 0x00000002; | |
2434 | pub const DIOD_CANCEL_REMOVE: DWORD = 0x00000004; | |
2435 | extern "system" { | |
2436 | pub fn SetupDiOpenDeviceInfoA( | |
2437 | DeviceInfoSet: HDEVINFO, | |
2438 | DeviceInstanceId: PCSTR, | |
2439 | hwndParent: HWND, | |
2440 | OpenFlags: DWORD, | |
2441 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2442 | ) -> BOOL; | |
2443 | pub fn SetupDiOpenDeviceInfoW( | |
2444 | DeviceInfoSet: HDEVINFO, | |
2445 | DeviceInstanceId: PCWSTR, | |
2446 | hwndParent: HWND, | |
2447 | OpenFlags: DWORD, | |
2448 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2449 | ) -> BOOL; | |
2450 | pub fn SetupDiGetDeviceInstanceIdA( | |
2451 | DeviceInfoSet: HDEVINFO, | |
2452 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2453 | DeviceInstanceId: PSTR, | |
2454 | DeviceInstanceIdSize: DWORD, | |
2455 | RequiredSize: PDWORD, | |
2456 | ) -> BOOL; | |
2457 | pub fn SetupDiGetDeviceInstanceIdW( | |
2458 | DeviceInfoSet: HDEVINFO, | |
2459 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2460 | DeviceInstanceId: PWSTR, | |
2461 | DeviceInstanceIdSize: DWORD, | |
2462 | RequiredSize: PDWORD, | |
2463 | ) -> BOOL; | |
2464 | pub fn SetupDiDeleteDeviceInfo( | |
2465 | DeviceInfoSet: HDEVINFO, | |
2466 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2467 | ) -> BOOL; | |
2468 | pub fn SetupDiEnumDeviceInfo( | |
2469 | DeviceInfoSet: HDEVINFO, | |
2470 | MemberIndex: DWORD, | |
2471 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2472 | ) -> BOOL; | |
2473 | pub fn SetupDiDestroyDeviceInfoList( | |
2474 | DeviceInfoSet: HDEVINFO, | |
2475 | ) -> BOOL; | |
2476 | pub fn SetupDiEnumDeviceInterfaces( | |
2477 | DeviceInfoSet: HDEVINFO, | |
2478 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2479 | InterfaceClassGuid: *const GUID, | |
2480 | MemberIndex: DWORD, | |
2481 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2482 | ) -> BOOL; | |
2483 | pub fn SetupDiCreateDeviceInterfaceA( | |
2484 | DeviceInfoSet: HDEVINFO, | |
2485 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2486 | InterfaceClassGuid: *const GUID, | |
2487 | ReferenceString: PCSTR, | |
2488 | CreationFlags: DWORD, | |
2489 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2490 | ) -> BOOL; | |
2491 | pub fn SetupDiCreateDeviceInterfaceW( | |
2492 | DeviceInfoSet: HDEVINFO, | |
2493 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2494 | InterfaceClassGuid: *const GUID, | |
2495 | ReferenceString: PCWSTR, | |
2496 | CreationFlags: DWORD, | |
2497 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2498 | ) -> BOOL; | |
2499 | } | |
2500 | pub const DIODI_NO_ADD: DWORD = 0x00000001; | |
2501 | extern "system" { | |
2502 | pub fn SetupDiOpenDeviceInterfaceA( | |
2503 | DeviceInfoSet: HDEVINFO, | |
2504 | DevicePath: PCSTR, | |
2505 | OpenFlags: DWORD, | |
2506 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2507 | ) -> BOOL; | |
2508 | pub fn SetupDiOpenDeviceInterfaceW( | |
2509 | DeviceInfoSet: HDEVINFO, | |
2510 | DevicePath: PCWSTR, | |
2511 | OpenFlags: DWORD, | |
2512 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2513 | ) -> BOOL; | |
2514 | pub fn SetupDiGetDeviceInterfaceAlias( | |
2515 | DeviceInfoSet: HDEVINFO, | |
2516 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2517 | AliasInterfaceClassGuid: *const GUID, | |
2518 | AliasDeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2519 | ) -> BOOL; | |
2520 | pub fn SetupDiDeleteDeviceInterfaceData( | |
2521 | DeviceInfoSet: HDEVINFO, | |
2522 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2523 | ) -> BOOL; | |
2524 | pub fn SetupDiRemoveDeviceInterface( | |
2525 | DeviceInfoSet: HDEVINFO, | |
2526 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2527 | ) -> BOOL; | |
2528 | pub fn SetupDiGetDeviceInterfaceDetailA( | |
2529 | DeviceInfoSet: HDEVINFO, | |
2530 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2531 | DeviceInterfaceDetailData: PSP_DEVICE_INTERFACE_DETAIL_DATA_A, | |
2532 | DeviceInterfaceDetailDataSize: DWORD, | |
2533 | RequiredSize: PDWORD, | |
2534 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2535 | ) -> BOOL; | |
2536 | pub fn SetupDiGetDeviceInterfaceDetailW( | |
2537 | DeviceInfoSet: HDEVINFO, | |
2538 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2539 | DeviceInterfaceDetailData: PSP_DEVICE_INTERFACE_DETAIL_DATA_W, | |
2540 | DeviceInterfaceDetailDataSize: DWORD, | |
2541 | RequiredSize: PDWORD, | |
2542 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2543 | ) -> BOOL; | |
2544 | pub fn SetupDiInstallDeviceInterfaces( | |
2545 | DeviceInfoSet: HDEVINFO, | |
2546 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2547 | ) -> BOOL; | |
2548 | pub fn SetupDiSetDeviceInterfaceDefault( | |
2549 | DeviceInfoSet: HDEVINFO, | |
2550 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2551 | Flags: DWORD, | |
2552 | Reserved: PVOID, | |
2553 | ) -> BOOL; | |
2554 | } | |
2555 | pub const SPRDI_FIND_DUPS: DWORD = 0x00000001; | |
2556 | extern "system" { | |
2557 | pub fn SetupDiRegisterDeviceInfo( | |
2558 | DeviceInfoSet: HDEVINFO, | |
2559 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2560 | Flags: DWORD, | |
2561 | CompareProc: PSP_DETSIG_CMPPROC, | |
2562 | CompareContext: PVOID, | |
2563 | DupDeviceInfoData: PSP_DEVINFO_DATA, | |
2564 | ) -> BOOL; | |
2565 | } | |
2566 | pub const SPDIT_NODRIVER: DWORD = 0x00000000; | |
2567 | pub const SPDIT_CLASSDRIVER: DWORD = 0x00000001; | |
2568 | pub const SPDIT_COMPATDRIVER: DWORD = 0x00000002; | |
2569 | extern "system" { | |
2570 | pub fn SetupDiBuildDriverInfoList( | |
2571 | DeviceInfoSet: HDEVINFO, | |
2572 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2573 | DriverType: DWORD, | |
2574 | ) -> BOOL; | |
2575 | pub fn SetupDiCancelDriverInfoSearch( | |
2576 | DeviceInfoSet: HDEVINFO, | |
2577 | ) -> BOOL; | |
2578 | pub fn SetupDiEnumDriverInfoA( | |
2579 | DeviceInfoSet: HDEVINFO, | |
2580 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2581 | DriverType: DWORD, | |
2582 | MemberIndex: DWORD, | |
2583 | DriverInfoData: PSP_DRVINFO_DATA_A, | |
2584 | ) -> BOOL; | |
2585 | pub fn SetupDiEnumDriverInfoW( | |
2586 | DeviceInfoSet: HDEVINFO, | |
2587 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2588 | DriverType: DWORD, | |
2589 | MemberIndex: DWORD, | |
2590 | DriverInfoData: PSP_DRVINFO_DATA_W, | |
2591 | ) -> BOOL; | |
2592 | pub fn SetupDiGetSelectedDriverA( | |
2593 | DeviceInfoSet: HDEVINFO, | |
2594 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2595 | DriverInfoData: PSP_DRVINFO_DATA_A, | |
2596 | ) -> BOOL; | |
2597 | pub fn SetupDiGetSelectedDriverW( | |
2598 | DeviceInfoSet: HDEVINFO, | |
2599 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2600 | DriverInfoData: PSP_DRVINFO_DATA_W, | |
2601 | ) -> BOOL; | |
2602 | pub fn SetupDiSetSelectedDriverA( | |
2603 | DeviceInfoSet: HDEVINFO, | |
2604 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2605 | DriverInfoData: PSP_DRVINFO_DATA_A, | |
2606 | ) -> BOOL; | |
2607 | pub fn SetupDiSetSelectedDriverW( | |
2608 | DeviceInfoSet: HDEVINFO, | |
2609 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2610 | DriverInfoData: PSP_DRVINFO_DATA_W, | |
2611 | ) -> BOOL; | |
2612 | pub fn SetupDiGetDriverInfoDetailA( | |
2613 | DeviceInfoSet: HDEVINFO, | |
2614 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2615 | DriverInfoData: PSP_DRVINFO_DATA_A, | |
2616 | DriverInfoDetailData: PSP_DRVINFO_DETAIL_DATA_A, | |
2617 | DriverInfoDetailDataSize: DWORD, | |
2618 | RequiredSize: PDWORD, | |
2619 | ) -> BOOL; | |
2620 | pub fn SetupDiGetDriverInfoDetailW( | |
2621 | DeviceInfoSet: HDEVINFO, | |
2622 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2623 | DriverInfoData: PSP_DRVINFO_DATA_W, | |
2624 | DriverInfoDetailData: PSP_DRVINFO_DETAIL_DATA_W, | |
2625 | DriverInfoDetailDataSize: DWORD, | |
2626 | RequiredSize: PDWORD, | |
2627 | ) -> BOOL; | |
2628 | pub fn SetupDiDestroyDriverInfoList( | |
2629 | DeviceInfoSet: HDEVINFO, | |
2630 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2631 | DriverType: DWORD, | |
2632 | ) -> BOOL; | |
2633 | } | |
2634 | pub const DIGCF_DEFAULT: DWORD = 0x00000001; | |
2635 | pub const DIGCF_PRESENT: DWORD = 0x00000002; | |
2636 | pub const DIGCF_ALLCLASSES: DWORD = 0x00000004; | |
2637 | pub const DIGCF_PROFILE: DWORD = 0x00000008; | |
2638 | pub const DIGCF_DEVICEINTERFACE: DWORD = 0x00000010; | |
2639 | extern "system" { | |
2640 | pub fn SetupDiGetClassDevsA( | |
2641 | ClassGuid: *const GUID, | |
2642 | Enumerator: PCSTR, | |
2643 | hwndParent: HWND, | |
2644 | Flags: DWORD, | |
2645 | ) -> HDEVINFO; | |
2646 | pub fn SetupDiGetClassDevsW( | |
2647 | ClassGuid: *const GUID, | |
2648 | Enumerator: PCWSTR, | |
2649 | hwndParent: HWND, | |
2650 | Flags: DWORD, | |
2651 | ) -> HDEVINFO; | |
2652 | pub fn SetupDiGetClassDevsExA( | |
2653 | ClassGuid: *const GUID, | |
2654 | Enumerator: PCSTR, | |
2655 | hwndParent: HWND, | |
2656 | Flags: DWORD, | |
2657 | DeviceInfoSet: HDEVINFO, | |
2658 | MachineName: PCSTR, | |
2659 | Reserved: PVOID, | |
2660 | ) -> HDEVINFO; | |
2661 | pub fn SetupDiGetClassDevsExW( | |
2662 | ClassGuid: *const GUID, | |
2663 | Enumerator: PCWSTR, | |
2664 | hwndParent: HWND, | |
2665 | Flags: DWORD, | |
2666 | DeviceInfoSet: HDEVINFO, | |
2667 | MachineName: PCWSTR, | |
2668 | Reserved: PVOID, | |
2669 | ) -> HDEVINFO; | |
2670 | pub fn SetupDiGetINFClassA( | |
2671 | InfName: PCSTR, | |
2672 | ClassGuid: LPGUID, | |
2673 | ClassName: PSTR, | |
2674 | ClassNameSize: DWORD, | |
2675 | RequiredSize: PDWORD, | |
2676 | ) -> BOOL; | |
2677 | pub fn SetupDiGetINFClassW( | |
2678 | InfName: PCWSTR, | |
2679 | ClassGuid: LPGUID, | |
2680 | ClassName: PWSTR, | |
2681 | ClassNameSize: DWORD, | |
2682 | RequiredSize: PDWORD, | |
2683 | ) -> BOOL; | |
2684 | } | |
2685 | pub const DIBCI_NOINSTALLCLASS: DWORD = 0x00000001; | |
2686 | pub const DIBCI_NODISPLAYCLASS: DWORD = 0x00000002; | |
2687 | extern "system" { | |
2688 | pub fn SetupDiBuildClassInfoList( | |
2689 | Flags: DWORD, | |
2690 | ClassGuidList: LPGUID, | |
2691 | ClassGuidListSize: DWORD, | |
2692 | RequiredSize: PDWORD, | |
2693 | ) -> BOOL; | |
2694 | pub fn SetupDiBuildClassInfoListExA( | |
2695 | Flags: DWORD, | |
2696 | ClassGuidList: LPGUID, | |
2697 | ClassGuidListSize: DWORD, | |
2698 | RequiredSize: PDWORD, | |
2699 | MachineName: PCSTR, | |
2700 | Reserved: PVOID, | |
2701 | ) -> BOOL; | |
2702 | pub fn SetupDiBuildClassInfoListExW( | |
2703 | Flags: DWORD, | |
2704 | ClassGuidList: LPGUID, | |
2705 | ClassGuidListSize: DWORD, | |
2706 | RequiredSize: PDWORD, | |
2707 | MachineName: PCWSTR, | |
2708 | Reserved: PVOID, | |
2709 | ) -> BOOL; | |
2710 | pub fn SetupDiGetClassDescriptionA( | |
2711 | ClassGuid: *const GUID, | |
2712 | ClassDescription: PSTR, | |
2713 | ClassDescriptionSize: DWORD, | |
2714 | RequiredSize: PDWORD, | |
2715 | ) -> BOOL; | |
2716 | pub fn SetupDiGetClassDescriptionW( | |
2717 | ClassGuid: *const GUID, | |
2718 | ClassDescription: PWSTR, | |
2719 | ClassDescriptionSize: DWORD, | |
2720 | RequiredSize: PDWORD, | |
2721 | ) -> BOOL; | |
2722 | pub fn SetupDiGetClassDescriptionExA( | |
2723 | ClassGuid: *const GUID, | |
2724 | ClassDescription: PSTR, | |
2725 | ClassDescriptionSize: DWORD, | |
2726 | RequiredSize: PDWORD, | |
2727 | MachineName: PCSTR, | |
2728 | Reserved: PVOID, | |
2729 | ) -> BOOL; | |
2730 | pub fn SetupDiGetClassDescriptionExW( | |
2731 | ClassGuid: *const GUID, | |
2732 | ClassDescription: PWSTR, | |
2733 | ClassDescriptionSize: DWORD, | |
2734 | RequiredSize: PDWORD, | |
2735 | MachineName: PCWSTR, | |
2736 | Reserved: PVOID, | |
2737 | ) -> BOOL; | |
2738 | pub fn SetupDiCallClassInstaller( | |
2739 | InstallFunction: DI_FUNCTION, | |
2740 | DeviceInfoSet: HDEVINFO, | |
2741 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2742 | ) -> BOOL; | |
2743 | pub fn SetupDiSelectDevice( | |
2744 | DeviceInfoSet: HDEVINFO, | |
2745 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2746 | ) -> BOOL; | |
2747 | pub fn SetupDiSelectBestCompatDrv( | |
2748 | DeviceInfoSet: HDEVINFO, | |
2749 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2750 | ) -> BOOL; | |
2751 | pub fn SetupDiInstallDevice( | |
2752 | DeviceInfoSet: HDEVINFO, | |
2753 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2754 | ) -> BOOL; | |
2755 | pub fn SetupDiInstallDriverFiles( | |
2756 | DeviceInfoSet: HDEVINFO, | |
2757 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2758 | ) -> BOOL; | |
2759 | pub fn SetupDiRegisterCoDeviceInstallers( | |
2760 | DeviceInfoSet: HDEVINFO, | |
2761 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2762 | ) -> BOOL; | |
2763 | pub fn SetupDiRemoveDevice( | |
2764 | DeviceInfoSet: HDEVINFO, | |
2765 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2766 | ) -> BOOL; | |
2767 | pub fn SetupDiUnremoveDevice( | |
2768 | DeviceInfoSet: HDEVINFO, | |
2769 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2770 | ) -> BOOL; | |
2771 | pub fn SetupDiRestartDevices( | |
2772 | DeviceInfoSet: HDEVINFO, | |
2773 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2774 | ) -> BOOL; | |
2775 | pub fn SetupDiChangeState( | |
2776 | DeviceInfoSet: HDEVINFO, | |
2777 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2778 | ) -> BOOL; | |
2779 | pub fn SetupDiInstallClassA( | |
2780 | hwndParent: HWND, | |
2781 | InfFileName: PCSTR, | |
2782 | Flags: DWORD, | |
2783 | FileQueue: HSPFILEQ, | |
2784 | ) -> BOOL; | |
2785 | pub fn SetupDiInstallClassW( | |
2786 | hwndParent: HWND, | |
2787 | InfFileName: PCWSTR, | |
2788 | Flags: DWORD, | |
2789 | FileQueue: HSPFILEQ, | |
2790 | ) -> BOOL; | |
2791 | pub fn SetupDiInstallClassExA( | |
2792 | hwndParent: HWND, | |
2793 | InfFileName: PCSTR, | |
2794 | Flags: DWORD, | |
2795 | FileQueue: HSPFILEQ, | |
2796 | InterfaceClassGuid: *const GUID, | |
2797 | Reserved1: PVOID, | |
2798 | Reserved2: PVOID, | |
2799 | ) -> BOOL; | |
2800 | pub fn SetupDiInstallClassExW( | |
2801 | hwndParent: HWND, | |
2802 | InfFileName: PCWSTR, | |
2803 | Flags: DWORD, | |
2804 | FileQueue: HSPFILEQ, | |
2805 | InterfaceClassGuid: *const GUID, | |
2806 | Reserved1: PVOID, | |
2807 | Reserved2: PVOID, | |
2808 | ) -> BOOL; | |
2809 | pub fn SetupDiOpenClassRegKey( | |
2810 | ClassGuid: *const GUID, | |
2811 | samDesired: REGSAM, | |
2812 | ) -> HKEY; | |
2813 | } | |
2814 | pub const DIOCR_INSTALLER: DWORD = 0x00000001; | |
2815 | pub const DIOCR_INTERFACE: DWORD = 0x00000002; | |
2816 | extern "system" { | |
2817 | pub fn SetupDiOpenClassRegKeyExA( | |
2818 | ClassGuid: *const GUID, | |
2819 | samDesired: REGSAM, | |
2820 | Flags: DWORD, | |
2821 | MachineName: PCSTR, | |
2822 | Reserved: PVOID, | |
2823 | ) -> HKEY; | |
2824 | pub fn SetupDiOpenClassRegKeyExW( | |
2825 | ClassGuid: *const GUID, | |
2826 | samDesired: REGSAM, | |
2827 | Flags: DWORD, | |
2828 | MachineName: PCWSTR, | |
2829 | Reserved: PVOID, | |
2830 | ) -> HKEY; | |
2831 | pub fn SetupDiCreateDeviceInterfaceRegKeyA( | |
2832 | DeviceInfoSet: HDEVINFO, | |
2833 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2834 | Reserved: DWORD, | |
2835 | samDesired: REGSAM, | |
2836 | InfHandle: HINF, | |
2837 | InfSectionName: PCSTR, | |
2838 | ) -> HKEY; | |
2839 | pub fn SetupDiCreateDeviceInterfaceRegKeyW( | |
2840 | DeviceInfoSet: HDEVINFO, | |
2841 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2842 | Reserved: DWORD, | |
2843 | samDesired: REGSAM, | |
2844 | InfHandle: HINF, | |
2845 | InfSectionName: PCWSTR, | |
2846 | ) -> HKEY; | |
2847 | pub fn SetupDiOpenDeviceInterfaceRegKey( | |
2848 | DeviceInfoSet: HDEVINFO, | |
2849 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2850 | Reserved: DWORD, | |
2851 | samDesired: REGSAM, | |
2852 | ) -> HKEY; | |
2853 | pub fn SetupDiDeleteDeviceInterfaceRegKey( | |
2854 | DeviceInfoSet: HDEVINFO, | |
2855 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2856 | Reserved: DWORD, | |
2857 | ) -> BOOL; | |
2858 | } | |
2859 | pub const DIREG_DEV: DWORD = 0x00000001; | |
2860 | pub const DIREG_DRV: DWORD = 0x00000002; | |
2861 | pub const DIREG_BOTH: DWORD = 0x00000004; | |
2862 | extern "system" { | |
2863 | pub fn SetupDiCreateDevRegKeyA( | |
2864 | DeviceInfoSet: HDEVINFO, | |
2865 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2866 | Scope: DWORD, | |
2867 | HwProfile: DWORD, | |
2868 | KeyType: DWORD, | |
2869 | InfHandle: HINF, | |
2870 | InfSectionName: PCSTR, | |
2871 | ) -> HKEY; | |
2872 | pub fn SetupDiCreateDevRegKeyW( | |
2873 | DeviceInfoSet: HDEVINFO, | |
2874 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2875 | Scope: DWORD, | |
2876 | HwProfile: DWORD, | |
2877 | KeyType: DWORD, | |
2878 | InfHandle: HINF, | |
2879 | InfSectionName: PCWSTR, | |
2880 | ) -> HKEY; | |
2881 | pub fn SetupDiOpenDevRegKey( | |
2882 | DeviceInfoSet: HDEVINFO, | |
2883 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2884 | Scope: DWORD, | |
2885 | HwProfile: DWORD, | |
2886 | KeyType: DWORD, | |
2887 | samDesired: REGSAM, | |
2888 | ) -> HKEY; | |
2889 | pub fn SetupDiDeleteDevRegKey( | |
2890 | DeviceInfoSet: HDEVINFO, | |
2891 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2892 | Scope: DWORD, | |
2893 | HwProfile: DWORD, | |
2894 | KeyType: DWORD, | |
2895 | ) -> BOOL; | |
2896 | pub fn SetupDiGetHwProfileList( | |
2897 | HwProfileList: PDWORD, | |
2898 | HwProfileListSize: DWORD, | |
2899 | RequiredSize: PDWORD, | |
2900 | CurrentlyActiveIndex: PDWORD, | |
2901 | ) -> BOOL; | |
2902 | pub fn SetupDiGetHwProfileListExA( | |
2903 | HwProfileList: PDWORD, | |
2904 | HwProfileListSize: DWORD, | |
2905 | RequiredSize: PDWORD, | |
2906 | CurrentlyActiveIndex: PDWORD, | |
2907 | MachineName: PCSTR, | |
2908 | Reserved: PVOID, | |
2909 | ) -> BOOL; | |
2910 | pub fn SetupDiGetHwProfileListExW( | |
2911 | HwProfileList: PDWORD, | |
2912 | HwProfileListSize: DWORD, | |
2913 | RequiredSize: PDWORD, | |
2914 | CurrentlyActiveIndex: PDWORD, | |
2915 | MachineName: PCWSTR, | |
2916 | Reserved: PVOID, | |
2917 | ) -> BOOL; | |
2918 | pub fn SetupDiGetDevicePropertyKeys( | |
2919 | DeviceInfoSet: HDEVINFO, | |
2920 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2921 | PropertyKeyArray: *mut DEVPROPKEY, | |
2922 | PropertyKeyCount: DWORD, | |
2923 | RequiredPropertyKeyCount: PDWORD, | |
2924 | Flags: DWORD, | |
2925 | ) -> BOOL; | |
2926 | pub fn SetupDiGetDevicePropertyW( | |
2927 | DeviceInfoSet: HDEVINFO, | |
2928 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2929 | PropertyKey: *const DEVPROPKEY, | |
2930 | PropertyType: *mut DEVPROPTYPE, | |
2931 | PropertyBuffer: PBYTE, | |
2932 | PropertyBufferSize: DWORD, | |
2933 | RequiredSize: PDWORD, | |
2934 | Flags: DWORD, | |
2935 | ) -> BOOL; | |
2936 | pub fn SetupDiSetDevicePropertyW( | |
2937 | DeviceInfoSet: HDEVINFO, | |
2938 | DeviceInfoData: PSP_DEVINFO_DATA, | |
2939 | PropertyKey: *const DEVPROPKEY, | |
2940 | PropertyType: DEVPROPTYPE, | |
2941 | PropertyBuffer: *const BYTE, | |
2942 | PropertyBufferSize: DWORD, | |
2943 | Flags: DWORD, | |
2944 | ) -> BOOL; | |
2945 | pub fn SetupDiGetDeviceInterfacePropertyKeys( | |
2946 | DeviceInfoSet: HDEVINFO, | |
2947 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2948 | PropertyKeyArray: *mut DEVPROPKEY, | |
2949 | PropertyKeyCount: DWORD, | |
2950 | RequiredPropertyKeyCount: PDWORD, | |
2951 | Flags: DWORD, | |
2952 | ) -> BOOL; | |
2953 | pub fn SetupDiGetDeviceInterfacePropertyW( | |
2954 | DeviceInfoSet: HDEVINFO, | |
2955 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2956 | PropertyKey: *const DEVPROPKEY, | |
2957 | PropertyType: *mut DEVPROPTYPE, | |
2958 | PropertyBuffer: PBYTE, | |
2959 | PropertyBufferSize: DWORD, | |
2960 | RequiredSize: PDWORD, | |
2961 | Flags: DWORD, | |
2962 | ) -> BOOL; | |
2963 | pub fn SetupDiSetDeviceInterfacePropertyW( | |
2964 | DeviceInfoSet: HDEVINFO, | |
2965 | DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA, | |
2966 | PropertyKey: *const DEVPROPKEY, | |
2967 | PropertyType: DEVPROPTYPE, | |
2968 | PropertyBuffer: *const BYTE, | |
2969 | PropertyBufferSize: DWORD, | |
2970 | Flags: DWORD, | |
2971 | ) -> BOOL; | |
2972 | } | |
2973 | pub const DICLASSPROP_INSTALLER: DWORD = 0x00000001; | |
2974 | pub const DICLASSPROP_INTERFACE: DWORD = 0x00000002; | |
2975 | extern "system" { | |
2976 | pub fn SetupDiGetClassPropertyKeys( | |
2977 | ClassGuid: *const GUID, | |
2978 | PropertyKeyArray: *mut DEVPROPKEY, | |
2979 | PropertyKeyCount: DWORD, | |
2980 | RequiredPropertyKeyCount: PDWORD, | |
2981 | Flags: DWORD, | |
2982 | ) -> BOOL; | |
2983 | pub fn SetupDiGetClassPropertyKeysExW( | |
2984 | ClassGuid: *const GUID, | |
2985 | PropertyKeyArray: *mut DEVPROPKEY, | |
2986 | PropertyKeyCount: DWORD, | |
2987 | RequiredPropertyKeyCount: PDWORD, | |
2988 | Flags: DWORD, | |
2989 | MachineName: PCWSTR, | |
2990 | Reserved: PVOID, | |
2991 | ) -> BOOL; | |
2992 | pub fn SetupDiGetClassPropertyW( | |
2993 | ClassGuid: *const GUID, | |
2994 | PropertyKey: *const DEVPROPKEY, | |
2995 | PropertyType: *mut DEVPROPTYPE, | |
2996 | PropertyBuffer: PBYTE, | |
2997 | PropertyBufferSize: DWORD, | |
2998 | RequiredSize: PDWORD, | |
2999 | Flags: DWORD, | |
3000 | ) -> BOOL; | |
3001 | pub fn SetupDiGetClassPropertyExW( | |
3002 | ClassGuid: *const GUID, | |
3003 | PropertyKey: *const DEVPROPKEY, | |
3004 | PropertyType: *mut DEVPROPTYPE, | |
3005 | PropertyBuffer: PBYTE, | |
3006 | PropertyBufferSize: DWORD, | |
3007 | RequiredSize: PDWORD, | |
3008 | Flags: DWORD, | |
3009 | MachineName: PCWSTR, | |
3010 | Reserved: PVOID, | |
3011 | ) -> BOOL; | |
3012 | pub fn SetupDiSetClassPropertyW( | |
3013 | ClassGuid: *const GUID, | |
3014 | PropertyKey: *const DEVPROPKEY, | |
3015 | PropertyType: DEVPROPTYPE, | |
3016 | PropertyBuffer: *const BYTE, | |
3017 | PropertyBufferSize: DWORD, | |
3018 | Flags: DWORD, | |
3019 | ) -> BOOL; | |
3020 | pub fn SetupDiSetClassPropertyExW( | |
3021 | ClassGuid: *const GUID, | |
3022 | PropertyKey: *const DEVPROPKEY, | |
3023 | PropertyType: DEVPROPTYPE, | |
3024 | PropertyBuffer: *const BYTE, | |
3025 | PropertyBufferSize: DWORD, | |
3026 | Flags: DWORD, | |
3027 | MachineName: PCWSTR, | |
3028 | Reserved: PVOID, | |
3029 | ) -> BOOL; | |
3030 | } | |
3031 | pub const SPDRP_DEVICEDESC: DWORD = 0x00000000; | |
3032 | pub const SPDRP_HARDWAREID: DWORD = 0x00000001; | |
3033 | pub const SPDRP_COMPATIBLEIDS: DWORD = 0x00000002; | |
3034 | pub const SPDRP_UNUSED0: DWORD = 0x00000003; | |
3035 | pub const SPDRP_SERVICE: DWORD = 0x00000004; | |
3036 | pub const SPDRP_UNUSED1: DWORD = 0x00000005; | |
3037 | pub const SPDRP_UNUSED2: DWORD = 0x00000006; | |
3038 | pub const SPDRP_CLASS: DWORD = 0x00000007; | |
3039 | pub const SPDRP_CLASSGUID: DWORD = 0x00000008; | |
3040 | pub const SPDRP_DRIVER: DWORD = 0x00000009; | |
3041 | pub const SPDRP_CONFIGFLAGS: DWORD = 0x0000000A; | |
3042 | pub const SPDRP_MFG: DWORD = 0x0000000B; | |
3043 | pub const SPDRP_FRIENDLYNAME: DWORD = 0x0000000C; | |
3044 | pub const SPDRP_LOCATION_INFORMATION: DWORD = 0x0000000D; | |
3045 | pub const SPDRP_PHYSICAL_DEVICE_OBJECT_NAME: DWORD = 0x0000000E; | |
3046 | pub const SPDRP_CAPABILITIES: DWORD = 0x0000000F; | |
3047 | pub const SPDRP_UI_NUMBER: DWORD = 0x00000010; | |
3048 | pub const SPDRP_UPPERFILTERS: DWORD = 0x00000011; | |
3049 | pub const SPDRP_LOWERFILTERS: DWORD = 0x00000012; | |
3050 | pub const SPDRP_BUSTYPEGUID: DWORD = 0x00000013; | |
3051 | pub const SPDRP_LEGACYBUSTYPE: DWORD = 0x00000014; | |
3052 | pub const SPDRP_BUSNUMBER: DWORD = 0x00000015; | |
3053 | pub const SPDRP_ENUMERATOR_NAME: DWORD = 0x00000016; | |
3054 | pub const SPDRP_SECURITY: DWORD = 0x00000017; | |
3055 | pub const SPDRP_SECURITY_SDS: DWORD = 0x00000018; | |
3056 | pub const SPDRP_DEVTYPE: DWORD = 0x00000019; | |
3057 | pub const SPDRP_EXCLUSIVE: DWORD = 0x0000001A; | |
3058 | pub const SPDRP_CHARACTERISTICS: DWORD = 0x0000001B; | |
3059 | pub const SPDRP_ADDRESS: DWORD = 0x0000001C; | |
3060 | pub const SPDRP_UI_NUMBER_DESC_FORMAT: DWORD = 0x0000001D; | |
3061 | pub const SPDRP_DEVICE_POWER_DATA: DWORD = 0x0000001E; | |
3062 | pub const SPDRP_REMOVAL_POLICY: DWORD = 0x0000001F; | |
3063 | pub const SPDRP_REMOVAL_POLICY_HW_DEFAULT: DWORD = 0x00000020; | |
3064 | pub const SPDRP_REMOVAL_POLICY_OVERRIDE: DWORD = 0x00000021; | |
3065 | pub const SPDRP_INSTALL_STATE: DWORD = 0x00000022; | |
3066 | pub const SPDRP_LOCATION_PATHS: DWORD = 0x00000023; | |
3067 | pub const SPDRP_BASE_CONTAINERID: DWORD = 0x00000024; | |
3068 | pub const SPDRP_MAXIMUM_PROPERTY: DWORD = 0x00000025; | |
3069 | pub const SPCRP_UPPERFILTERS: DWORD = 0x00000011; | |
3070 | pub const SPCRP_LOWERFILTERS: DWORD = 0x00000012; | |
3071 | pub const SPCRP_SECURITY: DWORD = 0x00000017; | |
3072 | pub const SPCRP_SECURITY_SDS: DWORD = 0x00000018; | |
3073 | pub const SPCRP_DEVTYPE: DWORD = 0x00000019; | |
3074 | pub const SPCRP_EXCLUSIVE: DWORD = 0x0000001A; | |
3075 | pub const SPCRP_CHARACTERISTICS: DWORD = 0x0000001B; | |
3076 | pub const SPCRP_MAXIMUM_PROPERTY: DWORD = 0x0000001C; | |
3077 | extern "system" { | |
3078 | pub fn SetupDiGetDeviceRegistryPropertyA( | |
3079 | DeviceInfoSet: HDEVINFO, | |
3080 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3081 | Property: DWORD, | |
3082 | PropertyRegDataType: PDWORD, | |
3083 | PropertyBuffer: PBYTE, | |
3084 | PropertyBufferSize: DWORD, | |
3085 | RequiredSize: PDWORD, | |
3086 | ) -> BOOL; | |
3087 | pub fn SetupDiGetDeviceRegistryPropertyW( | |
3088 | DeviceInfoSet: HDEVINFO, | |
3089 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3090 | Property: DWORD, | |
3091 | PropertyRegDataType: PDWORD, | |
3092 | PropertyBuffer: PBYTE, | |
3093 | PropertyBufferSize: DWORD, | |
3094 | RequiredSize: PDWORD, | |
3095 | ) -> BOOL; | |
3096 | pub fn SetupDiGetClassRegistryPropertyA( | |
3097 | ClassGuid: *const GUID, | |
3098 | Property: DWORD, | |
3099 | PropertyRegDataType: PDWORD, | |
3100 | PropertyBuffer: PBYTE, | |
3101 | PropertyBufferSize: DWORD, | |
3102 | RequiredSize: PDWORD, | |
3103 | MachineName: PCSTR, | |
3104 | Reserved: PVOID, | |
3105 | ) -> BOOL; | |
3106 | pub fn SetupDiGetClassRegistryPropertyW( | |
3107 | ClassGuid: *const GUID, | |
3108 | Property: DWORD, | |
3109 | PropertyRegDataType: PDWORD, | |
3110 | PropertyBuffer: PBYTE, | |
3111 | PropertyBufferSize: DWORD, | |
3112 | RequiredSize: PDWORD, | |
3113 | MachineName: PCWSTR, | |
3114 | Reserved: PVOID, | |
3115 | ) -> BOOL; | |
3116 | pub fn SetupDiSetDeviceRegistryPropertyA( | |
3117 | DeviceInfoSet: HDEVINFO, | |
3118 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3119 | Property: DWORD, | |
3120 | PropertyBuffer: *const BYTE, | |
3121 | PropertyBufferSize: DWORD, | |
3122 | ) -> BOOL; | |
3123 | pub fn SetupDiSetDeviceRegistryPropertyW( | |
3124 | DeviceInfoSet: HDEVINFO, | |
3125 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3126 | Property: DWORD, | |
3127 | PropertyBuffer: *const BYTE, | |
3128 | PropertyBufferSize: DWORD, | |
3129 | ) -> BOOL; | |
3130 | pub fn SetupDiSetClassRegistryPropertyA( | |
3131 | ClassGuid: *const GUID, | |
3132 | Property: DWORD, | |
3133 | PropertyBuffer: *const BYTE, | |
3134 | PropertyBufferSize: DWORD, | |
3135 | MachineName: PCSTR, | |
3136 | Reserved: PVOID, | |
3137 | ) -> BOOL; | |
3138 | pub fn SetupDiSetClassRegistryPropertyW( | |
3139 | ClassGuid: *const GUID, | |
3140 | Property: DWORD, | |
3141 | PropertyBuffer: *const BYTE, | |
3142 | PropertyBufferSize: DWORD, | |
3143 | MachineName: PCWSTR, | |
3144 | Reserved: PVOID, | |
3145 | ) -> BOOL; | |
3146 | pub fn SetupDiGetDeviceInstallParamsA( | |
3147 | DeviceInfoSet: HDEVINFO, | |
3148 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3149 | DeviceInstallParams: PSP_DEVINSTALL_PARAMS_A, | |
3150 | ) -> BOOL; | |
3151 | pub fn SetupDiGetDeviceInstallParamsW( | |
3152 | DeviceInfoSet: HDEVINFO, | |
3153 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3154 | DeviceInstallParams: PSP_DEVINSTALL_PARAMS_W, | |
3155 | ) -> BOOL; | |
3156 | pub fn SetupDiGetClassInstallParamsA( | |
3157 | DeviceInfoSet: HDEVINFO, | |
3158 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3159 | ClassInstallParams: PSP_CLASSINSTALL_HEADER, | |
3160 | ClassInstallParamsSize: DWORD, | |
3161 | RequiredSize: PDWORD, | |
3162 | ) -> BOOL; | |
3163 | pub fn SetupDiGetClassInstallParamsW( | |
3164 | DeviceInfoSet: HDEVINFO, | |
3165 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3166 | ClassInstallParams: PSP_CLASSINSTALL_HEADER, | |
3167 | ClassInstallParamsSize: DWORD, | |
3168 | RequiredSize: PDWORD, | |
3169 | ) -> BOOL; | |
3170 | pub fn SetupDiSetDeviceInstallParamsA( | |
3171 | DeviceInfoSet: HDEVINFO, | |
3172 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3173 | DeviceInstallParams: PSP_DEVINSTALL_PARAMS_A, | |
3174 | ) -> BOOL; | |
3175 | pub fn SetupDiSetDeviceInstallParamsW( | |
3176 | DeviceInfoSet: HDEVINFO, | |
3177 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3178 | DeviceInstallParams: PSP_DEVINSTALL_PARAMS_W, | |
3179 | ) -> BOOL; | |
3180 | pub fn SetupDiSetClassInstallParamsA( | |
3181 | DeviceInfoSet: HDEVINFO, | |
3182 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3183 | ClassInstallParams: PSP_CLASSINSTALL_HEADER, | |
3184 | ClassInstallParamsSize: DWORD, | |
3185 | ) -> BOOL; | |
3186 | pub fn SetupDiSetClassInstallParamsW( | |
3187 | DeviceInfoSet: HDEVINFO, | |
3188 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3189 | ClassInstallParams: PSP_CLASSINSTALL_HEADER, | |
3190 | ClassInstallParamsSize: DWORD, | |
3191 | ) -> BOOL; | |
3192 | pub fn SetupDiGetDriverInstallParamsA( | |
3193 | DeviceInfoSet: HDEVINFO, | |
3194 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3195 | DriverInfoData: PSP_DRVINFO_DATA_A, | |
3196 | DriverInstallParams: PSP_DRVINSTALL_PARAMS, | |
3197 | ) -> BOOL; | |
3198 | pub fn SetupDiGetDriverInstallParamsW( | |
3199 | DeviceInfoSet: HDEVINFO, | |
3200 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3201 | DriverInfoData: PSP_DRVINFO_DATA_W, | |
3202 | DriverInstallParams: PSP_DRVINSTALL_PARAMS, | |
3203 | ) -> BOOL; | |
3204 | pub fn SetupDiSetDriverInstallParamsA( | |
3205 | DeviceInfoSet: HDEVINFO, | |
3206 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3207 | DriverInfoData: PSP_DRVINFO_DATA_A, | |
3208 | DriverInstallParams: PSP_DRVINSTALL_PARAMS, | |
3209 | ) -> BOOL; | |
3210 | pub fn SetupDiSetDriverInstallParamsW( | |
3211 | DeviceInfoSet: HDEVINFO, | |
3212 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3213 | DriverInfoData: PSP_DRVINFO_DATA_W, | |
3214 | DriverInstallParams: PSP_DRVINSTALL_PARAMS, | |
3215 | ) -> BOOL; | |
3216 | pub fn SetupDiLoadClassIcon( | |
3217 | ClassGuid: *const GUID, | |
3218 | LargeIcon: *mut HICON, | |
3219 | MiniIconIndex: PINT, | |
3220 | ) -> BOOL; | |
3221 | pub fn SetupDiLoadDeviceIcon( | |
3222 | DeviceInfoSet: HDEVINFO, | |
3223 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3224 | cxIcon: UINT, | |
3225 | cyIcon: UINT, | |
3226 | Flags: DWORD, | |
3227 | hIcon: *mut HICON, | |
3228 | ) -> BOOL; | |
3229 | } | |
3230 | pub const DMI_MASK: DWORD = 0x00000001; | |
3231 | pub const DMI_BKCOLOR: DWORD = 0x00000002; | |
3232 | pub const DMI_USERECT: DWORD = 0x00000004; | |
3233 | extern "system" { | |
3234 | pub fn SetupDiDrawMiniIcon( | |
3235 | hdc: HDC, | |
3236 | rc: RECT, | |
3237 | MiniIconIndex: INT, | |
3238 | Flags: DWORD, | |
3239 | ) -> INT; | |
3240 | pub fn SetupDiGetClassBitmapIndex( | |
3241 | ClassGuid: *const GUID, | |
3242 | MiniIconIndex: PINT, | |
3243 | ) -> BOOL; | |
3244 | pub fn SetupDiGetClassImageList( | |
3245 | ClassImageListData: PSP_CLASSIMAGELIST_DATA, | |
3246 | ) -> BOOL; | |
3247 | pub fn SetupDiGetClassImageListExA( | |
3248 | ClassImageListData: PSP_CLASSIMAGELIST_DATA, | |
3249 | MachineName: PCSTR, | |
3250 | Reserved: PVOID, | |
3251 | ) -> BOOL; | |
3252 | pub fn SetupDiGetClassImageListExW( | |
3253 | ClassImageListData: PSP_CLASSIMAGELIST_DATA, | |
3254 | MachineName: PCWSTR, | |
3255 | Reserved: PVOID, | |
3256 | ) -> BOOL; | |
3257 | pub fn SetupDiGetClassImageIndex( | |
3258 | ClassImageListData: PSP_CLASSIMAGELIST_DATA, | |
3259 | ClassGuid: *const GUID, | |
3260 | ImageIndex: PINT, | |
3261 | ) -> BOOL; | |
3262 | pub fn SetupDiDestroyClassImageList( | |
3263 | ClassImageListData: PSP_CLASSIMAGELIST_DATA, | |
3264 | ) -> BOOL; | |
3265 | } | |
3266 | pub const DIGCDP_FLAG_BASIC: DWORD = 0x00000001; | |
3267 | pub const DIGCDP_FLAG_ADVANCED: DWORD = 0x00000002; | |
3268 | pub const DIGCDP_FLAG_REMOTE_BASIC: DWORD = 0x00000003; | |
3269 | pub const DIGCDP_FLAG_REMOTE_ADVANCED: DWORD = 0x00000004; | |
3270 | extern "system" { | |
3271 | pub fn SetupDiGetClassDevPropertySheetsA( | |
3272 | DeviceInfoSet: HDEVINFO, | |
3273 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3274 | PropertySheetHeader: LPPROPSHEETHEADERA, | |
3275 | PropertySheetHeaderPageListSize: DWORD, | |
3276 | RequiredSize: PDWORD, | |
3277 | PropertySheetType: DWORD, | |
3278 | ) -> BOOL; | |
3279 | pub fn SetupDiGetClassDevPropertySheetsW( | |
3280 | DeviceInfoSet: HDEVINFO, | |
3281 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3282 | PropertySheetHeader: LPPROPSHEETHEADERW, | |
3283 | PropertySheetHeaderPageListSize: DWORD, | |
3284 | RequiredSize: PDWORD, | |
3285 | PropertySheetType: DWORD, | |
3286 | ) -> BOOL; | |
3287 | } | |
3288 | pub const IDI_RESOURCEFIRST: c_int = 159; | |
3289 | pub const IDI_RESOURCE: c_int = 159; | |
3290 | pub const IDI_RESOURCELAST: c_int = 161; | |
3291 | pub const IDI_RESOURCEOVERLAYFIRST: c_int = 161; | |
3292 | pub const IDI_RESOURCEOVERLAYLAST: c_int = 161; | |
3293 | pub const IDI_CONFLICT: c_int = 161; | |
3294 | pub const IDI_CLASSICON_OVERLAYFIRST: c_int = 500; | |
3295 | pub const IDI_CLASSICON_OVERLAYLAST: c_int = 502; | |
3296 | pub const IDI_PROBLEM_OVL: c_int = 500; | |
3297 | pub const IDI_DISABLED_OVL: c_int = 501; | |
3298 | pub const IDI_FORCED_OVL: c_int = 502; | |
3299 | extern "system" { | |
3300 | pub fn SetupDiAskForOEMDisk( | |
3301 | DeviceInfoSet: HDEVINFO, | |
3302 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3303 | ) -> BOOL; | |
3304 | pub fn SetupDiSelectOEMDrv( | |
3305 | hwndParent: HWND, | |
3306 | DeviceInfoSet: HDEVINFO, | |
3307 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3308 | ) -> BOOL; | |
3309 | pub fn SetupDiClassNameFromGuidA( | |
3310 | ClassGuid: *const GUID, | |
3311 | ClassName: PSTR, | |
3312 | ClassNameSize: DWORD, | |
3313 | RequiredSize: PDWORD, | |
3314 | ) -> BOOL; | |
3315 | pub fn SetupDiClassNameFromGuidW( | |
3316 | ClassGuid: *const GUID, | |
3317 | ClassName: PWSTR, | |
3318 | ClassNameSize: DWORD, | |
3319 | RequiredSize: PDWORD, | |
3320 | ) -> BOOL; | |
3321 | pub fn SetupDiClassNameFromGuidExA( | |
3322 | ClassGuid: *const GUID, | |
3323 | ClassName: PSTR, | |
3324 | ClassNameSize: DWORD, | |
3325 | RequiredSize: PDWORD, | |
3326 | MachineName: PCSTR, | |
3327 | Reserved: PVOID, | |
3328 | ) -> BOOL; | |
3329 | pub fn SetupDiClassNameFromGuidExW( | |
3330 | ClassGuid: *const GUID, | |
3331 | ClassName: PWSTR, | |
3332 | ClassNameSize: DWORD, | |
3333 | RequiredSize: PDWORD, | |
3334 | MachineName: PCWSTR, | |
3335 | Reserved: PVOID, | |
3336 | ) -> BOOL; | |
3337 | pub fn SetupDiClassGuidsFromNameA( | |
3338 | ClassName: PCSTR, | |
3339 | ClassGuidList: LPGUID, | |
3340 | ClassGuidListSize: DWORD, | |
3341 | RequiredSize: PDWORD, | |
3342 | ) -> BOOL; | |
3343 | pub fn SetupDiClassGuidsFromNameW( | |
3344 | ClassName: PCWSTR, | |
3345 | ClassGuidList: LPGUID, | |
3346 | ClassGuidListSize: DWORD, | |
3347 | RequiredSize: PDWORD, | |
3348 | ) -> BOOL; | |
3349 | pub fn SetupDiClassGuidsFromNameExA( | |
3350 | ClassName: PCSTR, | |
3351 | ClassGuidList: LPGUID, | |
3352 | ClassGuidListSize: DWORD, | |
3353 | RequiredSize: PDWORD, | |
3354 | MachineName: PCSTR, | |
3355 | Reserved: PVOID, | |
3356 | ) -> BOOL; | |
3357 | pub fn SetupDiClassGuidsFromNameExW( | |
3358 | ClassName: PCWSTR, | |
3359 | ClassGuidList: LPGUID, | |
3360 | ClassGuidListSize: DWORD, | |
3361 | RequiredSize: PDWORD, | |
3362 | MachineName: PCWSTR, | |
3363 | Reserved: PVOID, | |
3364 | ) -> BOOL; | |
3365 | pub fn SetupDiGetHwProfileFriendlyNameA( | |
3366 | HwProfile: DWORD, | |
3367 | FriendlyName: PSTR, | |
3368 | FriendlyNameSize: DWORD, | |
3369 | RequiredSize: PDWORD, | |
3370 | ) -> BOOL; | |
3371 | pub fn SetupDiGetHwProfileFriendlyNameW( | |
3372 | HwProfile: DWORD, | |
3373 | FriendlyName: PWSTR, | |
3374 | FriendlyNameSize: DWORD, | |
3375 | RequiredSize: PDWORD, | |
3376 | ) -> BOOL; | |
3377 | pub fn SetupDiGetHwProfileFriendlyNameExA( | |
3378 | HwProfile: DWORD, | |
3379 | FriendlyName: PSTR, | |
3380 | FriendlyNameSize: DWORD, | |
3381 | RequiredSize: PDWORD, | |
3382 | MachineName: PCSTR, | |
3383 | Reserved: PVOID, | |
3384 | ) -> BOOL; | |
3385 | pub fn SetupDiGetHwProfileFriendlyNameExW( | |
3386 | HwProfile: DWORD, | |
3387 | FriendlyName: PWSTR, | |
3388 | FriendlyNameSize: DWORD, | |
3389 | RequiredSize: PDWORD, | |
3390 | MachineName: PCWSTR, | |
3391 | Reserved: PVOID, | |
3392 | ) -> BOOL; | |
3393 | } | |
3394 | pub const SPWPT_SELECTDEVICE: DWORD = 0x00000001; | |
3395 | pub const SPWP_USE_DEVINFO_DATA: DWORD = 0x00000001; | |
3396 | extern "system" { | |
3397 | pub fn SetupDiGetWizardPage( | |
3398 | DeviceInfoSet: HDEVINFO, | |
3399 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3400 | InstallWizardData: PSP_INSTALLWIZARD_DATA, | |
3401 | PageType: DWORD, | |
3402 | Flags: DWORD, | |
3403 | ) -> HPROPSHEETPAGE; | |
3404 | pub fn SetupDiGetSelectedDevice( | |
3405 | DeviceInfoSet: HDEVINFO, | |
3406 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3407 | ) -> BOOL; | |
3408 | pub fn SetupDiSetSelectedDevice( | |
3409 | DeviceInfoSet: HDEVINFO, | |
3410 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3411 | ) -> BOOL; | |
3412 | pub fn SetupDiGetActualModelsSectionA( | |
3413 | Context: PINFCONTEXT, | |
3414 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
3415 | InfSectionWithExt: PSTR, | |
3416 | InfSectionWithExtSize: DWORD, | |
3417 | RequiredSize: PDWORD, | |
3418 | Reserved: PVOID, | |
3419 | ) -> BOOL; | |
3420 | pub fn SetupDiGetActualModelsSectionW( | |
3421 | Context: PINFCONTEXT, | |
3422 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
3423 | InfSectionWithExt: PWSTR, | |
3424 | InfSectionWithExtSize: DWORD, | |
3425 | RequiredSize: PDWORD, | |
3426 | Reserved: PVOID, | |
3427 | ) -> BOOL; | |
3428 | pub fn SetupDiGetActualSectionToInstallA( | |
3429 | InfHandle: HINF, | |
3430 | InfSectionName: PCSTR, | |
3431 | InfSectionWithExt: PSTR, | |
3432 | InfSectionWithExtSize: DWORD, | |
3433 | RequiredSize: PDWORD, | |
3434 | Extension: *mut PSTR, | |
3435 | ) -> BOOL; | |
3436 | pub fn SetupDiGetActualSectionToInstallW( | |
3437 | InfHandle: HINF, | |
3438 | InfSectionName: PCWSTR, | |
3439 | InfSectionWithExt: PWSTR, | |
3440 | InfSectionWithExtSize: DWORD, | |
3441 | RequiredSize: PDWORD, | |
3442 | Extension: *mut PWSTR, | |
3443 | ) -> BOOL; | |
3444 | pub fn SetupDiGetActualSectionToInstallExA( | |
3445 | InfHandle: HINF, | |
3446 | InfSectionName: PCSTR, | |
3447 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
3448 | InfSectionWithExt: PSTR, | |
3449 | InfSectionWithExtSize: DWORD, | |
3450 | RequiredSize: PDWORD, | |
3451 | Extension: *mut PSTR, | |
3452 | Reserved: PVOID, | |
3453 | ) -> BOOL; | |
3454 | pub fn SetupDiGetActualSectionToInstallExW( | |
3455 | InfHandle: HINF, | |
3456 | InfSectionName: PCWSTR, | |
3457 | AlternatePlatformInfo: PSP_ALTPLATFORM_INFO, | |
3458 | InfSectionWithExt: PWSTR, | |
3459 | InfSectionWithExtSize: DWORD, | |
3460 | RequiredSize: PDWORD, | |
3461 | Extension: *mut PWSTR, | |
3462 | Reserved: PVOID, | |
3463 | ) -> BOOL; | |
3464 | pub fn SetupEnumInfSectionsA( | |
3465 | InfHandle: HINF, | |
3466 | Index: UINT, | |
3467 | Buffer: PSTR, | |
3468 | Size: UINT, | |
3469 | SizeNeeded: *mut UINT, | |
3470 | ) -> BOOL; | |
3471 | pub fn SetupEnumInfSectionsW( | |
3472 | InfHandle: HINF, | |
3473 | Index: UINT, | |
3474 | Buffer: PWSTR, | |
3475 | Size: UINT, | |
3476 | SizeNeeded: *mut UINT, | |
3477 | ) -> BOOL; | |
3478 | } | |
8faf50e0 | 3479 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V1_A { |
ff7c6d11 XL |
3480 | cbSize: DWORD, |
3481 | CatalogFile: [CHAR; MAX_PATH], | |
3482 | DigitalSigner: [CHAR; MAX_PATH], | |
3483 | DigitalSignerVersion: [CHAR; MAX_PATH], | |
3484 | }} | |
3485 | pub type PSP_INF_SIGNER_INFO_V1_A = *mut SP_INF_SIGNER_INFO_V1_A; | |
8faf50e0 | 3486 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V1_W { |
ff7c6d11 XL |
3487 | cbSize: DWORD, |
3488 | CatalogFile: [WCHAR; MAX_PATH], | |
3489 | DigitalSigner: [WCHAR; MAX_PATH], | |
3490 | DigitalSignerVersion: [WCHAR; MAX_PATH], | |
3491 | }} | |
3492 | pub type PSP_INF_SIGNER_INFO_V1_W = *mut SP_INF_SIGNER_INFO_V1_W; | |
8faf50e0 | 3493 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V2_A { |
ff7c6d11 XL |
3494 | cbSize: DWORD, |
3495 | CatalogFile: [CHAR; MAX_PATH], | |
3496 | DigitalSigner: [CHAR; MAX_PATH], | |
3497 | DigitalSignerVersion: [CHAR; MAX_PATH], | |
3498 | SignerScore: DWORD, | |
3499 | }} | |
3500 | pub type PSP_INF_SIGNER_INFO_V2_A = *mut SP_INF_SIGNER_INFO_V2_A; | |
8faf50e0 | 3501 | STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V2_W { |
ff7c6d11 XL |
3502 | cbSize: DWORD, |
3503 | CatalogFile: [WCHAR; MAX_PATH], | |
3504 | DigitalSigner: [WCHAR; MAX_PATH], | |
3505 | DigitalSignerVersion: [WCHAR; MAX_PATH], | |
3506 | SignerScore: DWORD, | |
3507 | }} | |
3508 | pub type PSP_INF_SIGNER_INFO_V2_W = *mut SP_INF_SIGNER_INFO_V2_W; | |
3509 | pub const SIGNERSCORE_UNKNOWN: DWORD = 0xFF000000; | |
3510 | pub const SIGNERSCORE_W9X_SUSPECT: DWORD = 0xC0000000; | |
3511 | pub const SIGNERSCORE_UNSIGNED: DWORD = 0x80000000; | |
3512 | pub const SIGNERSCORE_AUTHENTICODE: DWORD = 0x0F000000; | |
3513 | pub const SIGNERSCORE_WHQL: DWORD = 0x0D000005; | |
3514 | pub const SIGNERSCORE_UNCLASSIFIED: DWORD = 0x0D000004; | |
3515 | pub const SIGNERSCORE_INBOX: DWORD = 0x0D000003; | |
3516 | pub const SIGNERSCORE_LOGO_STANDARD: DWORD = 0x0D000002; | |
3517 | pub const SIGNERSCORE_LOGO_PREMIUM: DWORD = 0x0D000001; | |
3518 | pub const SIGNERSCORE_MASK: DWORD = 0xFF000000; | |
3519 | pub const SIGNERSCORE_SIGNED_MASK: DWORD = 0xF0000000; | |
3520 | pub type SP_INF_SIGNER_INFO_A = SP_INF_SIGNER_INFO_V2_A; | |
3521 | pub type PSP_INF_SIGNER_INFO_A = PSP_INF_SIGNER_INFO_V2_A; | |
3522 | pub type SP_INF_SIGNER_INFO_W = SP_INF_SIGNER_INFO_V2_W; | |
3523 | pub type PSP_INF_SIGNER_INFO_W = PSP_INF_SIGNER_INFO_V2_W; | |
3524 | extern "system" { | |
3525 | pub fn SetupVerifyInfFileA( | |
3526 | InfName: PCSTR, | |
3527 | AltPlatformInfo: PSP_ALTPLATFORM_INFO, | |
3528 | InfSignerInfo: PSP_INF_SIGNER_INFO_A, | |
3529 | ) -> BOOL; | |
3530 | pub fn SetupVerifyInfFileW( | |
3531 | InfName: PCWSTR, | |
3532 | AltPlatformInfo: PSP_ALTPLATFORM_INFO, | |
3533 | InfSignerInfo: PSP_INF_SIGNER_INFO_W, | |
3534 | ) -> BOOL; | |
3535 | } | |
3536 | pub const DICUSTOMDEVPROP_MERGE_MULTISZ: DWORD = 0x00000001; | |
3537 | extern "system" { | |
3538 | pub fn SetupDiGetCustomDevicePropertyA( | |
3539 | DeviceInfoSet: HDEVINFO, | |
3540 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3541 | CustomPropertyName: PCSTR, | |
3542 | Flags: DWORD, | |
3543 | PropertyRegDataType: PDWORD, | |
3544 | PropertyBuffer: PBYTE, | |
3545 | PropertyBufferSize: DWORD, | |
3546 | RequiredSize: PDWORD, | |
3547 | ) -> BOOL; | |
3548 | pub fn SetupDiGetCustomDevicePropertyW( | |
3549 | DeviceInfoSet: HDEVINFO, | |
3550 | DeviceInfoData: PSP_DEVINFO_DATA, | |
3551 | CustomPropertyName: PCWSTR, | |
3552 | Flags: DWORD, | |
3553 | PropertyRegDataType: PDWORD, | |
3554 | PropertyBuffer: PBYTE, | |
3555 | PropertyBufferSize: DWORD, | |
3556 | RequiredSize: PDWORD, | |
3557 | ) -> BOOL; | |
3558 | } | |
3559 | pub const SCWMI_CLOBBER_SECURITY: DWORD = 0x00000001; | |
3560 | extern "system" { | |
3561 | pub fn SetupConfigureWmiFromInfSectionA( | |
3562 | InfHandle: HINF, | |
3563 | SectionName: PCSTR, | |
3564 | Flags: DWORD, | |
3565 | ) -> BOOL; | |
3566 | pub fn SetupConfigureWmiFromInfSectionW( | |
3567 | InfHandle: HINF, | |
3568 | SectionName: PCWSTR, | |
3569 | Flags: DWORD, | |
3570 | ) -> BOOL; | |
3571 | } |