15#define WINSETUPAPI DECLSPEC_IMPORT
21#define MAX_INF_STRING_LENGTH 4096
22#define MAX_TITLE_LEN 60
23#define MAX_INSTRUCTION_LEN 256
24#define MAX_LABEL_LEN 30
25#define MAX_SERVICE_NAME_LEN 256
26#define MAX_SUBTITLE_LEN 256
27#define SP_MAX_MACHINENAME_LENGTH (MAX_PATH + 3)
29#define COPYFLG_WARN_IF_SKIP 0x00000001
30#define COPYFLG_NOSKIP 0x00000002
31#define COPYFLG_NOVERSIONCHECK 0x00000004
32#define COPYFLG_FORCE_FILE_IN_USE 0x00000008
33#define COPYFLG_NO_OVERWRITE 0x00000010
34#define COPYFLG_NO_VERSION_DIALOG 0x00000020
35#define COPYFLG_OVERWRITE_OLDER_ONLY 0x00000040
36#define COPYFLG_REPLACEONLY 0x00000400
37#define COPYFLG_NODECOMP 0x00000800
38#define COPYFLG_REPLACE_BOOT_FILE 0x00001000
39#define COPYFLG_NOPRUNE 0x00002000
40#define DELFLG_IN_USE 0x00000001
41#define DELFLG_IN_USE1 0x00010000
42#define DI_REMOVEDEVICE_GLOBAL 0x00000001
43#define DI_REMOVEDEVICE_CONFIGSPECIFIC 0x00000002
44#define DI_UNREMOVEDEVICE_CONFIGSPECIFIC 0x00000002
45#define DI_SHOWOEM 0x00000001
46#define DI_SHOWCOMPAT 0x00000002
47#define DI_SHOWCLASS 0x00000004
48#define DI_SHOWALL 0x00000007
49#define DI_NOVCP 0x00000008
50#define DI_DIDCOMPAT 0x00000010
51#define DI_DIDCLASS 0x00000020
52#define DI_AUTOASSIGNRES 0x00000040
53#define DI_NEEDRESTART 0x00000080
54#define DI_NEEDREBOOT 0x00000100
55#define DI_NOBROWSE 0x00000200
56#define DI_MULTMFGS 0x00000400
57#define DI_DISABLED 0x00000800
58#define DI_GENERALPAGE_ADDED 0x00001000
59#define DI_RESOURCEPAGE_ADDED 0x00002000
60#define DI_PROPERTIES_CHANGE 0x00004000
61#define DI_INF_IS_SORTED 0x00008000
62#define DI_ENUMSINGLEINF 0x00010000
63#define DI_DONOTCALLCONFIGMG 0x00020000
64#define DI_INSTALLDISABLED 0x00040000
65#define DI_COMPAT_FROM_CLASS 0x00080000
66#define DI_CLASSINSTALLPARAMS 0x00100000
67#define DI_NODI_DEFAULTACTION 0x00200000
68#define DI_QUIETINSTALL 0x00800000
69#define DI_NOFILECOPY 0x01000000
70#define DI_FORCECOPY 0x02000000
71#define DI_DRIVERPAGE_ADDED 0x04000000
72#define DI_USECI_SELECTSTRINGS 0x08000000
73#define DI_OVERRIDE_INFFLAGS 0x10000000
74#define DI_PROPS_NOCHANGEUSAGE 0x20000000
75#define DI_NOSELECTICONS 0x40000000
76#define DI_NOWRITE_IDS 0x80000000
77#define DI_FLAGSEX_USEOLDINFSEARCH 0x00000001
78#define DI_FLAGSEX_AUTOSELECTRANK0 0x00000002
79#define DI_FLAGSEX_CI_FAILED 0x00000004
80#define DI_FLAGSEX_DIDINFOLIST 0x00000010
81#define DI_FLAGSEX_DIDCOMPATINFO 0x00000020
82#define DI_FLAGSEX_FILTERCLASSES 0x00000040
83#define DI_FLAGSEX_SETFAILEDINSTALL 0x00000080
84#define DI_FLAGSEX_DEVICECHANGE 0x00000100
85#define DI_FLAGSEX_ALWAYSWRITEIDS 0x00000200
86#define DI_FLAGSEX_PROPCHANGE_PENDING 0x00000400
87#define DI_FLAGSEX_ALLOWEXCLUDEDDRVS 0x00000800
88#define DI_FLAGSEX_NOUIONQUERYREMOVE 0x00001000
89#define DI_FLAGSEX_USECLASSFORCOMPAT 0x00002000
90#define DI_FLAGSEX_OLDINF_IN_CLASSLIST 0x00004000
91#define DI_FLAGSEX_NO_DRVREG_MODIFY 0x00008000
92#define DI_FLAGSEX_IN_SYSTEM_SETUP 0x00010000
93#define DI_FLAGSEX_INET_DRIVER 0x00020000
94#define DI_FLAGSEX_APPENDDRIVERLIST 0x00040000
95#define DI_FLAGSEX_PREINSTALLBACKUP 0x00080000
96#define DI_FLAGSEX_BACKUPONREPLACE 0x00100000
97#define DI_FLAGSEX_DRIVERLIST_FROM_URL 0x00200000
98#define DI_FLAGSEX_RESERVED1 0x00400000
99#define DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS 0x00800000
100#define DI_FLAGSEX_POWERPAGE_ADDED 0x01000000
101#if (_SETUPAPI_VER >= 0x0501)
102#define DI_FLAGSEX_FILTERSIMILARDRIVERS 0x02000000
103#define DI_FLAGSEX_INSTALLEDDRIVER 0x04000000
104#define DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE 0x08000000
105#define DI_FLAGSEX_ALTPLATFORM_DRVSEARCH 0x10000000
106#define DI_FLAGSEX_RESTART_DEVICE_ONLY 0x20000000
108#define DIBCI_NOINSTALLCLASS 0x00000001
109#define DIBCI_NODISPLAYCLASS 0x00000002
110#define DICD_GENERATE_ID 0x00000001
111#define DICD_INHERIT_CLASSDRVS 0x00000002
113#define DICS_FLAG_GLOBAL 1
114#define DICS_DISABLE 2
115#define DICS_FLAG_CONFIGSPECIFIC 2
116#define DICS_PROPCHANGE 3
118#define DICS_FLAG_CONFIGGENERAL 4
120#define DIF_SELECTDEVICE 1
121#define DIF_INSTALLDEVICE 2
122#define DIF_ASSIGNRESOURCES 3
123#define DIF_PROPERTIES 4
125#define DIF_FIRSTTIMESETUP 6
126#define DIF_FOUNDDEVICE 7
127#define DIF_SELECTCLASSDRIVERS 8
128#define DIF_VALIDATECLASSDRIVERS 9
129#define DIF_INSTALLCLASSDRIVERS 10
130#define DIF_CALCDISKSPACE 11
131#define DIF_DESTROYPRIVATEDATA 12
132#define DIF_VALIDATEDRIVER 13
133#define DIF_MOVEDEVICE 14
135#define DIF_INSTALLWIZARD 16
136#define DIF_DESTROYWIZARDDATA 17
137#define DIF_PROPERTYCHANGE 18
138#define DIF_ENABLECLASS 19
139#define DIF_DETECTVERIFY 20
140#define DIF_INSTALLDEVICEFILES 21
141#define DIF_UNREMOVE 22
142#define DIF_SELECTBESTCOMPATDRV 23
143#define DIF_ALLOW_INSTALL 24
144#define DIF_REGISTERDEVICE 25
145#define DIF_NEWDEVICEWIZARD_PRESELECT 26
146#define DIF_NEWDEVICEWIZARD_SELECT 27
147#define DIF_NEWDEVICEWIZARD_PREANALYZE 28
148#define DIF_NEWDEVICEWIZARD_POSTANALYZE 29
149#define DIF_NEWDEVICEWIZARD_FINISHINSTALL 30
150#define DIF_UNUSED1 31
151#define DIF_INSTALLINTERFACES 32
152#define DIF_DETECTCANCEL 33
153#define DIF_REGISTER_COINSTALLERS 34
154#define DIF_ADDPROPERTYPAGE_ADVANCED 35
155#define DIF_ADDPROPERTYPAGE_BASIC 36
156#define DIF_RESERVED1 37
157#define DIF_TROUBLESHOOTER 38
158#define DIF_POWERMESSAGEWAKE 39
159#define DIF_ADDREMOTEPROPERTYPAGE_ADVANCED 40
160#define DIF_UPDATEDRIVER_UI 41
161#define DIF_FINISHINSTALL_ACTION 42
162#define DIF_RESERVED2 48
164#define DIGCDP_FLAG_BASIC 0x00000001
165#define DIGCDP_FLAG_ADVANCED 0x00000002
166#if (_SETUPAPI_VER >= 0x0501)
167#define DIGCDP_FLAG_REMOTE_BASIC 0x00000003
168#define DIGCDP_FLAG_REMOTE_ADVANCED 0x00000004
170#define DIGCF_DEFAULT 0x00000001
171#define DIGCF_PRESENT 0x00000002
172#define DIGCF_ALLCLASSES 0x00000004
173#define DIGCF_PROFILE 0x00000008
174#define DIGCF_DEVICEINTERFACE 0x00000010
175#define DIGCF_INTERFACEDEVICE 0x00000010
176#define DIOCR_INSTALLER 0x00000001
177#define DIOCR_INTERFACE 0x00000002
178#define DIODI_NO_ADD 0x00000001
179#define DIOD_INHERIT_CLASSDRVS 0x00000002
180#define DIOD_CANCEL_REMOVE 0x00000004
181#define DIREG_DEV 0x00000001
182#define DIREG_DRV 0x00000002
183#define DIREG_BOTH 0x00000004
184#define DIRID_ABSOLUTE -1
186#define DIRID_SRCPATH 1
187#define DIRID_WINDOWS 10
188#define DIRID_SYSTEM 11
189#define DIRID_DRIVERS 12
192#define DIRID_FONTS 20
193#define DIRID_VIEWERS 21
194#define DIRID_COLOR 23
196#define DIRID_SHARED 25
198#define DIRID_SYSTEM16 50
199#define DIRID_SPOOL 51
200#define DIRID_SPOOLDRIVERS 52
201#define DIRID_USERPROFILE 53
202#define DIRID_LOADER 54
203#define DIRID_PRINTPROCESSOR 55
204#define DIRID_COMMON_STARTMENU 16406
205#define DIRID_COMMON_PROGRAMS 16407
206#define DIRID_COMMON_STARTUP 16408
207#define DIRID_COMMON_DESKTOPDIRECTORY 16409
208#define DIRID_COMMON_FAVORITES 16415
209#define DIRID_COMMON_APPDATA 16419
210#define DIRID_PROGRAM_FILES 16422
211#define DIRID_SYSTEM_X86 16425
212#define DIRID_PROGRAM_FILES_X86 16426
213#define DIRID_PROGRAM_FILES_COMMON 16427
214#define DIRID_PROGRAM_FILES_COMMONX86 16428
215#define DIRID_COMMON_TEMPLATES 16429
216#define DIRID_COMMON_DOCUMENTS 16430
217#define DIRID_USER 0x8000
218#define DIRID_ABSOLUTE_16BIT 0xffff
219#define DIRID_IOSUBSYS DIRID_DRIVERS
220#define DIRID_DEFAULT DIRID_SYSTEM
221#define DMI_MASK 0x00000001
222#define DMI_BKCOLOR 0x00000002
223#define DMI_USERECT 0x00000004
224#define DN_ROOT_ENUMERATED 0x00000001
225#define DN_DRIVER_LOADED 0x00000002
226#define DN_ENUM_LOADED 0x00000004
227#define DN_STARTED 0x00000008
228#define DN_MANUAL 0x00000010
229#define DN_NEED_TO_ENUM 0x00000020
230#define DN_NOT_FIRST_TIME 0x00000040
231#define DN_HARDWARE_ENUM 0x00000080
232#define DN_LIAR 0x00000100
233#define DN_HAS_MARK 0x00000200
234#define DN_HAS_PROBLEM 0x00000400
235#define DN_FILTERED 0x00000800
236#define DN_MOVED 0x00001000
237#define DN_DISABLEABLE 0x00002000
238#define DN_REMOVABLE 0x00004000
239#define DN_PRIVATE_PROBLEM 0x00008000
240#define DN_MF_PARENT 0x00010000
241#define DN_MF_CHILD 0x00020000
242#define DN_WILL_BE_REMOVED 0x00040000
243#define DN_NOT_FIRST_TIMEE 0x00080000
244#define DN_STOP_FREE_RES 0x00100000
245#define DN_REBAL_CANDIDATE 0x00200000
246#define DN_BAD_PARTIAL 0x00400000
247#define DN_NT_ENUMERATOR 0x00800000
248#define DN_NT_DRIVER 0x01000000
249#define DN_NEEDS_LOCKING 0x02000000
250#define DN_ARM_WAKEUP 0x04000000
251#define DN_APM_ENUMERATOR 0x08000000
252#define DN_APM_DRIVER 0x10000000
253#define DN_SILENT_INSTALL 0x20000000
254#define DN_NO_SHOW_IN_DM 0x40000000
255#define DN_BOOT_LOG_PROB 0x80000000
256#define DNF_DUPDESC 0x00000001
257#define DNF_OLDDRIVER 0x00000002
258#define DNF_EXCLUDEFROMLIST 0x00000004
259#define DNF_NODRIVER 0x00000008
260#define DNF_LEGACYINF 0x00000010
261#define DNF_CLASS_DRIVER 0x00000020
262#define DNF_COMPATIBLE_DRIVER 0x00000040
263#define DNF_INET_DRIVER 0x00000080
264#define DNF_UNUSED1 0x00000100
265#define DNF_INDEXED_DRIVER 0x00000200
266#define DNF_OLD_INET_DRIVER 0x00000400
267#define DNF_BAD_DRIVER 0x00000800
268#define DNF_DUPPROVIDER 0x00001000
269#define DPROMPT_SUCCESS 0
270#define DPROMPT_CANCEL 1
271#define DPROMPT_SKIPFILE 2
272#define DPROMPT_BUFFERTOOSMALL 3
273#define DPROMPT_OUTOFMEMORY 4
274#define DRIVER_HARDWAREID_RANK 0x00000FFF
275#if (_SETUPAPI_VER >= 0x0600)
276#define DRIVER_UNTRUSTED_RANK 0x80000000
278#define DRIVER_UNTRUSTED_RANK 0x00008000
280#define DYNAWIZ_FLAG_PAGESADDED 0x00000001
281#define DYNAWIZ_FLAG_INSTALLDET_NEXT 0x00000002
282#define DYNAWIZ_FLAG_INSTALLDET_PREV 0x00000004
283#define DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT 0x00000008
284#define ENABLECLASS_QUERY 0
285#define ENABLECLASS_SUCCESS 1
286#define ENABLECLASS_FAILURE 2
287#define ERROR_EXPECTED_SECTION_NAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0)
288#define ERROR_BAD_SECTION_NAME_LINE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|1)
289#define ERROR_SECTION_NAME_TOO_LONG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|2)
290#define ERROR_GENERAL_SYNTAX (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|3)
291#define ERROR_WRONG_INF_STYLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x100)
292#define ERROR_NOT_INSTALLED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x1000)
293#define ERROR_SECTION_NOT_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x101)
294#define ERROR_LINE_NOT_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x102)
295#define ERROR_NO_BACKUP (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x103)
296#define ERROR_NO_ASSOCIATED_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x200)
297#define ERROR_CLASS_MISMATCH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x201)
298#define ERROR_DUPLICATE_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x202)
299#define ERROR_NO_DRIVER_SELECTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x203)
300#define ERROR_KEY_DOES_NOT_EXIST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x204)
301#define ERROR_INVALID_DEVINST_NAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x205)
302#define ERROR_INVALID_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x206)
303#define ERROR_DEVINST_ALREADY_EXISTS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x207)
304#define ERROR_DEVINFO_NOT_REGISTERED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x208)
305#define ERROR_INVALID_REG_PROPERTY (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x209)
306#define ERROR_NO_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20A)
307#define ERROR_NO_SUCH_DEVINST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20B)
308#define ERROR_CANT_LOAD_CLASS_ICON (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20C)
309#define ERROR_INVALID_CLASS_INSTALLER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20D)
310#define ERROR_DI_DO_DEFAULT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20E)
311#define ERROR_DI_NOFILECOPY (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20F)
312#define ERROR_INVALID_HWPROFILE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x210)
313#define ERROR_NO_DEVICE_SELECTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x211)
314#define ERROR_DEVINFO_LIST_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x212)
315#define ERROR_DEVINFO_DATA_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x213)
316#define ERROR_DI_BAD_PATH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x214)
317#define ERROR_NO_CLASSINSTALL_PARAMS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x215)
318#define ERROR_FILEQUEUE_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x216)
319#define ERROR_BAD_SERVICE_INSTALLSECT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x217)
320#define ERROR_NO_CLASS_DRIVER_LIST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x218)
321#define ERROR_NO_ASSOCIATED_SERVICE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x219)
322#define ERROR_NO_DEFAULT_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21A)
323#define ERROR_DEVICE_INTERFACE_ACTIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21B)
324#define ERROR_DEVICE_INTERFACE_REMOVED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21C)
325#define ERROR_BAD_INTERFACE_INSTALLSECT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21D)
326#define ERROR_NO_SUCH_INTERFACE_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21E)
327#define ERROR_INVALID_REFERENCE_STRING (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21F)
328#define ERROR_INVALID_MACHINENAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x220)
329#define ERROR_REMOTE_COMM_FAILURE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x221)
330#define ERROR_MACHINE_UNAVAILABLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x222)
331#define ERROR_NO_CONFIGMGR_SERVICES (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x223)
332#define ERROR_INVALID_PROPPAGE_PROVIDER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x224)
333#define ERROR_NO_SUCH_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x225)
334#define ERROR_DI_POSTPROCESSING_REQUIRED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x226)
335#define ERROR_INVALID_COINSTALLER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x227)
336#define ERROR_NO_COMPAT_DRIVERS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x228)
337#define ERROR_NO_DEVICE_ICON (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x229)
338#define ERROR_INVALID_INF_LOGCONFIG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22A)
339#define ERROR_DI_DONT_INSTALL (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22B)
340#define ERROR_INVALID_FILTER_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22C)
341#define ERROR_NON_WINDOWS_NT_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22D)
342#define ERROR_NON_WINDOWS_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22E)
343#define ERROR_NO_CATALOG_FOR_OEM_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22F)
344#define ERROR_DEVINSTALL_QUEUE_NONNATIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x230)
345#define ERROR_NOT_DISABLEABLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x231)
346#define ERROR_CANT_REMOVE_DEVINST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x232)
347#define ERROR_IN_WOW64 (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x235)
348#define ERROR_INTERFACE_DEVICE_ACTIVE ERROR_DEVICE_INTERFACE_ACTIVE
349#define ERROR_INTERFACE_DEVICE_REMOVED ERROR_DEVICE_INTERFACE_REMOVED
350#define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
351#define ERROR_NO_SUCH_INTERFACE_DEVICE ERROR_NO_SUCH_DEVICE_INTERFACE
352#define ERROR_WRONG_INF_TYPE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x24A)
355#define FILEOP_ABORT 0
356#define FILE_COMPRESSION_NONE 0
357#define FILEOP_RENAME 1
359#define FILE_COMPRESSION_WINLZA 1
360#define FILEOP_DELETE 2
362#define FILE_COMPRESSION_MSZIP 2
363#define FILEOP_BACKUP 3
364#define FILE_COMPRESSION_NTCAB 3
365#define FILEOP_NEWPATH 4
366#define FILEOP_RETRY FILEOP_DOIT
367#define FLG_ADDREG_TYPE_SZ 0x00000000
368#define FLG_ADDREG_BINVALUETYPE 0x00000001
369#define FLG_ADDREG_NOCLOBBER 0x00000002
370#define FLG_ADDREG_DELVAL 0x00000004
371#define FLG_ADDREG_APPEND 0x00000008
372#define FLG_ADDREG_KEYONLY 0x00000010
373#define FLG_ADDREG_OVERWRITEONLY 0x00000020
374#if (_SETUPAPI_VER >= 0x0501)
375#define FLG_ADDREG_64BITKEY 0x00001000
376#define FLG_ADDREG_KEYONLY_COMMON 0x00002000
377#define FLG_ADDREG_32BITKEY 0x00004000
378#define FLG_ADDREG_DELREG_BIT 0x00008000
380#define FLG_ADDREG_TYPE_MULTI_SZ 0x00010000
381#define FLG_ADDREG_TYPE_EXPAND_SZ 0x00020000
382#define FLG_ADDREG_TYPE_BINARY (0x00000000|FLG_ADDREG_BINVALUETYPE)
383#define FLG_ADDREG_TYPE_DWORD (0x00010000|FLG_ADDREG_BINVALUETYPE)
384#define FLG_ADDREG_TYPE_NONE (0x00020000|FLG_ADDREG_BINVALUETYPE)
385#define FLG_ADDREG_TYPE_MASK (0xFFFF0000|FLG_ADDREG_BINVALUETYPE)
386#define FLG_DELREG_VALUE 0x00000000
387#if (_SETUPAPI_VER >= 0x0501)
388#define FLG_DELREG_TYPE_MASK FLG_ADDREG_TYPE_MASK
389#define FLG_DELREG_TYPE_SZ FLG_ADDREG_TYPE_SZ
390#define FLG_DELREG_TYPE_MULTI_SZ FLG_ADDREG_TYPE_MULTI_SZ
391#define FLG_DELREG_TYPE_EXPAND_SZ FLG_ADDREG_TYPE_EXPAND_SZ
392#define FLG_DELREG_TYPE_BINARY FLG_ADDREG_TYPE_BINARY
393#define FLG_DELREG_TYPE_DWORD FLG_ADDREG_TYPE_DWORD
394#define FLG_DELREG_TYPE_NONE FLG_ADDREG_TYPE_NONE
395#define FLG_DELREG_64BITKEY FLG_ADDREG_64BITKEY
396#define FLG_DELREG_KEYONLY_COMMON FLG_ADDREG_KEYONLY_COMMON
397#define FLG_DELREG_32BITKEY FLG_ADDREG_32BITKEY
398#define FLG_DELREG_OPERATION_MASK 0x000000FE
399#define FLG_DELREG_MULTI_SZ_DELSTRING (0x00000002|FLG_DELREG_TYPE_MULTI_SZ|FLG_ADDREG_DELREG_BIT)
401#define FLG_BITREG_CLEARBITS 0x00000000
402#define FLG_BITREG_SETBITS 0x00000001
403#define FLG_PROFITEM_CURRENTUSER 0x00000001
404#define FLG_PROFITEM_DELETE 0x00000002
405#define FLG_PROFITEM_GROUP 0x00000004
406#define FLG_PROFITEM_CSIDL 0x00000008
407#define FLG_REGSVR_DLLREGISTER 0x00000001
408#define FLG_REGSVR_DLLINSTALL 0x00000002
409#define MIN_IDD_DYNAWIZ_RESOURCE_ID 10000
410#define MAX_IDD_DYNAWIZ_RESOURCE_ID 11000
411#define IDD_DYNAWIZ_FIRSTPAGE 10000
412#define IDD_DYNAWIZ_SELECT_PREVPAGE 10001
413#define IDD_DYNAWIZ_SELECT_NEXTPAGE 10002
414#define IDD_DYNAWIZ_ANALYZE_PREVPAGE 10003
415#define IDD_DYNAWIZ_ANALYZE_NEXTPAGE 10004
416#define IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE 10006
417#define IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE 10007
418#define IDD_DYNAWIZ_INSTALLDETECTED_NODEVS 10008
419#define IDD_DYNAWIZ_SELECTDEV_PAGE 10009
420#define IDD_DYNAWIZ_ANALYZEDEV_PAGE 10010
421#define IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE 10011
422#define IDD_DYNAWIZ_SELECTCLASS_PAGE 10012
423#define IDF_NOBROWSE 0x00000001
424#define IDF_NOSKIP 0x00000002
425#define IDF_NODETAILS 0x00000004
426#define IDF_NOCOMPRESSED 0x00000008
427#define IDF_CHECKFIRST 0x00000100
428#define IDF_NOBEEP 0x00000200
429#define IDF_NOFOREGROUND 0x00000400
430#define IDF_WARNIFSKIP 0x00000800
431#define IDF_OEMDISK 0x80000000
432#define IDI_RESOURCEFIRST 159
433#define IDI_RESOURCE 159
434#define IDI_RESOURCELAST 161
435#define IDI_RESOURCEOVERLAYFIRST 161
436#define IDI_RESOURCEOVERLAYLAST 161
437#define IDI_CONFLICT 161
438#define IDI_PROBLEM_OVL 500
439#define IDI_DISABLED_OVL 501
440#define IDI_FORCED_OVL 502
441#define IDI_CLASSICON_OVERLAYFIRST 500
442#define IDI_CLASSICON_OVERLAYLAST 502
443#define INF_STYLE_NONE 0x00000000
444#define INF_STYLE_OLDNT 0x00000001
445#define INF_STYLE_WIN4 0x00000002
446#define INF_STYLE_CACHE_ENABLE 0x00000010
447#define INF_STYLE_CACHE_DISABLE 0x00000020
448#define INFINFO_INF_SPEC_IS_HINF 1
449#define INFINFO_INF_NAME_IS_ABSOLUTE 2
450#define INFINFO_DEFAULT_SEARCH 3
451#define INFINFO_REVERSE_DEFAULT_SEARCH 4
452#define INFINFO_INF_PATH_LIST_SEARCH 5
453#define LogSevInformation 0
454#define LogSevWarning 1
456#define LogSevFatalError 3
457#define LogSevMaximum 4
458#define LogSeverity DWORD
459#define MAX_INSTALLWIZARD_DYNAPAGES 20
460#define NDW_INSTALLFLAG_DIDFACTDEFS 0x00000001
461#define NDW_INSTALLFLAG_HARDWAREALLREADYIN 0x00000002
462#define NDW_INSTALLFLAG_NEEDSHUTDOWN 0x00000200
463#define NDW_INSTALLFLAG_EXPRESSINTRO 0x00000400
464#define NDW_INSTALLFLAG_SKIPISDEVINSTALLED 0x00000800
465#define NDW_INSTALLFLAG_NODETECTEDDEVS 0x00001000
466#define NDW_INSTALLFLAG_INSTALLSPECIFIC 0x00002000
467#define NDW_INSTALLFLAG_SKIPCLASSLIST 0x00004000
468#define NDW_INSTALLFLAG_CI_PICKED_OEM 0x00008000
469#define NDW_INSTALLFLAG_PCMCIAMODE 0x00010000
470#define NDW_INSTALLFLAG_PCMCIADEVICE 0x00020000
471#define NDW_INSTALLFLAG_USERCANCEL 0x00040000
472#define NDW_INSTALLFLAG_KNOWNCLASS 0x00080000
473#define NDW_INSTALLFLAG_NEEDRESTART 0x00000080
474#define NDW_INSTALLFLAG_NEEDREBOOT 0x00000100
475#define SETDIRID_NOT_FULL_PATH 0x00000001
476#define SP_COPY_DELETESOURCE 0x0000001
477#define SP_COPY_REPLACEONLY 0x0000002
478#define SP_COPY_NEWER 0x0000004
479#define SP_COPY_NEWER_OR_SAME 0x0000004
480#define SP_COPY_NOOVERWRITE 0x0000008
481#define SP_COPY_NODECOMP 0x0000010
482#define SP_COPY_LANGUAGEAWARE 0x0000020
483#define SP_COPY_SOURCE_ABSOLUTE 0x0000040
484#define SP_COPY_SOURCEPATH_ABSOLUTE 0x0000080
485#define SP_COPY_IN_USE_NEEDS_REBOOT 0x0000100
486#define SP_COPY_FORCE_IN_USE 0x0000200
487#define SP_COPY_NOSKIP 0x0000400
488#define SP_COPY_FORCE_NOOVERWRITE 0x0001000
489#define SP_COPY_FORCE_NEWER 0x0002000
490#define SP_COPY_WARNIFSKIP 0x0004000
491#define SP_COPY_NOBROWSE 0x0008000
492#define SP_COPY_NEWER_ONLY 0x0010000
493#define SP_COPY_SOURCE_SIS_MASTER 0x0020000
494#define SP_COPY_OEMINF_CATALOG_ONLY 0x0040000
495#define SP_COPY_REPLACE_BOOT_FILE 0x0080000
496#define SP_COPY_NOPRUNE 0x0100000
497#define SP_FLAG_CABINETCONTINUATION 0x0000800
498#define SPCRP_SECURITY 23
499#define SPCRP_SECURITY_SDS 24
500#define SPCRP_DEVTYPE 25
501#define SPCRP_EXCLUSIVE 26
502#define SPCRP_CHARACTERISTICS 27
503#define SPCRP_MAXIMUM_PROPERTY 28
504#define SPDIT_NODRIVER 0
505#define SPDIT_CLASSDRIVER 1
506#define SPDIT_COMPATDRIVER 2
507#define SPDRP_DEVICEDESC 0
508#define SPDRP_HARDWAREID 1
509#define SPDRP_COMPATIBLEIDS 2
510#define SPDRP_UNUSED0 3
511#define SPDRP_SERVICE 4
512#define SPDRP_UNUSED1 5
513#define SPDRP_UNUSED2 6
515#define SPDRP_CLASSGUID 8
516#define SPDRP_DRIVER 9
517#define SPDRP_CONFIGFLAGS 10
519#define SPDRP_FRIENDLYNAME 12
520#define SPDRP_LOCATION_INFORMATION 13
521#define SPDRP_PHYSICAL_DEVICE_OBJECT_NAME 14
522#define SPDRP_CAPABILITIES 15
523#define SPDRP_UI_NUMBER 16
524#define SPDRP_UPPERFILTERS 17
525#define SPDRP_LOWERFILTERS 18
526#define SPDRP_BUSTYPEGUID 19
527#define SPDRP_LEGACYBUSTYPE 20
528#define SPDRP_BUSNUMBER 21
529#define SPDRP_ENUMERATOR_NAME 22
530#define SPDRP_SECURITY 23
531#define SPDRP_SECURITY_SDS 24
532#define SPDRP_DEVTYPE 25
533#define SPDRP_EXCLUSIVE 26
534#define SPDRP_CHARACTERISTICS 27
535#define SPDRP_ADDRESS 28
536#define SPDRP_UI_NUMBER_DESC_FORMAT 29
537#define SPDRP_DEVICE_POWER_DATA 30
538#define SPDRP_REMOVAL_POLICY 31
539#define SPDRP_REMOVAL_POLICY_HW_DEFAULT 32
540#define SPDRP_REMOVAL_POLICY_OVERRIDE 33
541#define SPDRP_INSTALL_STATE 34
542#define SPDRP_MAXIMUM_PROPERTY 35
543#define SPDSL_IGNORE_DISK 1
544#define SPDSL_DISALLOW_NEGATIVE_ADJUST 2
546#define SPFILENOTIFY_STARTQUEUE 1
547#define SPFILENOTIFY_ENDQUEUE 2
548#define SPFILENOTIFY_STARTSUBQUEUE 3
549#define SPFILENOTIFY_ENDSUBQUEUE 4
550#define SPFILENOTIFY_STARTDELETE 5
551#define SPFILENOTIFY_ENDDELETE 6
552#define SPFILENOTIFY_DELETEERROR 7
553#define SPFILENOTIFY_STARTRENAME 8
554#define SPFILENOTIFY_ENDRENAME 9
555#define SPFILENOTIFY_RENAMEERROR 10
556#define SPFILENOTIFY_STARTCOPY 11
557#define SPFILENOTIFY_ENDCOPY 12
558#define SPFILENOTIFY_COPYERROR 13
559#define SPFILENOTIFY_NEEDMEDIA 14
560#define SPFILENOTIFY_QUEUESCAN 15
561#define SPFILENOTIFY_CABINETINFO 16
562#define SPFILENOTIFY_FILEINCABINET 17
563#define SPFILENOTIFY_NEEDNEWCABINET 18
564#define SPFILENOTIFY_FILEEXTRACTED 19
565#define SPFILENOTIFY_FILEOPDELAYED 20
566#define SPFILENOTIFY_STARTBACKUP 21
567#define SPFILENOTIFY_BACKUPERROR 22
568#define SPFILENOTIFY_ENDBACKUP 23
569#define SPFILENOTIFY_QUEUESCAN_EX 24
570#define SPFILENOTIFY_STARTREGISTRATION 25
571#define SPFILENOTIFY_ENDREGISTRATION 26
572#define SPFILENOTIFY_LANGMISMATCH 0x00010000
573#define SPFILENOTIFY_TARGETEXISTS 0x00020000
574#define SPFILENOTIFY_TARGETNEWER 0x00040000
575#define SPFILELOG_SYSTEMLOG 0x00000001
576#define SPFILELOG_OEMFILE 0x00000001
577#define SPFILELOG_FORCENEW 0x00000002
578#define SPFILELOG_QUERYONLY 0x00000004
579#define SPFILEQ_FILE_IN_USE 0x00000001
580#define SPFILEQ_REBOOT_RECOMMENDED 0x00000002
581#define SPFILEQ_REBOOT_IN_PROGRESS 0x00000004
582#define SPINT_ACTIVE 0x00000001
583#define SPINT_DEFAULT 0x00000002
584#define SPINT_REMOVED 0x00000004
585#define SPID_ACTIVE 0x00000001
586#define SPID_DEFAULT 0x00000002
587#define SPID_REMOVED 0x00000004
588#define SPINST_LOGCONFIG 0x00000001
589#define SPINST_INIFILES 0x00000002
590#define SPINST_REGISTRY 0x00000004
591#define SPINST_INI2REG 0x00000008
592#define SPINST_FILES 0x00000010
593#define SPINST_BITREG 0x00000020
594#define SPINST_REGSVR 0x00000040
595#define SPINST_UNREGSVR 0x00000080
596#define SPINST_PROFILEITEMS 0x00000100
597#if (_SETUPAPI_VER >= 0x0501)
598#define SPINST_COPYINF 0x00000200
599#define SPINST_ALL 0x000003ff
601#define SPINST_ALL 0x000001ff
603#define SPINST_SINGLESECTION 0x00010000
604#define SPINST_LOGCONFIG_IS_FORCED 0x00020000
605#define SPINST_LOGCONFIGS_ARE_OVERRIDES 0x00040000
606#if (_SETUPAPI_VER >= 0x0501)
607#define SPINST_REGISTERCALLBACKAWARE 0x00080000
613#define SPPSR_SELECT_DEVICE_RESOURCES 1
614#define SPPSR_ENUM_BASIC_DEVICE_PROPERTIES 2
615#define SPPSR_ENUM_ADV_DEVICE_PROPERTIES 3
616#define SPQ_SCAN_FILE_PRESENCE 0x00000001
617#define SPQ_DELAYED_COPY 0x00000001
618#define SPQ_SCAN_FILE_VALIDITY 0x00000002
619#define SPQ_SCAN_USE_CALLBACK 0x00000004
620#define SPQ_SCAN_USE_CALLBACKEX 0x00000008
621#define SPQ_SCAN_INFORM_USER 0x00000010
622#define SPQ_SCAN_PRUNE_COPY_QUEUE 0x00000020
623#define SPRDI_FIND_DUPS 0x00000001
625#define SPSVCINST_TAGTOFRONT 0x00000001
626#define SPSVCINST_ASSOCSERVICE 0x00000002
627#define SPSVCINST_DELETEEVENTLOGENTRY 0x00000004
628#define SPSVCINST_NOCLOBBER_DISPLAYNAME 0x00000008
629#define SPSVCINST_NOCLOBBER_STARTTYPE 0x00000010
630#define SPSVCINST_NOCLOBBER_ERRORCONTROL 0x00000020
631#define SPSVCINST_NOCLOBBER_LOADORDERGROUP 0x00000040
632#define SPSVCINST_NOCLOBBER_DEPENDENCIES 0x00000080
633#define SPSVCINST_NOCLOBBER_DESCRIPTION 0x00000100
634#define SPSVCINST_STOPSERVICE 0x00000200
635#define SPSVCINST_CLOBBER_SECURITY 0x00000400
636#define SPSVCINST_STARTSERVICE 0x00000800
638#define SPWPT_SELECTDEVICE 0x00000001
639#define SPWP_USE_DEVINFO_DATA 0x00000001
640#define SRCINFO_PATH 1
641#define SRCINFO_TAGFILE 2
642#define SRCINFO_DESCRIPTION 3
643#define SRCINFO_FLAGS 4
644#define SRCLIST_TEMPORARY 0x00000001
645#define SRCLIST_NOBROWSE 0x00000002
646#define SRCLIST_SYSTEM 0x00000010
647#define SRCLIST_USER 0x00000020
648#define SRCLIST_SYSIFADMIN 0x00000040
649#define SRCLIST_SUBDIRS 0x00000100
650#define SRCLIST_APPEND 0x00000200
651#define SRCLIST_NOSTRIPPLATFORM 0x00000400
652#define SPREG_SUCCESS 0x00000000
653#define SPREG_LOADLIBRARY 0x00000001
654#define SPREG_GETPROCADDR 0x00000002
655#define SPREG_REGSVR 0x00000003
656#define SPREG_DLLINSTALL 0x00000004
657#define SPREG_TIMEOUT 0x00000005
658#define SPREG_UNKNOWN 0xFFFFFFFF
661#define ST_CASE_SENSITIVE_COMPARE 0x00000001
664#define SUOI_FORCEDELETE 0x00000001
729#if _WIN32_WINNT <= 0x0500
1047#if USE_SP_DRVINFO_DATA_V1
1548SetupDiGetClassRegistryPropertyA(
1562SetupDiGetClassRegistryPropertyW(
1609 _In_ DWORD DeviceInterfaceDetailDataSize,
1622 _In_ DWORD DeviceInterfaceDetailDataSize,
1727SetupDiGetHwProfileList(
1737SetupDiGetHwProfileListExA(
1749SetupDiGetHwProfileListExW(
1910 _In_ DWORD ActualSourceFileNameBufferLen,
1922 _In_ DWORD ActualSourceFileNameBufferLen,
2121WINSETUPAPI BOOL WINAPI SetupInstallFromInfSectionA(
_In_opt_ HWND,
_In_ HINF,
_In_ PCSTR,
_In_ UINT,
_In_opt_ HKEY,
_In_opt_ PCSTR,
_In_ UINT,
_In_opt_ PSP_FILE_CALLBACK_A,
_In_opt_ PVOID,
_In_opt_ HDEVINFO,
_In_opt_ PSP_DEVINFO_DATA);
2122WINSETUPAPI BOOL WINAPI SetupInstallFromInfSectionW(
_In_opt_ HWND,
_In_ HINF,
_In_ PCWSTR,
_In_ UINT,
_In_opt_ HKEY,
_In_opt_ PCWSTR,
_In_ UINT,
_In_opt_ PSP_FILE_CALLBACK_W,
_In_opt_ PVOID,
_In_opt_ HDEVINFO,
_In_opt_ PSP_DEVINFO_DATA);
2426#define SetupDiCreateInterfaceDeviceW SetupDiCreateDeviceInterfaceW
2427#define SetupDiCreateInterfaceDeviceRegKeyW SetupDiCreateDeviceInterfaceRegKeyW
2428#define SetupDiOpenInterfaceDeviceW SetupDiOpenDeviceInterfaceW
2429#define SetupDiGetInterfaceDeviceDetailW SetupDiGetDeviceInterfaceDetailW
2430#define SetupDiCreateInterfaceDeviceA SetupDiCreateDeviceInterfaceA
2431#define SetupDiCreateInterfaceDeviceRegKeyA SetupDiCreateDeviceInterfaceRegKeyA
2432#define SetupDiOpenInterfaceDeviceA SetupDiOpenDeviceInterfaceA
2433#define SetupDiGetInterfaceDeviceDetailA SetupDiGetDeviceInterfaceDetailA
2436#define PSP_FILE_CALLBACK PSP_FILE_CALLBACK_W
2437#define InstallHinfSection InstallHinfSectionW
2438#define SetupAddInstallSectionToDiskSpaceList SetupAddInstallSectionToDiskSpaceListW
2439#define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListW
2440#define SetupAddToDiskSpaceList SetupAddToDiskSpaceListW
2441#define SetupAddToSourceList SetupAddToSourceListW
2442#define SetupAdjustDiskSpaceList SetupAdjustDiskSpaceListW
2443#define SetupBackupError SetupBackupErrorW
2444#define SetupCommitFileQueue SetupCommitFileQueueW
2445#define SetupCopyError SetupCopyErrorW
2446#define SetupCopyOEMInf SetupCopyOEMInfW
2447#define SetupCreateDiskSpaceList SetupCreateDiskSpaceListW
2448#define SetupDecompressOrCopyFile SetupDecompressOrCopyFileW
2449#define SetupDefaultQueueCallback SetupDefaultQueueCallbackW
2450#define SetupDeleteError SetupDeleteErrorW
2451#define SetupDiBuildClassInfoListEx SetupDiBuildClassInfoListExW
2452#define SetupDiClassGuidsFromNameEx SetupDiClassGuidsFromNameExW
2453#define SetupDiClassGuidsFromName SetupDiClassGuidsFromNameW
2454#define SetupDiClassNameFromGuidEx SetupDiClassNameFromGuidExW
2455#define SetupDiClassNameFromGuid SetupDiClassNameFromGuidW
2456#define SetupDiCreateDeviceInfoListEx SetupDiCreateDeviceInfoListExW
2457#define SetupDiCreateDeviceInfo SetupDiCreateDeviceInfoW
2458#define SetupDiCreateDeviceInterfaceRegKey SetupDiCreateDeviceInterfaceRegKeyW