Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_SETUPAPI
      7 #define _INC_SETUPAPI
      8 
      9 #include <_mingw_unicode.h>
     10 
     11 #ifndef _SETUPAPI_
     12 #define WINSETUPAPI DECLSPEC_IMPORT
     13 #else
     14 #define WINSETUPAPI
     15 #endif
     16 
     17 #ifndef _SETUPAPI_VER
     18 #define _SETUPAPI_VER 0x0502
     19 #endif
     20 
     21 #ifndef __LPGUID_DEFINED__
     22 #define __LPGUID_DEFINED__
     23 typedef GUID *LPGUID;
     24 #endif
     25 
     26 #include <commctrl.h>
     27 
     28 #ifdef _WIN64
     29 #include <pshpack8.h>
     30 #else
     31 #include <pshpack1.h>
     32 #endif
     33 
     34 #ifdef __cplusplus
     35 extern "C" {
     36 #endif
     37 
     38 #define LINE_LEN 256
     39 
     40 #define MAX_INF_STRING_LENGTH 4096
     41 #define MAX_INF_SECTION_NAME_LENGTH 255
     42 #define MAX_TITLE_LEN 60
     43 #define MAX_INSTRUCTION_LEN 256
     44 #define MAX_LABEL_LEN 30
     45 #define MAX_SERVICE_NAME_LEN 256
     46 #define MAX_SUBTITLE_LEN 256
     47 
     48 #define SP_MAX_MACHINENAME_LENGTH (MAX_PATH + 3)
     49 
     50   typedef PVOID HINF;
     51 
     52   typedef struct _INFCONTEXT {
     53     PVOID Inf;
     54     PVOID CurrentInf;
     55     UINT Section;
     56     UINT Line;
     57   } INFCONTEXT,*PINFCONTEXT;
     58 
     59   typedef struct _SP_INF_INFORMATION {
     60     DWORD InfStyle;
     61     DWORD InfCount;
     62     BYTE VersionData[ANYSIZE_ARRAY];
     63   } SP_INF_INFORMATION,*PSP_INF_INFORMATION;
     64 
     65   typedef struct _SP_ALTPLATFORM_INFO_V2 {
     66     DWORD cbSize;
     67     DWORD Platform;
     68     DWORD MajorVersion;
     69     DWORD MinorVersion;
     70     WORD ProcessorArchitecture;
     71     __C89_NAMELESS union {
     72       WORD Reserved;
     73       WORD Flags;
     74     };
     75     DWORD FirstValidatedMajorVersion;
     76     DWORD FirstValidatedMinorVersion;
     77   } SP_ALTPLATFORM_INFO_V2,*PSP_ALTPLATFORM_INFO_V2;
     78 
     79   typedef struct _SP_ALTPLATFORM_INFO_V1 {
     80     DWORD cbSize;
     81     DWORD Platform;
     82     DWORD MajorVersion;
     83     DWORD MinorVersion;
     84     WORD ProcessorArchitecture;
     85     WORD Reserved;
     86   } SP_ALTPLATFORM_INFO_V1,*PSP_ALTPLATFORM_INFO_V1;
     87 
     88 #if USE_SP_ALTPLATFORM_INFO_V1
     89 
     90   typedef SP_ALTPLATFORM_INFO_V1 SP_ALTPLATFORM_INFO;
     91   typedef PSP_ALTPLATFORM_INFO_V1 PSP_ALTPLATFORM_INFO;
     92 #else
     93 
     94   typedef SP_ALTPLATFORM_INFO_V2 SP_ALTPLATFORM_INFO;
     95   typedef PSP_ALTPLATFORM_INFO_V2 PSP_ALTPLATFORM_INFO;
     96 
     97 #define SP_ALTPLATFORM_FLAGS_VERSION_RANGE (0x0001)
     98 #endif
     99 
    100   typedef struct _SP_ORIGINAL_FILE_INFO_A {
    101     DWORD cbSize;
    102     CHAR OriginalInfName[MAX_PATH];
    103     CHAR OriginalCatalogName[MAX_PATH];
    104   } SP_ORIGINAL_FILE_INFO_A,*PSP_ORIGINAL_FILE_INFO_A;
    105 
    106   typedef struct _SP_ORIGINAL_FILE_INFO_W {
    107     DWORD cbSize;
    108     WCHAR OriginalInfName[MAX_PATH];
    109     WCHAR OriginalCatalogName[MAX_PATH];
    110   } SP_ORIGINAL_FILE_INFO_W,*PSP_ORIGINAL_FILE_INFO_W;
    111 
    112   __MINGW_TYPEDEF_UAW(SP_ORIGINAL_FILE_INFO)
    113   __MINGW_TYPEDEF_UAW(PSP_ORIGINAL_FILE_INFO)
    114 
    115 #define INF_STYLE_NONE 0x00000000
    116 #define INF_STYLE_OLDNT 0x00000001
    117 #define INF_STYLE_WIN4 0x00000002
    118 
    119 #define INF_STYLE_CACHE_ENABLE 0x00000010
    120 #define INF_STYLE_CACHE_DISABLE 0x00000020
    121 #define INF_STYLE_CACHE_IGNORE 0x00000040
    122 
    123 #define DIRID_ABSOLUTE -1
    124 #define DIRID_ABSOLUTE_16BIT 0xffff
    125 #define DIRID_NULL 0
    126 #define DIRID_SRCPATH 1
    127 #define DIRID_WINDOWS 10
    128 #define DIRID_SYSTEM 11
    129 #define DIRID_DRIVERS 12
    130 #define DIRID_IOSUBSYS DIRID_DRIVERS
    131 #define DIRID_INF 17
    132 #define DIRID_HELP 18
    133 #define DIRID_FONTS 20
    134 #define DIRID_VIEWERS 21
    135 #define DIRID_COLOR 23
    136 #define DIRID_APPS 24
    137 #define DIRID_SHARED 25
    138 #define DIRID_BOOT 30
    139 
    140 #define DIRID_SYSTEM16 50
    141 #define DIRID_SPOOL 51
    142 #define DIRID_SPOOLDRIVERS 52
    143 #define DIRID_USERPROFILE 53
    144 #define DIRID_LOADER 54
    145 #define DIRID_PRINTPROCESSOR 55
    146 
    147 #define DIRID_DEFAULT DIRID_SYSTEM
    148 
    149 #define DIRID_COMMON_STARTMENU 16406
    150 #define DIRID_COMMON_PROGRAMS 16407
    151 #define DIRID_COMMON_STARTUP 16408
    152 #define DIRID_COMMON_DESKTOPDIRECTORY 16409
    153 #define DIRID_COMMON_FAVORITES 16415
    154 #define DIRID_COMMON_APPDATA 16419
    155 
    156 #define DIRID_PROGRAM_FILES 16422
    157 #define DIRID_SYSTEM_X86 16425
    158 #define DIRID_PROGRAM_FILES_X86 16426
    159 #define DIRID_PROGRAM_FILES_COMMON 16427
    160 #define DIRID_PROGRAM_FILES_COMMONX86 16428
    161 
    162 #define DIRID_COMMON_TEMPLATES 16429
    163 #define DIRID_COMMON_DOCUMENTS 16430
    164 
    165 #define DIRID_USER 0x8000
    166 
    167   typedef UINT (CALLBACK *PSP_FILE_CALLBACK_A)(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
    168   typedef UINT (CALLBACK *PSP_FILE_CALLBACK_W)(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
    169 
    170 #define PSP_FILE_CALLBACK __MINGW_NAME_UAW(PSP_FILE_CALLBACK)
    171 
    172 #define SPFILENOTIFY_STARTQUEUE 0x00000001
    173 #define SPFILENOTIFY_ENDQUEUE 0x00000002
    174 #define SPFILENOTIFY_STARTSUBQUEUE 0x00000003
    175 #define SPFILENOTIFY_ENDSUBQUEUE 0x00000004
    176 #define SPFILENOTIFY_STARTDELETE 0x00000005
    177 #define SPFILENOTIFY_ENDDELETE 0x00000006
    178 #define SPFILENOTIFY_DELETEERROR 0x00000007
    179 #define SPFILENOTIFY_STARTRENAME 0x00000008
    180 #define SPFILENOTIFY_ENDRENAME 0x00000009
    181 #define SPFILENOTIFY_RENAMEERROR 0x0000000a
    182 #define SPFILENOTIFY_STARTCOPY 0x0000000b
    183 #define SPFILENOTIFY_ENDCOPY 0x0000000c
    184 #define SPFILENOTIFY_COPYERROR 0x0000000d
    185 #define SPFILENOTIFY_NEEDMEDIA 0x0000000e
    186 #define SPFILENOTIFY_QUEUESCAN 0x0000000f
    187 
    188 #define SPFILENOTIFY_CABINETINFO 0x00000010
    189 #define SPFILENOTIFY_FILEINCABINET 0x00000011
    190 #define SPFILENOTIFY_NEEDNEWCABINET 0x00000012
    191 #define SPFILENOTIFY_FILEEXTRACTED 0x00000013
    192 #define SPFILENOTIFY_FILEOPDELAYED 0x00000014
    193 
    194 #define SPFILENOTIFY_STARTBACKUP 0x00000015
    195 #define SPFILENOTIFY_BACKUPERROR 0x00000016
    196 #define SPFILENOTIFY_ENDBACKUP 0x00000017
    197 
    198 #define SPFILENOTIFY_QUEUESCAN_EX 0x00000018
    199 
    200 #define SPFILENOTIFY_STARTREGISTRATION 0x00000019
    201 #define SPFILENOTIFY_ENDREGISTRATION 0x00000020
    202 #define SPFILENOTIFY_QUEUESCAN_SIGNERINFO 0x00000040
    203 
    204 #define SPFILENOTIFY_LANGMISMATCH 0x00010000
    205 #define SPFILENOTIFY_TARGETEXISTS 0x00020000
    206 #define SPFILENOTIFY_TARGETNEWER 0x00040000
    207 
    208 #define FILEOP_COPY 0
    209 #define FILEOP_RENAME 1
    210 #define FILEOP_DELETE 2
    211 #define FILEOP_BACKUP 3
    212 
    213 #define FILEOP_ABORT 0
    214 #define FILEOP_DOIT 1
    215 #define FILEOP_SKIP 2
    216 #define FILEOP_RETRY FILEOP_DOIT
    217 #define FILEOP_NEWPATH 4
    218 
    219 #define COPYFLG_WARN_IF_SKIP 0x00000001
    220 #define COPYFLG_NOSKIP 0x00000002
    221 #define COPYFLG_NOVERSIONCHECK 0x00000004
    222 #define COPYFLG_FORCE_FILE_IN_USE 0x00000008
    223 #define COPYFLG_NO_OVERWRITE 0x00000010
    224 #define COPYFLG_NO_VERSION_DIALOG 0x00000020
    225 #define COPYFLG_OVERWRITE_OLDER_ONLY 0x00000040
    226 #define COPYFLG_REPLACEONLY 0x00000400
    227 #define COPYFLG_NODECOMP 0x00000800
    228 #define COPYFLG_REPLACE_BOOT_FILE 0x00001000
    229 
    230 #define COPYFLG_NOPRUNE 0x00002000
    231 
    232 #define DELFLG_IN_USE 0x00000001
    233 #define DELFLG_IN_USE1 0x00010000
    234 
    235   typedef struct _FILEPATHS_A {
    236     PCSTR Target;
    237     PCSTR Source;
    238     UINT Win32Error;
    239     DWORD Flags;
    240   } FILEPATHS_A,*PFILEPATHS_A;
    241 
    242   typedef struct _FILEPATHS_W {
    243     PCWSTR Target;
    244     PCWSTR Source;
    245     UINT Win32Error;
    246     DWORD Flags;
    247   } FILEPATHS_W,*PFILEPATHS_W;
    248 
    249   __MINGW_TYPEDEF_UAW(FILEPATHS)
    250   __MINGW_TYPEDEF_UAW(PFILEPATHS)
    251 
    252   typedef struct _FILEPATHS_SIGNERINFO_A {
    253     PCSTR Target;
    254     PCSTR Source;
    255     UINT Win32Error;
    256     DWORD Flags;
    257     PCSTR DigitalSigner;
    258     PCSTR Version;
    259     PCSTR CatalogFile;
    260   } FILEPATHS_SIGNERINFO_A,*PFILEPATHS_SIGNERINFO_A;
    261 
    262   typedef struct _FILEPATHS_SIGNERINFO_W {
    263     PCWSTR Target;
    264     PCWSTR Source;
    265     UINT Win32Error;
    266     DWORD Flags;
    267     PCWSTR DigitalSigner;
    268     PCWSTR Version;
    269     PCWSTR CatalogFile;
    270   } FILEPATHS_SIGNERINFO_W,*PFILEPATHS_SIGNERINFO_W;
    271 
    272   __MINGW_TYPEDEF_UAW(FILEPATHS_SIGNERINFO)
    273   __MINGW_TYPEDEF_UAW(PFILEPATHS_SIGNERINFO)
    274 
    275   typedef struct _SOURCE_MEDIA_A {
    276     PCSTR Reserved;
    277     PCSTR Tagfile;
    278     PCSTR Description;
    279     PCSTR SourcePath;
    280     PCSTR SourceFile;
    281     DWORD Flags;
    282   } SOURCE_MEDIA_A,*PSOURCE_MEDIA_A;
    283 
    284   typedef struct _SOURCE_MEDIA_W {
    285     PCWSTR Reserved;
    286     PCWSTR Tagfile;
    287     PCWSTR Description;
    288     PCWSTR SourcePath;
    289     PCWSTR SourceFile;
    290     DWORD Flags;
    291   } SOURCE_MEDIA_W,*PSOURCE_MEDIA_W;
    292 
    293   __MINGW_TYPEDEF_UAW(SOURCE_MEDIA)
    294   __MINGW_TYPEDEF_UAW(PSOURCE_MEDIA)
    295 
    296   typedef struct _CABINET_INFO_A {
    297     PCSTR CabinetPath;
    298     PCSTR CabinetFile;
    299     PCSTR DiskName;
    300     USHORT SetId;
    301     USHORT CabinetNumber;
    302   } CABINET_INFO_A,*PCABINET_INFO_A;
    303 
    304   typedef struct _CABINET_INFO_W {
    305     PCWSTR CabinetPath;
    306     PCWSTR CabinetFile;
    307     PCWSTR DiskName;
    308     USHORT SetId;
    309     USHORT CabinetNumber;
    310   } CABINET_INFO_W,*PCABINET_INFO_W;
    311 
    312   __MINGW_TYPEDEF_UAW(CABINET_INFO)
    313   __MINGW_TYPEDEF_UAW(PCABINET_INFO)
    314 
    315   typedef struct _FILE_IN_CABINET_INFO_A {
    316     PCSTR NameInCabinet;
    317     DWORD FileSize;
    318     DWORD Win32Error;
    319     WORD DosDate;
    320     WORD DosTime;
    321     WORD DosAttribs;
    322     CHAR FullTargetName[MAX_PATH];
    323   } FILE_IN_CABINET_INFO_A,*PFILE_IN_CABINET_INFO_A;
    324 
    325   typedef struct _FILE_IN_CABINET_INFO_W {
    326     PCWSTR NameInCabinet;
    327     DWORD FileSize;
    328     DWORD Win32Error;
    329     WORD DosDate;
    330     WORD DosTime;
    331     WORD DosAttribs;
    332     WCHAR FullTargetName[MAX_PATH];
    333   } FILE_IN_CABINET_INFO_W,*PFILE_IN_CABINET_INFO_W;
    334 
    335   __MINGW_TYPEDEF_UAW(FILE_IN_CABINET_INFO)
    336   __MINGW_TYPEDEF_UAW(PFILE_IN_CABINET_INFO)
    337 
    338   typedef struct _SP_REGISTER_CONTROL_STATUSA {
    339     DWORD cbSize;
    340     PCSTR FileName;
    341     DWORD Win32Error;
    342     DWORD FailureCode;
    343   } SP_REGISTER_CONTROL_STATUSA,*PSP_REGISTER_CONTROL_STATUSA;
    344 
    345   typedef struct _SP_REGISTER_CONTROL_STATUSW {
    346     DWORD cbSize;
    347     PCWSTR FileName;
    348     DWORD Win32Error;
    349     DWORD FailureCode;
    350   } SP_REGISTER_CONTROL_STATUSW,*PSP_REGISTER_CONTROL_STATUSW;
    351 
    352   __MINGW_TYPEDEF_AW(SP_REGISTER_CONTROL_STATUS)
    353   __MINGW_TYPEDEF_AW(PSP_REGISTER_CONTROL_STATUS)
    354 
    355 #define SPREG_SUCCESS 0x00000000
    356 #define SPREG_LOADLIBRARY 0x00000001
    357 #define SPREG_GETPROCADDR 0x00000002
    358 #define SPREG_REGSVR 0x00000003
    359 #define SPREG_DLLINSTALL 0x00000004
    360 #define SPREG_TIMEOUT 0x00000005
    361 #define SPREG_UNKNOWN 0xFFFFFFFF
    362 
    363   typedef PVOID HSPFILEQ;
    364 
    365   typedef struct _SP_FILE_COPY_PARAMS_A {
    366     DWORD cbSize;
    367     HSPFILEQ QueueHandle;
    368     PCSTR SourceRootPath;
    369     PCSTR SourcePath;
    370     PCSTR SourceFilename;
    371     PCSTR SourceDescription;
    372     PCSTR SourceTagfile;
    373     PCSTR TargetDirectory;
    374     PCSTR TargetFilename;
    375     DWORD CopyStyle;
    376     HINF LayoutInf;
    377     PCSTR SecurityDescriptor;
    378   } SP_FILE_COPY_PARAMS_A,*PSP_FILE_COPY_PARAMS_A;
    379 
    380   typedef struct _SP_FILE_COPY_PARAMS_W {
    381     DWORD cbSize;
    382     HSPFILEQ QueueHandle;
    383     PCWSTR SourceRootPath;
    384     PCWSTR SourcePath;
    385     PCWSTR SourceFilename;
    386     PCWSTR SourceDescription;
    387     PCWSTR SourceTagfile;
    388     PCWSTR TargetDirectory;
    389     PCWSTR TargetFilename;
    390     DWORD CopyStyle;
    391     HINF LayoutInf;
    392     PCWSTR SecurityDescriptor;
    393   } SP_FILE_COPY_PARAMS_W,*PSP_FILE_COPY_PARAMS_W;
    394 
    395   __MINGW_TYPEDEF_UAW(SP_FILE_COPY_PARAMS)
    396   __MINGW_TYPEDEF_UAW(PSP_FILE_COPY_PARAMS)
    397 
    398   typedef PVOID HDSKSPC;
    399   typedef PVOID HDEVINFO;
    400 
    401   typedef struct _SP_DEVINFO_DATA {
    402     DWORD cbSize;
    403     GUID ClassGuid;
    404     DWORD DevInst;
    405     ULONG_PTR Reserved;
    406   } SP_DEVINFO_DATA,*PSP_DEVINFO_DATA;
    407 
    408   typedef struct _SP_DEVICE_INTERFACE_DATA {
    409     DWORD cbSize;
    410     GUID InterfaceClassGuid;
    411     DWORD Flags;
    412     ULONG_PTR Reserved;
    413   } SP_DEVICE_INTERFACE_DATA,*PSP_DEVICE_INTERFACE_DATA;
    414 
    415 #define SPINT_ACTIVE 0x00000001
    416 #define SPINT_DEFAULT 0x00000002
    417 #define SPINT_REMOVED 0x00000004
    418 
    419   typedef SP_DEVICE_INTERFACE_DATA SP_INTERFACE_DEVICE_DATA;
    420   typedef PSP_DEVICE_INTERFACE_DATA PSP_INTERFACE_DEVICE_DATA;
    421 #define SPID_ACTIVE SPINT_ACTIVE
    422 #define SPID_DEFAULT SPINT_DEFAULT
    423 #define SPID_REMOVED SPINT_REMOVED
    424 
    425   typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A {
    426     DWORD cbSize;
    427     CHAR DevicePath[ANYSIZE_ARRAY];
    428   } SP_DEVICE_INTERFACE_DETAIL_DATA_A,*PSP_DEVICE_INTERFACE_DETAIL_DATA_A;
    429 
    430   typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W {
    431     DWORD cbSize;
    432     WCHAR DevicePath[ANYSIZE_ARRAY];
    433   } SP_DEVICE_INTERFACE_DETAIL_DATA_W,*PSP_DEVICE_INTERFACE_DETAIL_DATA_W;
    434 
    435   __MINGW_TYPEDEF_UAW(SP_DEVICE_INTERFACE_DETAIL_DATA)
    436   __MINGW_TYPEDEF_UAW(PSP_DEVICE_INTERFACE_DETAIL_DATA)
    437 
    438   typedef SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_INTERFACE_DEVICE_DETAIL_DATA_W;
    439   typedef PSP_DEVICE_INTERFACE_DETAIL_DATA_W PSP_INTERFACE_DEVICE_DETAIL_DATA_W;
    440   typedef SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_INTERFACE_DEVICE_DETAIL_DATA_A;
    441   typedef PSP_DEVICE_INTERFACE_DETAIL_DATA_A PSP_INTERFACE_DEVICE_DETAIL_DATA_A;
    442 
    443   __MINGW_TYPEDEF_UAW(SP_INTERFACE_DEVICE_DETAIL_DATA)
    444   __MINGW_TYPEDEF_UAW(PSP_INTERFACE_DEVICE_DETAIL_DATA)
    445 
    446   typedef struct _SP_DEVINFO_LIST_DETAIL_DATA_A {
    447     DWORD cbSize;
    448     GUID ClassGuid;
    449     HANDLE RemoteMachineHandle;
    450     CHAR RemoteMachineName[SP_MAX_MACHINENAME_LENGTH];
    451   } SP_DEVINFO_LIST_DETAIL_DATA_A,*PSP_DEVINFO_LIST_DETAIL_DATA_A;
    452 
    453   typedef struct _SP_DEVINFO_LIST_DETAIL_DATA_W {
    454     DWORD cbSize;
    455     GUID ClassGuid;
    456     HANDLE RemoteMachineHandle;
    457     WCHAR RemoteMachineName[SP_MAX_MACHINENAME_LENGTH];
    458   } SP_DEVINFO_LIST_DETAIL_DATA_W,*PSP_DEVINFO_LIST_DETAIL_DATA_W;
    459 
    460   __MINGW_TYPEDEF_UAW(SP_DEVINFO_LIST_DETAIL_DATA)
    461   __MINGW_TYPEDEF_UAW(PSP_DEVINFO_LIST_DETAIL_DATA)
    462 
    463 #define DIF_SELECTDEVICE 0x00000001
    464 #define DIF_INSTALLDEVICE 0x00000002
    465 #define DIF_ASSIGNRESOURCES 0x00000003
    466 #define DIF_PROPERTIES 0x00000004
    467 #define DIF_REMOVE 0x00000005
    468 #define DIF_FIRSTTIMESETUP 0x00000006
    469 #define DIF_FOUNDDEVICE 0x00000007
    470 #define DIF_SELECTCLASSDRIVERS 0x00000008
    471 #define DIF_VALIDATECLASSDRIVERS 0x00000009
    472 #define DIF_INSTALLCLASSDRIVERS 0x0000000A
    473 #define DIF_CALCDISKSPACE 0x0000000B
    474 #define DIF_DESTROYPRIVATEDATA 0x0000000C
    475 #define DIF_VALIDATEDRIVER 0x0000000D
    476 #define DIF_DETECT 0x0000000F
    477 #define DIF_INSTALLWIZARD 0x00000010
    478 #define DIF_DESTROYWIZARDDATA 0x00000011
    479 #define DIF_PROPERTYCHANGE 0x00000012
    480 #define DIF_ENABLECLASS 0x00000013
    481 #define DIF_DETECTVERIFY 0x00000014
    482 #define DIF_INSTALLDEVICEFILES 0x00000015
    483 #define DIF_UNREMOVE 0x00000016
    484 #define DIF_SELECTBESTCOMPATDRV 0x00000017
    485 #define DIF_ALLOW_INSTALL 0x00000018
    486 #define DIF_REGISTERDEVICE 0x00000019
    487 #define DIF_NEWDEVICEWIZARD_PRESELECT 0x0000001A
    488 #define DIF_NEWDEVICEWIZARD_SELECT 0x0000001B
    489 #define DIF_NEWDEVICEWIZARD_PREANALYZE 0x0000001C
    490 #define DIF_NEWDEVICEWIZARD_POSTANALYZE 0x0000001D
    491 #define DIF_NEWDEVICEWIZARD_FINISHINSTALL 0x0000001E
    492 #define DIF_UNUSED1 0x0000001F
    493 #define DIF_INSTALLINTERFACES 0x00000020
    494 #define DIF_DETECTCANCEL 0x00000021
    495 #define DIF_REGISTER_COINSTALLERS 0x00000022
    496 #define DIF_ADDPROPERTYPAGE_ADVANCED 0x00000023
    497 #define DIF_ADDPROPERTYPAGE_BASIC 0x00000024
    498 #define DIF_RESERVED1 0x00000025
    499 #define DIF_TROUBLESHOOTER 0x00000026
    500 #define DIF_POWERMESSAGEWAKE 0x00000027
    501 #define DIF_ADDREMOTEPROPERTYPAGE_ADVANCED 0x00000028
    502 #define DIF_UPDATEDRIVER_UI 0x00000029
    503 #define DIF_RESERVED2 0x00000030
    504 
    505 #define DIF_MOVEDEVICE 0x0000000E
    506 
    507   typedef UINT DI_FUNCTION;
    508 
    509   typedef struct _SP_DEVINSTALL_PARAMS_A {
    510     DWORD cbSize;
    511     DWORD Flags;
    512     DWORD FlagsEx;
    513     HWND hwndParent;
    514     PSP_FILE_CALLBACK InstallMsgHandler;
    515     PVOID InstallMsgHandlerContext;
    516     HSPFILEQ FileQueue;
    517     ULONG_PTR ClassInstallReserved;
    518     DWORD Reserved;
    519     CHAR DriverPath[MAX_PATH];
    520   } SP_DEVINSTALL_PARAMS_A,*PSP_DEVINSTALL_PARAMS_A;
    521 
    522   typedef struct _SP_DEVINSTALL_PARAMS_W {
    523     DWORD cbSize;
    524     DWORD Flags;
    525     DWORD FlagsEx;
    526     HWND hwndParent;
    527     PSP_FILE_CALLBACK InstallMsgHandler;
    528     PVOID InstallMsgHandlerContext;
    529     HSPFILEQ FileQueue;
    530     ULONG_PTR ClassInstallReserved;
    531     DWORD Reserved;
    532     WCHAR DriverPath[MAX_PATH];
    533   } SP_DEVINSTALL_PARAMS_W,*PSP_DEVINSTALL_PARAMS_W;
    534 
    535   __MINGW_TYPEDEF_UAW(SP_DEVINSTALL_PARAMS)
    536   __MINGW_TYPEDEF_UAW(PSP_DEVINSTALL_PARAMS)
    537 
    538 #define DI_SHOWOEM __MSABI_LONG(0x00000001)
    539 #define DI_SHOWCOMPAT __MSABI_LONG(0x00000002)
    540 #define DI_SHOWCLASS __MSABI_LONG(0x00000004)
    541 #define DI_SHOWALL __MSABI_LONG(0x00000007)
    542 #define DI_NOVCP __MSABI_LONG(0x00000008)
    543 #define DI_DIDCOMPAT __MSABI_LONG(0x00000010)
    544 #define DI_DIDCLASS __MSABI_LONG(0x00000020)
    545 #define DI_AUTOASSIGNRES __MSABI_LONG(0x00000040)
    546 #define DI_NEEDRESTART __MSABI_LONG(0x00000080)
    547 #define DI_NEEDREBOOT __MSABI_LONG(0x00000100)
    548 #define DI_NOBROWSE __MSABI_LONG(0x00000200)
    549 #define DI_MULTMFGS __MSABI_LONG(0x00000400)
    550 #define DI_DISABLED __MSABI_LONG(0x00000800)
    551 #define DI_GENERALPAGE_ADDED __MSABI_LONG(0x00001000)
    552 #define DI_RESOURCEPAGE_ADDED __MSABI_LONG(0x00002000)
    553 #define DI_PROPERTIES_CHANGE __MSABI_LONG(0x00004000)
    554 #define DI_INF_IS_SORTED __MSABI_LONG(0x00008000)
    555 #define DI_ENUMSINGLEINF __MSABI_LONG(0x00010000)
    556 #define DI_DONOTCALLCONFIGMG __MSABI_LONG(0x00020000)
    557 #define DI_INSTALLDISABLED __MSABI_LONG(0x00040000)
    558 #define DI_COMPAT_FROM_CLASS __MSABI_LONG(0x00080000)
    559 #define DI_CLASSINSTALLPARAMS __MSABI_LONG(0x00100000)
    560 #define DI_NODI_DEFAULTACTION __MSABI_LONG(0x00200000)
    561 #define DI_QUIETINSTALL __MSABI_LONG(0x00800000)
    562 #define DI_NOFILECOPY __MSABI_LONG(0x01000000)
    563 #define DI_FORCECOPY __MSABI_LONG(0x02000000)
    564 #define DI_DRIVERPAGE_ADDED __MSABI_LONG(0x04000000)
    565 #define DI_USECI_SELECTSTRINGS __MSABI_LONG(0x08000000)
    566 #define DI_OVERRIDE_INFFLAGS __MSABI_LONG(0x10000000)
    567 #define DI_PROPS_NOCHANGEUSAGE __MSABI_LONG(0x20000000)
    568 #define DI_NOSELECTICONS __MSABI_LONG(0x40000000)
    569 #define DI_NOWRITE_IDS __MSABI_LONG(0x80000000)
    570 #define DI_FLAGSEX_USEOLDINFSEARCH __MSABI_LONG(0x00000001)
    571 #define DI_FLAGSEX_RESERVED2 __MSABI_LONG(0x00000002)
    572 #define DI_FLAGSEX_CI_FAILED __MSABI_LONG(0x00000004)
    573 #define DI_FLAGSEX_DIDINFOLIST __MSABI_LONG(0x00000010)
    574 #define DI_FLAGSEX_DIDCOMPATINFO __MSABI_LONG(0x00000020)
    575 #define DI_FLAGSEX_FILTERCLASSES __MSABI_LONG(0x00000040)
    576 #define DI_FLAGSEX_SETFAILEDINSTALL __MSABI_LONG(0x00000080)
    577 #define DI_FLAGSEX_DEVICECHANGE __MSABI_LONG(0x00000100)
    578 #define DI_FLAGSEX_ALWAYSWRITEIDS __MSABI_LONG(0x00000200)
    579 #define DI_FLAGSEX_PROPCHANGE_PENDING __MSABI_LONG(0x00000400)
    580 #define DI_FLAGSEX_ALLOWEXCLUDEDDRVS __MSABI_LONG(0x00000800)
    581 #define DI_FLAGSEX_NOUIONQUERYREMOVE __MSABI_LONG(0x00001000)
    582 #define DI_FLAGSEX_USECLASSFORCOMPAT __MSABI_LONG(0x00002000)
    583 #define DI_FLAGSEX_RESERVED3 __MSABI_LONG(0x00004000)
    584 #define DI_FLAGSEX_NO_DRVREG_MODIFY __MSABI_LONG(0x00008000)
    585 #define DI_FLAGSEX_IN_SYSTEM_SETUP __MSABI_LONG(0x00010000)
    586 #define DI_FLAGSEX_INET_DRIVER __MSABI_LONG(0x00020000)
    587 #define DI_FLAGSEX_APPENDDRIVERLIST __MSABI_LONG(0x00040000)
    588 #define DI_FLAGSEX_PREINSTALLBACKUP __MSABI_LONG(0x00080000)
    589 #define DI_FLAGSEX_BACKUPONREPLACE __MSABI_LONG(0x00100000)
    590 #define DI_FLAGSEX_DRIVERLIST_FROM_URL __MSABI_LONG(0x00200000)
    591 #define DI_FLAGSEX_RESERVED1 __MSABI_LONG(0x00400000)
    592 #define DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS __MSABI_LONG(0x00800000)
    593 #define DI_FLAGSEX_POWERPAGE_ADDED __MSABI_LONG(0x01000000)
    594 #define DI_FLAGSEX_FILTERSIMILARDRIVERS __MSABI_LONG(0x02000000)
    595 #define DI_FLAGSEX_INSTALLEDDRIVER __MSABI_LONG(0x04000000)
    596 #define DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE __MSABI_LONG(0x08000000)
    597 #define DI_FLAGSEX_ALTPLATFORM_DRVSEARCH __MSABI_LONG(0x10000000)
    598 #define DI_FLAGSEX_RESTART_DEVICE_ONLY __MSABI_LONG(0x20000000)
    599 
    600   typedef struct _SP_CLASSINSTALL_HEADER {
    601     DWORD cbSize;
    602     DI_FUNCTION InstallFunction;
    603   } SP_CLASSINSTALL_HEADER,*PSP_CLASSINSTALL_HEADER;
    604 
    605   typedef struct _SP_ENABLECLASS_PARAMS {
    606     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    607     GUID ClassGuid;
    608     DWORD EnableMessage;
    609   } SP_ENABLECLASS_PARAMS,*PSP_ENABLECLASS_PARAMS;
    610 
    611 #define ENABLECLASS_QUERY 0
    612 #define ENABLECLASS_SUCCESS 1
    613 #define ENABLECLASS_FAILURE 2
    614 
    615 #define DICS_ENABLE 0x00000001
    616 #define DICS_DISABLE 0x00000002
    617 #define DICS_PROPCHANGE 0x00000003
    618 #define DICS_START 0x00000004
    619 #define DICS_STOP 0x00000005
    620 
    621 #define DICS_FLAG_GLOBAL 0x00000001
    622 #define DICS_FLAG_CONFIGSPECIFIC 0x00000002
    623 #define DICS_FLAG_CONFIGGENERAL 0x00000004
    624 
    625   typedef struct _SP_PROPCHANGE_PARAMS {
    626     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    627     DWORD StateChange;
    628     DWORD Scope;
    629     DWORD HwProfile;
    630   } SP_PROPCHANGE_PARAMS,*PSP_PROPCHANGE_PARAMS;
    631 
    632   typedef struct _SP_REMOVEDEVICE_PARAMS {
    633     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    634     DWORD Scope;
    635     DWORD HwProfile;
    636   } SP_REMOVEDEVICE_PARAMS,*PSP_REMOVEDEVICE_PARAMS;
    637 
    638 #define DI_REMOVEDEVICE_GLOBAL 0x00000001
    639 #define DI_REMOVEDEVICE_CONFIGSPECIFIC 0x00000002
    640 
    641   typedef struct _SP_UNREMOVEDEVICE_PARAMS {
    642     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    643     DWORD Scope;
    644     DWORD HwProfile;
    645   } SP_UNREMOVEDEVICE_PARAMS,*PSP_UNREMOVEDEVICE_PARAMS;
    646 
    647 #define DI_UNREMOVEDEVICE_CONFIGSPECIFIC 0x00000002
    648 
    649   typedef struct _SP_SELECTDEVICE_PARAMS_A {
    650     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    651     CHAR Title[MAX_TITLE_LEN];
    652     CHAR Instructions[MAX_INSTRUCTION_LEN];
    653     CHAR ListLabel[MAX_LABEL_LEN];
    654     CHAR SubTitle[MAX_SUBTITLE_LEN];
    655     BYTE Reserved[2];
    656   } SP_SELECTDEVICE_PARAMS_A,*PSP_SELECTDEVICE_PARAMS_A;
    657 
    658   typedef struct _SP_SELECTDEVICE_PARAMS_W {
    659     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    660     WCHAR Title[MAX_TITLE_LEN];
    661     WCHAR Instructions[MAX_INSTRUCTION_LEN];
    662     WCHAR ListLabel[MAX_LABEL_LEN];
    663     WCHAR SubTitle[MAX_SUBTITLE_LEN];
    664   } SP_SELECTDEVICE_PARAMS_W,*PSP_SELECTDEVICE_PARAMS_W;
    665 
    666   __MINGW_TYPEDEF_UAW(SP_SELECTDEVICE_PARAMS)
    667   __MINGW_TYPEDEF_UAW(PSP_SELECTDEVICE_PARAMS)
    668 
    669   typedef WINBOOL (CALLBACK *PDETECT_PROGRESS_NOTIFY)(PVOID ProgressNotifyParam,DWORD DetectComplete);
    670 
    671   typedef struct _SP_DETECTDEVICE_PARAMS {
    672     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    673     PDETECT_PROGRESS_NOTIFY DetectProgressNotify;
    674     PVOID ProgressNotifyParam;
    675   } SP_DETECTDEVICE_PARAMS,*PSP_DETECTDEVICE_PARAMS;
    676 
    677 #define MAX_INSTALLWIZARD_DYNAPAGES 20
    678 
    679   typedef struct _SP_INSTALLWIZARD_DATA {
    680     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    681     DWORD Flags;
    682     HPROPSHEETPAGE DynamicPages[MAX_INSTALLWIZARD_DYNAPAGES];
    683     DWORD NumDynamicPages;
    684     DWORD DynamicPageFlags;
    685     DWORD PrivateFlags;
    686     LPARAM PrivateData;
    687     HWND hwndWizardDlg;
    688   } SP_INSTALLWIZARD_DATA,*PSP_INSTALLWIZARD_DATA;
    689 
    690 #define NDW_INSTALLFLAG_DIDFACTDEFS 0x00000001
    691 #define NDW_INSTALLFLAG_HARDWAREALLREADYIN 0x00000002
    692 #define NDW_INSTALLFLAG_NEEDRESTART DI_NEEDRESTART
    693 #define NDW_INSTALLFLAG_NEEDREBOOT DI_NEEDREBOOT
    694 #define NDW_INSTALLFLAG_NEEDSHUTDOWN 0x00000200
    695 #define NDW_INSTALLFLAG_EXPRESSINTRO 0x00000400
    696 #define NDW_INSTALLFLAG_SKIPISDEVINSTALLED 0x00000800
    697 #define NDW_INSTALLFLAG_NODETECTEDDEVS 0x00001000
    698 #define NDW_INSTALLFLAG_INSTALLSPECIFIC 0x00002000
    699 #define NDW_INSTALLFLAG_SKIPCLASSLIST 0x00004000
    700 #define NDW_INSTALLFLAG_CI_PICKED_OEM 0x00008000
    701 #define NDW_INSTALLFLAG_PCMCIAMODE 0x00010000
    702 #define NDW_INSTALLFLAG_PCMCIADEVICE 0x00020000
    703 #define NDW_INSTALLFLAG_USERCANCEL 0x00040000
    704 #define NDW_INSTALLFLAG_KNOWNCLASS 0x00080000
    705 
    706 #define DYNAWIZ_FLAG_PAGESADDED 0x00000001
    707 #define DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT 0x00000008
    708 #define DYNAWIZ_FLAG_INSTALLDET_NEXT 0x00000002
    709 #define DYNAWIZ_FLAG_INSTALLDET_PREV 0x00000004
    710 
    711 #define MIN_IDD_DYNAWIZ_RESOURCE_ID 10000
    712 #define MAX_IDD_DYNAWIZ_RESOURCE_ID 11000
    713 
    714 #define IDD_DYNAWIZ_FIRSTPAGE 10000
    715 #define IDD_DYNAWIZ_SELECT_PREVPAGE 10001
    716 #define IDD_DYNAWIZ_SELECT_NEXTPAGE 10002
    717 #define IDD_DYNAWIZ_ANALYZE_PREVPAGE 10003
    718 #define IDD_DYNAWIZ_ANALYZE_NEXTPAGE 10004
    719 #define IDD_DYNAWIZ_SELECTDEV_PAGE 10009
    720 #define IDD_DYNAWIZ_ANALYZEDEV_PAGE 10010
    721 #define IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE 10011
    722 #define IDD_DYNAWIZ_SELECTCLASS_PAGE 10012
    723 #define IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE 10006
    724 #define IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE 10007
    725 #define IDD_DYNAWIZ_INSTALLDETECTED_NODEVS 10008
    726 
    727   typedef struct _SP_NEWDEVICEWIZARD_DATA {
    728     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    729     DWORD Flags;
    730     HPROPSHEETPAGE DynamicPages[MAX_INSTALLWIZARD_DYNAPAGES];
    731     DWORD NumDynamicPages;
    732     HWND hwndWizardDlg;
    733   } SP_NEWDEVICEWIZARD_DATA,*PSP_NEWDEVICEWIZARD_DATA;
    734 
    735   typedef SP_NEWDEVICEWIZARD_DATA SP_ADDPROPERTYPAGE_DATA;
    736   typedef PSP_NEWDEVICEWIZARD_DATA PSP_ADDPROPERTYPAGE_DATA;
    737 
    738   typedef struct _SP_TROUBLESHOOTER_PARAMS_A {
    739     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    740     CHAR ChmFile[MAX_PATH];
    741     CHAR HtmlTroubleShooter[MAX_PATH];
    742   } SP_TROUBLESHOOTER_PARAMS_A,*PSP_TROUBLESHOOTER_PARAMS_A;
    743 
    744   typedef struct _SP_TROUBLESHOOTER_PARAMS_W {
    745     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    746     WCHAR ChmFile[MAX_PATH];
    747     WCHAR HtmlTroubleShooter[MAX_PATH];
    748   } SP_TROUBLESHOOTER_PARAMS_W,*PSP_TROUBLESHOOTER_PARAMS_W;
    749 
    750   __MINGW_TYPEDEF_UAW(SP_TROUBLESHOOTER_PARAMS)
    751   __MINGW_TYPEDEF_UAW(PSP_TROUBLESHOOTER_PARAMS)
    752 
    753   typedef struct _SP_POWERMESSAGEWAKE_PARAMS_A {
    754     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    755     CHAR PowerMessageWake[LINE_LEN*2];
    756   } SP_POWERMESSAGEWAKE_PARAMS_A,*PSP_POWERMESSAGEWAKE_PARAMS_A;
    757 
    758   typedef struct _SP_POWERMESSAGEWAKE_PARAMS_W {
    759     SP_CLASSINSTALL_HEADER ClassInstallHeader;
    760     WCHAR PowerMessageWake[LINE_LEN*2];
    761   } SP_POWERMESSAGEWAKE_PARAMS_W,*PSP_POWERMESSAGEWAKE_PARAMS_W;
    762 
    763   __MINGW_TYPEDEF_UAW(SP_POWERMESSAGEWAKE_PARAMS)
    764   __MINGW_TYPEDEF_UAW(PSP_POWERMESSAGEWAKE_PARAMS)
    765 
    766   typedef struct _SP_DRVINFO_DATA_V2_A {
    767     DWORD cbSize;
    768     DWORD DriverType;
    769     ULONG_PTR Reserved;
    770     CHAR Description[LINE_LEN];
    771     CHAR MfgName[LINE_LEN];
    772     CHAR ProviderName[LINE_LEN];
    773     FILETIME DriverDate;
    774     DWORDLONG DriverVersion;
    775   } SP_DRVINFO_DATA_V2_A,*PSP_DRVINFO_DATA_V2_A;
    776 
    777   typedef struct _SP_DRVINFO_DATA_V2_W {
    778     DWORD cbSize;
    779     DWORD DriverType;
    780     ULONG_PTR Reserved;
    781     WCHAR Description[LINE_LEN];
    782     WCHAR MfgName[LINE_LEN];
    783     WCHAR ProviderName[LINE_LEN];
    784     FILETIME DriverDate;
    785     DWORDLONG DriverVersion;
    786   } SP_DRVINFO_DATA_V2_W,*PSP_DRVINFO_DATA_V2_W;
    787 
    788   typedef struct _SP_DRVINFO_DATA_V1_A {
    789     DWORD cbSize;
    790     DWORD DriverType;
    791     ULONG_PTR Reserved;
    792     CHAR Description[LINE_LEN];
    793     CHAR MfgName[LINE_LEN];
    794     CHAR ProviderName[LINE_LEN];
    795   } SP_DRVINFO_DATA_V1_A,*PSP_DRVINFO_DATA_V1_A;
    796 
    797   typedef struct _SP_DRVINFO_DATA_V1_W {
    798     DWORD cbSize;
    799     DWORD DriverType;
    800     ULONG_PTR Reserved;
    801     WCHAR Description[LINE_LEN];
    802     WCHAR MfgName[LINE_LEN];
    803     WCHAR ProviderName[LINE_LEN];
    804   } SP_DRVINFO_DATA_V1_W,*PSP_DRVINFO_DATA_V1_W;
    805 
    806   __MINGW_TYPEDEF_UAW(SP_DRVINFO_DATA_V1)
    807   __MINGW_TYPEDEF_UAW(PSP_DRVINFO_DATA_V1)
    808   __MINGW_TYPEDEF_UAW(SP_DRVINFO_DATA_V2)
    809   __MINGW_TYPEDEF_UAW(PSP_DRVINFO_DATA_V2)
    810 
    811 #if USE_SP_DRVINFO_DATA_V1
    812 
    813   typedef SP_DRVINFO_DATA_V1_A SP_DRVINFO_DATA_A;
    814   typedef PSP_DRVINFO_DATA_V1_A PSP_DRVINFO_DATA_A;
    815   typedef SP_DRVINFO_DATA_V1_W SP_DRVINFO_DATA_W;
    816   typedef PSP_DRVINFO_DATA_V1_W PSP_DRVINFO_DATA_W;
    817   typedef SP_DRVINFO_DATA_V1 SP_DRVINFO_DATA;
    818   typedef PSP_DRVINFO_DATA_V1 PSP_DRVINFO_DATA;
    819 #else
    820 
    821   typedef SP_DRVINFO_DATA_V2_A SP_DRVINFO_DATA_A;
    822   typedef PSP_DRVINFO_DATA_V2_A PSP_DRVINFO_DATA_A;
    823   typedef SP_DRVINFO_DATA_V2_W SP_DRVINFO_DATA_W;
    824   typedef PSP_DRVINFO_DATA_V2_W PSP_DRVINFO_DATA_W;
    825   typedef SP_DRVINFO_DATA_V2 SP_DRVINFO_DATA;
    826   typedef PSP_DRVINFO_DATA_V2 PSP_DRVINFO_DATA;
    827 #endif
    828 
    829   typedef struct _SP_DRVINFO_DETAIL_DATA_A {
    830     DWORD cbSize;
    831     FILETIME InfDate;
    832     DWORD CompatIDsOffset;
    833     DWORD CompatIDsLength;
    834     ULONG_PTR Reserved;
    835     CHAR SectionName[LINE_LEN];
    836     CHAR InfFileName[MAX_PATH];
    837     CHAR DrvDescription[LINE_LEN];
    838     CHAR HardwareID[ANYSIZE_ARRAY];
    839   } SP_DRVINFO_DETAIL_DATA_A,*PSP_DRVINFO_DETAIL_DATA_A;
    840 
    841   typedef struct _SP_DRVINFO_DETAIL_DATA_W {
    842     DWORD cbSize;
    843     FILETIME InfDate;
    844     DWORD CompatIDsOffset;
    845     DWORD CompatIDsLength;
    846     ULONG_PTR Reserved;
    847     WCHAR SectionName[LINE_LEN];
    848     WCHAR InfFileName[MAX_PATH];
    849     WCHAR DrvDescription[LINE_LEN];
    850     WCHAR HardwareID[ANYSIZE_ARRAY];
    851   } SP_DRVINFO_DETAIL_DATA_W,*PSP_DRVINFO_DETAIL_DATA_W;
    852 
    853   __MINGW_TYPEDEF_UAW(SP_DRVINFO_DETAIL_DATA)
    854   __MINGW_TYPEDEF_UAW(PSP_DRVINFO_DETAIL_DATA)
    855 
    856   typedef struct _SP_DRVINSTALL_PARAMS {
    857     DWORD cbSize;
    858     DWORD Rank;
    859     DWORD Flags;
    860     DWORD_PTR PrivateData;
    861     DWORD Reserved;
    862   } SP_DRVINSTALL_PARAMS,*PSP_DRVINSTALL_PARAMS;
    863 
    864 #define DNF_DUPDESC 0x00000001
    865 #define DNF_OLDDRIVER 0x00000002
    866 #define DNF_EXCLUDEFROMLIST 0x00000004
    867 #define DNF_NODRIVER 0x00000008
    868 #define DNF_LEGACYINF 0x00000010
    869 #define DNF_CLASS_DRIVER 0x00000020
    870 #define DNF_COMPATIBLE_DRIVER 0x00000040
    871 #define DNF_INET_DRIVER 0x00000080
    872 #define DNF_UNUSED1 0x00000100
    873 #define DNF_INDEXED_DRIVER 0x00000200
    874 #define DNF_OLD_INET_DRIVER 0x00000400
    875 #define DNF_BAD_DRIVER 0x00000800
    876 #define DNF_DUPPROVIDER 0x00001000
    877 #define DNF_INF_IS_SIGNED 0x00002000
    878 #define DNF_OEM_F6_INF 0x00004000
    879 #define DNF_DUPDRIVERVER 0x00008000
    880 #define DNF_BASIC_DRIVER 0x00010000
    881 #define DNF_AUTHENTICODE_SIGNED 0x00020000
    882 
    883 #define DRIVER_HARDWAREID_RANK 0x00000FFF
    884 #define DRIVER_COMPATID_RANK 0x00003FFF
    885 #define DRIVER_UNTRUSTED_RANK 0x00008000
    886 #define DRIVER_UNTRUSTED_HARDWAREID_RANK 0x00008FFF
    887 #define DRIVER_UNTRUSTED_COMPATID_RANK 0x0000BFFF
    888 #define DRIVER_W9X_SUSPECT_RANK 0x0000C000
    889 #define DRIVER_W9X_SUSPECT_HARDWAREID_RANK 0x0000CFFF
    890 #define DRIVER_W9X_SUSPECT_COMPATID_RANK 0x0000FFFF
    891 
    892   typedef DWORD (CALLBACK *PSP_DETSIG_CMPPROC)(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA NewDeviceData,PSP_DEVINFO_DATA ExistingDeviceData,PVOID CompareContext);
    893 
    894   typedef struct _COINSTALLER_CONTEXT_DATA {
    895     WINBOOL PostProcessing;
    896     DWORD InstallResult;
    897     PVOID PrivateData;
    898   } COINSTALLER_CONTEXT_DATA,*PCOINSTALLER_CONTEXT_DATA;
    899 
    900   typedef struct _SP_CLASSIMAGELIST_DATA {
    901     DWORD cbSize;
    902     HIMAGELIST ImageList;
    903     ULONG_PTR Reserved;
    904   } SP_CLASSIMAGELIST_DATA,*PSP_CLASSIMAGELIST_DATA;
    905 
    906   typedef struct _SP_PROPSHEETPAGE_REQUEST {
    907     DWORD cbSize;
    908     DWORD PageRequested;
    909     HDEVINFO DeviceInfoSet;
    910     PSP_DEVINFO_DATA DeviceInfoData;
    911   } SP_PROPSHEETPAGE_REQUEST,*PSP_PROPSHEETPAGE_REQUEST;
    912 
    913 #define SPPSR_SELECT_DEVICE_RESOURCES 1
    914 #define SPPSR_ENUM_BASIC_DEVICE_PROPERTIES 2
    915 #define SPPSR_ENUM_ADV_DEVICE_PROPERTIES 3
    916 
    917   typedef struct _SP_BACKUP_QUEUE_PARAMS_V2_A {
    918     DWORD cbSize;
    919     CHAR FullInfPath[MAX_PATH];
    920     INT FilenameOffset;
    921     CHAR ReinstallInstance[MAX_PATH];
    922   } SP_BACKUP_QUEUE_PARAMS_V2_A,*PSP_BACKUP_QUEUE_PARAMS_V2_A;
    923 
    924   typedef struct _SP_BACKUP_QUEUE_PARAMS_V2_W {
    925     DWORD cbSize;
    926     WCHAR FullInfPath[MAX_PATH];
    927     INT FilenameOffset;
    928     WCHAR ReinstallInstance[MAX_PATH];
    929   } SP_BACKUP_QUEUE_PARAMS_V2_W,*PSP_BACKUP_QUEUE_PARAMS_V2_W;
    930 
    931   typedef struct _SP_BACKUP_QUEUE_PARAMS_V1_A {
    932     DWORD cbSize;
    933     CHAR FullInfPath[MAX_PATH];
    934     INT FilenameOffset;
    935   } SP_BACKUP_QUEUE_PARAMS_V1_A,*PSP_BACKUP_QUEUE_PARAMS_V1_A;
    936 
    937   typedef struct _SP_BACKUP_QUEUE_PARAMS_V1_W {
    938     DWORD cbSize;
    939     WCHAR FullInfPath[MAX_PATH];
    940     INT FilenameOffset;
    941   } SP_BACKUP_QUEUE_PARAMS_V1_W,*PSP_BACKUP_QUEUE_PARAMS_V1_W;
    942 
    943   __MINGW_TYPEDEF_UAW(SP_BACKUP_QUEUE_PARAMS_V1)
    944   __MINGW_TYPEDEF_UAW(PSP_BACKUP_QUEUE_PARAMS_V1)
    945   __MINGW_TYPEDEF_UAW(SP_BACKUP_QUEUE_PARAMS_V2)
    946   __MINGW_TYPEDEF_UAW(PSP_BACKUP_QUEUE_PARAMS_V2)
    947 
    948 #if USE_SP_BACKUP_QUEUE_PARAMS_V1
    949 
    950   typedef SP_BACKUP_QUEUE_PARAMS_V1_A SP_BACKUP_QUEUE_PARAMS_A;
    951   typedef PSP_BACKUP_QUEUE_PARAMS_V1_A PSP_BACKUP_QUEUE_PARAMS_A;
    952   typedef SP_BACKUP_QUEUE_PARAMS_V1_W SP_BACKUP_QUEUE_PARAMS_W;
    953   typedef PSP_BACKUP_QUEUE_PARAMS_V1_W PSP_BACKUP_QUEUE_PARAMS_W;
    954   typedef SP_BACKUP_QUEUE_PARAMS_V1 SP_BACKUP_QUEUE_PARAMS;
    955   typedef PSP_BACKUP_QUEUE_PARAMS_V1 PSP_BACKUP_QUEUE_PARAMS;
    956 #else
    957 
    958   typedef SP_BACKUP_QUEUE_PARAMS_V2_A SP_BACKUP_QUEUE_PARAMS_A;
    959   typedef PSP_BACKUP_QUEUE_PARAMS_V2_A PSP_BACKUP_QUEUE_PARAMS_A;
    960   typedef SP_BACKUP_QUEUE_PARAMS_V2_W SP_BACKUP_QUEUE_PARAMS_W;
    961   typedef PSP_BACKUP_QUEUE_PARAMS_V2_W PSP_BACKUP_QUEUE_PARAMS_W;
    962   typedef SP_BACKUP_QUEUE_PARAMS_V2 SP_BACKUP_QUEUE_PARAMS;
    963   typedef PSP_BACKUP_QUEUE_PARAMS_V2 PSP_BACKUP_QUEUE_PARAMS;
    964 #endif
    965 
    966 #define ERROR_EXPECTED_SECTION_NAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0)
    967 #define ERROR_BAD_SECTION_NAME_LINE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|1)
    968 #define ERROR_SECTION_NAME_TOO_LONG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|2)
    969 #define ERROR_GENERAL_SYNTAX (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|3)
    970 #define ERROR_WRONG_INF_STYLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x100)
    971 #define ERROR_SECTION_NOT_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x101)
    972 #define ERROR_LINE_NOT_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x102)
    973 #define ERROR_NO_BACKUP (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x103)
    974 #define ERROR_NO_ASSOCIATED_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x200)
    975 #define ERROR_CLASS_MISMATCH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x201)
    976 #define ERROR_DUPLICATE_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x202)
    977 #define ERROR_NO_DRIVER_SELECTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x203)
    978 #define ERROR_KEY_DOES_NOT_EXIST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x204)
    979 #define ERROR_INVALID_DEVINST_NAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x205)
    980 #define ERROR_INVALID_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x206)
    981 #define ERROR_DEVINST_ALREADY_EXISTS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x207)
    982 #define ERROR_DEVINFO_NOT_REGISTERED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x208)
    983 #define ERROR_INVALID_REG_PROPERTY (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x209)
    984 #define ERROR_NO_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20A)
    985 #define ERROR_NO_SUCH_DEVINST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20B)
    986 #define ERROR_CANT_LOAD_CLASS_ICON (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20C)
    987 #define ERROR_INVALID_CLASS_INSTALLER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20D)
    988 #define ERROR_DI_DO_DEFAULT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20E)
    989 #define ERROR_DI_NOFILECOPY (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20F)
    990 #define ERROR_INVALID_HWPROFILE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x210)
    991 #define ERROR_NO_DEVICE_SELECTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x211)
    992 #define ERROR_DEVINFO_LIST_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x212)
    993 #define ERROR_DEVINFO_DATA_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x213)
    994 #define ERROR_DI_BAD_PATH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x214)
    995 #define ERROR_NO_CLASSINSTALL_PARAMS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x215)
    996 #define ERROR_FILEQUEUE_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x216)
    997 #define ERROR_BAD_SERVICE_INSTALLSECT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x217)
    998 #define ERROR_NO_CLASS_DRIVER_LIST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x218)
    999 #define ERROR_NO_ASSOCIATED_SERVICE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x219)
   1000 #define ERROR_NO_DEFAULT_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21A)
   1001 #define ERROR_DEVICE_INTERFACE_ACTIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21B)
   1002 #define ERROR_DEVICE_INTERFACE_REMOVED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21C)
   1003 #define ERROR_BAD_INTERFACE_INSTALLSECT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21D)
   1004 #define ERROR_NO_SUCH_INTERFACE_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21E)
   1005 #define ERROR_INVALID_REFERENCE_STRING (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21F)
   1006 #define ERROR_INVALID_MACHINENAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x220)
   1007 #define ERROR_REMOTE_COMM_FAILURE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x221)
   1008 #define ERROR_MACHINE_UNAVAILABLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x222)
   1009 #define ERROR_NO_CONFIGMGR_SERVICES (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x223)
   1010 #define ERROR_INVALID_PROPPAGE_PROVIDER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x224)
   1011 #define ERROR_NO_SUCH_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x225)
   1012 #define ERROR_DI_POSTPROCESSING_REQUIRED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x226)
   1013 #define ERROR_INVALID_COINSTALLER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x227)
   1014 #define ERROR_NO_COMPAT_DRIVERS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x228)
   1015 #define ERROR_NO_DEVICE_ICON (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x229)
   1016 #define ERROR_INVALID_INF_LOGCONFIG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22A)
   1017 #define ERROR_DI_DONT_INSTALL (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22B)
   1018 #define ERROR_INVALID_FILTER_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22C)
   1019 #define ERROR_NON_WINDOWS_NT_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22D)
   1020 #define ERROR_NON_WINDOWS_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22E)
   1021 #define ERROR_NO_CATALOG_FOR_OEM_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22F)
   1022 #define ERROR_DEVINSTALL_QUEUE_NONNATIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x230)
   1023 #define ERROR_NOT_DISABLEABLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x231)
   1024 #define ERROR_CANT_REMOVE_DEVINST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x232)
   1025 #define ERROR_INVALID_TARGET (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x233)
   1026 #define ERROR_DRIVER_NONNATIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x234)
   1027 #define ERROR_IN_WOW64 (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x235)
   1028 #define ERROR_SET_SYSTEM_RESTORE_POINT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x236)
   1029 #define ERROR_INCORRECTLY_COPIED_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x237)
   1030 #define ERROR_SCE_DISABLED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x238)
   1031 #define ERROR_UNKNOWN_EXCEPTION (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x239)
   1032 #define ERROR_PNP_REGISTRY_ERROR (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x23A)
   1033 #define ERROR_REMOTE_REQUEST_UNSUPPORTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x23B)
   1034 #define ERROR_NOT_AN_INSTALLED_OEM_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x23C)
   1035 #define ERROR_INF_IN_USE_BY_DEVICES (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x23D)
   1036 #define ERROR_DI_FUNCTION_OBSOLETE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x23E)
   1037 #define ERROR_NO_AUTHENTICODE_CATALOG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x23F)
   1038 #define ERROR_AUTHENTICODE_DISALLOWED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x240)
   1039 #define ERROR_AUTHENTICODE_TRUSTED_PUBLISHER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x241)
   1040 #define ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x242)
   1041 #define ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x243)
   1042 #define ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x244)
   1043 #define ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x245)
   1044 #define ERROR_UNRECOVERABLE_STACK_OVERFLOW (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x300)
   1045 #define EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW ERROR_UNRECOVERABLE_STACK_OVERFLOW
   1046 #define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
   1047 #define ERROR_INTERFACE_DEVICE_ACTIVE ERROR_DEVICE_INTERFACE_ACTIVE
   1048 #define ERROR_INTERFACE_DEVICE_REMOVED ERROR_DEVICE_INTERFACE_REMOVED
   1049 #define ERROR_NO_SUCH_INTERFACE_DEVICE ERROR_NO_SUCH_DEVICE_INTERFACE
   1050 #define ERROR_NOT_INSTALLED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x1000)
   1051 
   1052   WINSETUPAPI WINBOOL WINAPI SetupGetInfInformationA(LPCVOID InfSpec,DWORD SearchControl,PSP_INF_INFORMATION ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1053   WINSETUPAPI WINBOOL WINAPI SetupGetInfInformationW(LPCVOID InfSpec,DWORD SearchControl,PSP_INF_INFORMATION ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1054 
   1055 #define INFINFO_INF_SPEC_IS_HINF 1
   1056 #define INFINFO_INF_NAME_IS_ABSOLUTE 2
   1057 #define INFINFO_DEFAULT_SEARCH 3
   1058 #define INFINFO_REVERSE_DEFAULT_SEARCH 4
   1059 #define INFINFO_INF_PATH_LIST_SEARCH 5
   1060 
   1061 #define SetupGetInfInformation __MINGW_NAME_AW(SetupGetInfInformation)
   1062 #define SetupQueryInfFileInformation __MINGW_NAME_AW(SetupQueryInfFileInformation)
   1063 #define SetupQueryInfOriginalFileInformation __MINGW_NAME_AW(SetupQueryInfOriginalFileInformation)
   1064 #define SetupQueryInfVersionInformation __MINGW_NAME_AW(SetupQueryInfVersionInformation)
   1065 #define SetupGetInfFileList __MINGW_NAME_AW(SetupGetInfFileList)
   1066 #define SetupOpenInfFile __MINGW_NAME_AW(SetupOpenInfFile)
   1067 #define SetupOpenAppendInfFile __MINGW_NAME_AW(SetupOpenAppendInfFile)
   1068 #define SetupFindFirstLine __MINGW_NAME_AW(SetupFindFirstLine)
   1069 #define SetupFindNextMatchLine __MINGW_NAME_AW(SetupFindNextMatchLine)
   1070 #define SetupGetLineByIndex __MINGW_NAME_AW(SetupGetLineByIndex)
   1071 #define SetupGetLineCount __MINGW_NAME_AW(SetupGetLineCount)
   1072 #define SetupGetLineText __MINGW_NAME_AW(SetupGetLineText)
   1073 #define SetupGetStringField __MINGW_NAME_AW(SetupGetStringField)
   1074 #define SetupGetMultiSzField __MINGW_NAME_AW(SetupGetMultiSzField)
   1075 #define SetupGetFileCompressionInfo __MINGW_NAME_AW(SetupGetFileCompressionInfo)
   1076 #define SetupGetFileCompressionInfoEx __MINGW_NAME_AW(SetupGetFileCompressionInfoEx)
   1077 #define SetupDecompressOrCopyFile __MINGW_NAME_AW(SetupDecompressOrCopyFile)
   1078 #define SetupGetSourceFileLocation __MINGW_NAME_AW(SetupGetSourceFileLocation)
   1079 #define SetupGetSourceFileSize __MINGW_NAME_AW(SetupGetSourceFileSize)
   1080 #define SetupGetTargetPath __MINGW_NAME_AW(SetupGetTargetPath)
   1081 #define SetupSetSourceList __MINGW_NAME_AW(SetupSetSourceList)
   1082 #define SetupAddToSourceList __MINGW_NAME_AW(SetupAddToSourceList)
   1083 #define SetupRemoveFromSourceList __MINGW_NAME_AW(SetupRemoveFromSourceList)
   1084 #define SetupQuerySourceList __MINGW_NAME_AW(SetupQuerySourceList)
   1085 #define SetupFreeSourceList __MINGW_NAME_AW(SetupFreeSourceList)
   1086 #define SetupPromptForDisk __MINGW_NAME_AW(SetupPromptForDisk)
   1087 #define SetupCopyError __MINGW_NAME_AW(SetupCopyError)
   1088 #define SetupRenameError __MINGW_NAME_AW(SetupRenameError)
   1089 #define SetupDeleteError __MINGW_NAME_AW(SetupDeleteError)
   1090 #define SetupBackupError __MINGW_NAME_AW(SetupBackupError)
   1091 
   1092 #define SRCLIST_TEMPORARY 0x00000001
   1093 #define SRCLIST_NOBROWSE 0x00000002
   1094 #define SRCLIST_SYSTEM 0x00000010
   1095 #define SRCLIST_USER 0x00000020
   1096 #define SRCLIST_SYSIFADMIN 0x00000040
   1097 #define SRCLIST_SUBDIRS 0x00000100
   1098 #define SRCLIST_APPEND 0x00000200
   1099 #define SRCLIST_NOSTRIPPLATFORM 0x00000400
   1100 
   1101 #define FILE_COMPRESSION_NONE 0
   1102 #define FILE_COMPRESSION_WINLZA 1
   1103 #define FILE_COMPRESSION_MSZIP 2
   1104 #define FILE_COMPRESSION_NTCAB 3
   1105 
   1106   WINSETUPAPI WINBOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1107   WINSETUPAPI WINBOOL WINAPI SetupQueryInfFileInformationW(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1108   WINSETUPAPI WINBOOL WINAPI SetupQueryInfOriginalFileInformationA(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSP_ORIGINAL_FILE_INFO_A OriginalFileInfo);
   1109   WINSETUPAPI WINBOOL WINAPI SetupQueryInfOriginalFileInformationW(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSP_ORIGINAL_FILE_INFO_W OriginalFileInfo);
   1110   WINSETUPAPI WINBOOL WINAPI SetupQueryInfVersionInformationA(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PCSTR Key,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1111   WINSETUPAPI WINBOOL WINAPI SetupQueryInfVersionInformationW(PSP_INF_INFORMATION InfInformation,UINT InfIndex,PCWSTR Key,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1112   WINSETUPAPI WINBOOL WINAPI SetupGetInfFileListA(PCSTR DirectoryPath,DWORD InfStyle,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1113   WINSETUPAPI WINBOOL WINAPI SetupGetInfFileListW(PCWSTR DirectoryPath,DWORD InfStyle,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1114   WINSETUPAPI HINF WINAPI SetupOpenInfFileW(PCWSTR FileName,PCWSTR InfClass,DWORD InfStyle,PUINT ErrorLine);
   1115   WINSETUPAPI HINF WINAPI SetupOpenInfFileA(PCSTR FileName,PCSTR InfClass,DWORD InfStyle,PUINT ErrorLine);
   1116   WINSETUPAPI HINF WINAPI SetupOpenMasterInf(VOID);
   1117   WINSETUPAPI WINBOOL WINAPI SetupOpenAppendInfFileW(PCWSTR FileName,HINF InfHandle,PUINT ErrorLine);
   1118   WINSETUPAPI WINBOOL WINAPI SetupOpenAppendInfFileA(PCSTR FileName,HINF InfHandle,PUINT ErrorLine);
   1119   WINSETUPAPI VOID WINAPI SetupCloseInfFile(HINF InfHandle);
   1120   WINSETUPAPI WINBOOL WINAPI SetupFindFirstLineA(HINF InfHandle,PCSTR Section,PCSTR Key,PINFCONTEXT Context);
   1121   WINSETUPAPI WINBOOL WINAPI SetupFindFirstLineW(HINF InfHandle,PCWSTR Section,PCWSTR Key,PINFCONTEXT Context);
   1122   WINSETUPAPI WINBOOL WINAPI SetupFindNextLine(PINFCONTEXT ContextIn,PINFCONTEXT ContextOut);
   1123   WINSETUPAPI WINBOOL WINAPI SetupFindNextMatchLineA(PINFCONTEXT ContextIn,PCSTR Key,PINFCONTEXT ContextOut);
   1124   WINSETUPAPI WINBOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT ContextIn,PCWSTR Key,PINFCONTEXT ContextOut);
   1125   WINSETUPAPI WINBOOL WINAPI SetupGetLineByIndexA(HINF InfHandle,PCSTR Section,DWORD Index,PINFCONTEXT Context);
   1126   WINSETUPAPI WINBOOL WINAPI SetupGetLineByIndexW(HINF InfHandle,PCWSTR Section,DWORD Index,PINFCONTEXT Context);
   1127   WINSETUPAPI LONG WINAPI SetupGetLineCountA(HINF InfHandle,PCSTR Section);
   1128   WINSETUPAPI LONG WINAPI SetupGetLineCountW(HINF InfHandle,PCWSTR Section);
   1129   WINSETUPAPI WINBOOL WINAPI SetupGetLineTextA(PINFCONTEXT Context,HINF InfHandle,PCSTR Section,PCSTR Key,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1130   WINSETUPAPI WINBOOL WINAPI SetupGetLineTextW(PINFCONTEXT Context,HINF InfHandle,PCWSTR Section,PCWSTR Key,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1131   WINSETUPAPI DWORD WINAPI SetupGetFieldCount(PINFCONTEXT Context);
   1132   WINSETUPAPI WINBOOL WINAPI SetupGetStringFieldA(PINFCONTEXT Context,DWORD FieldIndex,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1133   WINSETUPAPI WINBOOL WINAPI SetupGetStringFieldW(PINFCONTEXT Context,DWORD FieldIndex,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1134   WINSETUPAPI WINBOOL WINAPI SetupGetIntField(PINFCONTEXT Context,DWORD FieldIndex,PINT IntegerValue);
   1135   WINSETUPAPI WINBOOL WINAPI SetupGetMultiSzFieldA(PINFCONTEXT Context,DWORD FieldIndex,PSTR ReturnBuffer,DWORD ReturnBufferSize,LPDWORD RequiredSize);
   1136   WINSETUPAPI WINBOOL WINAPI SetupGetMultiSzFieldW(PINFCONTEXT Context,DWORD FieldIndex,PWSTR ReturnBuffer,DWORD ReturnBufferSize,LPDWORD RequiredSize);
   1137   WINSETUPAPI WINBOOL WINAPI SetupGetBinaryField(PINFCONTEXT Context,DWORD FieldIndex,PBYTE ReturnBuffer,DWORD ReturnBufferSize,LPDWORD RequiredSize);
   1138   WINSETUPAPI DWORD WINAPI SetupGetFileCompressionInfoA(PCSTR SourceFileName,PSTR *ActualSourceFileName,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
   1139   WINSETUPAPI DWORD WINAPI SetupGetFileCompressionInfoW(PCWSTR SourceFileName,PWSTR *ActualSourceFileName,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
   1140   WINSETUPAPI WINBOOL WINAPI SetupGetFileCompressionInfoExA(PCSTR SourceFileName,PSTR ActualSourceFileNameBuffer,DWORD ActualSourceFileNameBufferLen,PDWORD RequiredBufferLen,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
   1141   WINSETUPAPI WINBOOL WINAPI SetupGetFileCompressionInfoExW(PCWSTR SourceFileName,PWSTR ActualSourceFileNameBuffer,DWORD ActualSourceFileNameBufferLen,PDWORD RequiredBufferLen,PDWORD SourceFileSize,PDWORD TargetFileSize,PUINT CompressionType);
   1142   WINSETUPAPI DWORD WINAPI SetupDecompressOrCopyFileA(PCSTR SourceFileName,PCSTR TargetFileName,PUINT CompressionType);
   1143   WINSETUPAPI DWORD WINAPI SetupDecompressOrCopyFileW(PCWSTR SourceFileName,PCWSTR TargetFileName,PUINT CompressionType);
   1144   WINSETUPAPI WINBOOL WINAPI SetupGetSourceFileLocationA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR FileName,PUINT SourceId,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1145   WINSETUPAPI WINBOOL WINAPI SetupGetSourceFileLocationW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR FileName,PUINT SourceId,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1146   WINSETUPAPI WINBOOL WINAPI SetupGetSourceFileSizeA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR FileName,PCSTR Section,PDWORD FileSize,UINT RoundingFactor);
   1147   WINSETUPAPI WINBOOL WINAPI SetupGetSourceFileSizeW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR FileName,PCWSTR Section,PDWORD FileSize,UINT RoundingFactor);
   1148   WINSETUPAPI WINBOOL WINAPI SetupGetTargetPathA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR Section,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1149   WINSETUPAPI WINBOOL WINAPI SetupGetTargetPathW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR Section,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1150   WINSETUPAPI WINBOOL WINAPI SetupSetSourceListA(DWORD Flags,PCSTR *SourceList,UINT SourceCount);
   1151   WINSETUPAPI WINBOOL WINAPI SetupSetSourceListW(DWORD Flags,PCWSTR *SourceList,UINT SourceCount);
   1152   WINSETUPAPI WINBOOL WINAPI SetupCancelTemporarySourceList(VOID);
   1153   WINSETUPAPI WINBOOL WINAPI SetupAddToSourceListA(DWORD Flags,PCSTR Source);
   1154   WINSETUPAPI WINBOOL WINAPI SetupAddToSourceListW(DWORD Flags,PCWSTR Source);
   1155   WINSETUPAPI WINBOOL WINAPI SetupRemoveFromSourceListA(DWORD Flags,PCSTR Source);
   1156   WINSETUPAPI WINBOOL WINAPI SetupRemoveFromSourceListW(DWORD Flags,PCWSTR Source);
   1157   WINSETUPAPI WINBOOL WINAPI SetupQuerySourceListA(DWORD Flags,PCSTR **List,PUINT Count);
   1158   WINSETUPAPI WINBOOL WINAPI SetupQuerySourceListW(DWORD Flags,PCWSTR **List,PUINT Count);
   1159   WINSETUPAPI WINBOOL WINAPI SetupFreeSourceListA(PCSTR **List,UINT Count);
   1160   WINSETUPAPI WINBOOL WINAPI SetupFreeSourceListW(PCWSTR **List,UINT Count);
   1161   WINSETUPAPI UINT WINAPI SetupPromptForDiskA(HWND hwndParent,PCSTR DialogTitle,PCSTR DiskName,PCSTR PathToSource,PCSTR FileSought,PCSTR TagFile,DWORD DiskPromptStyle,PSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
   1162   WINSETUPAPI UINT WINAPI SetupPromptForDiskW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR DiskName,PCWSTR PathToSource,PCWSTR FileSought,PCWSTR TagFile,DWORD DiskPromptStyle,PWSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
   1163   WINSETUPAPI UINT WINAPI SetupCopyErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR DiskName,PCSTR PathToSource,PCSTR SourceFile,PCSTR TargetPathFile,UINT Win32ErrorCode,DWORD Style,PSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
   1164   WINSETUPAPI UINT WINAPI SetupCopyErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR DiskName,PCWSTR PathToSource,PCWSTR SourceFile,PCWSTR TargetPathFile,UINT Win32ErrorCode,DWORD Style,PWSTR PathBuffer,DWORD PathBufferSize,PDWORD PathRequiredSize);
   1165   WINSETUPAPI UINT WINAPI SetupRenameErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR SourceFile,PCSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
   1166   WINSETUPAPI UINT WINAPI SetupRenameErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR SourceFile,PCWSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
   1167   WINSETUPAPI UINT WINAPI SetupDeleteErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR File,UINT Win32ErrorCode,DWORD Style);
   1168   WINSETUPAPI UINT WINAPI SetupDeleteErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR File,UINT Win32ErrorCode,DWORD Style);
   1169   WINSETUPAPI UINT WINAPI SetupBackupErrorA(HWND hwndParent,PCSTR DialogTitle,PCSTR SourceFile,PCSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
   1170   WINSETUPAPI UINT WINAPI SetupBackupErrorW(HWND hwndParent,PCWSTR DialogTitle,PCWSTR SourceFile,PCWSTR TargetFile,UINT Win32ErrorCode,DWORD Style);
   1171 
   1172 #define IDF_NOBROWSE 0x00000001
   1173 #define IDF_NOSKIP 0x00000002
   1174 #define IDF_NODETAILS 0x00000004
   1175 #define IDF_NOCOMPRESSED 0x00000008
   1176 #define IDF_CHECKFIRST 0x00000100
   1177 #define IDF_NOBEEP 0x00000200
   1178 #define IDF_NOFOREGROUND 0x00000400
   1179 #define IDF_WARNIFSKIP 0x00000800
   1180 
   1181 #define IDF_NOREMOVABLEMEDIAPROMPT 0x00001000
   1182 #define IDF_USEDISKNAMEASPROMPT 0x00002000
   1183 #define IDF_OEMDISK 0x80000000
   1184 
   1185 #define DPROMPT_SUCCESS 0
   1186 #define DPROMPT_CANCEL 1
   1187 #define DPROMPT_SKIPFILE 2
   1188 #define DPROMPT_BUFFERTOOSMALL 3
   1189 #define DPROMPT_OUTOFMEMORY 4
   1190 
   1191 #define SETDIRID_NOT_FULL_PATH 0x00000001
   1192 
   1193 #define SRCINFO_PATH 1
   1194 #define SRCINFO_TAGFILE 2
   1195 #define SRCINFO_DESCRIPTION 3
   1196 #define SRCINFO_FLAGS 4
   1197 #define SRCINFO_TAGFILE2 5
   1198 
   1199 #define SRC_FLAGS_CABFILE (0x0010)
   1200 
   1201 #define SetupSetDirectoryId __MINGW_NAME_AW(SetupSetDirectoryId)
   1202 #define SetupSetDirectoryIdEx __MINGW_NAME_AW(SetupSetDirectoryIdEx)
   1203 #define SetupGetSourceInfo __MINGW_NAME_AW(SetupGetSourceInfo)
   1204 #define SetupInstallFile __MINGW_NAME_AW(SetupInstallFile)
   1205 #define SetupInstallFileEx __MINGW_NAME_AW(SetupInstallFileEx)
   1206 
   1207   WINSETUPAPI WINBOOL WINAPI SetupSetDirectoryIdA(HINF InfHandle,DWORD Id,PCSTR Directory);
   1208   WINSETUPAPI WINBOOL WINAPI SetupSetDirectoryIdW(HINF InfHandle,DWORD Id,PCWSTR Directory);
   1209   WINSETUPAPI WINBOOL WINAPI SetupSetDirectoryIdExA(HINF InfHandle,DWORD Id,PCSTR Directory,DWORD Flags,DWORD Reserved1,PVOID Reserved2);
   1210   WINSETUPAPI WINBOOL WINAPI SetupSetDirectoryIdExW(HINF InfHandle,DWORD Id,PCWSTR Directory,DWORD Flags,DWORD Reserved1,PVOID Reserved2);
   1211   WINSETUPAPI WINBOOL WINAPI SetupGetSourceInfoA(HINF InfHandle,UINT SourceId,UINT InfoDesired,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1212   WINSETUPAPI WINBOOL WINAPI SetupGetSourceInfoW(HINF InfHandle,UINT SourceId,UINT InfoDesired,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1213   WINSETUPAPI WINBOOL WINAPI SetupInstallFileA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR SourceFile,PCSTR SourcePathRoot,PCSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_A CopyMsgHandler,PVOID Context);
   1214   WINSETUPAPI WINBOOL WINAPI SetupInstallFileW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR SourceFile,PCWSTR SourcePathRoot,PCWSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_W CopyMsgHandler,PVOID Context);
   1215   WINSETUPAPI WINBOOL WINAPI SetupInstallFileExA(HINF InfHandle,PINFCONTEXT InfContext,PCSTR SourceFile,PCSTR SourcePathRoot,PCSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_A CopyMsgHandler,PVOID Context,PBOOL FileWasInUse);
   1216   WINSETUPAPI WINBOOL WINAPI SetupInstallFileExW(HINF InfHandle,PINFCONTEXT InfContext,PCWSTR SourceFile,PCWSTR SourcePathRoot,PCWSTR DestinationName,DWORD CopyStyle,PSP_FILE_CALLBACK_W CopyMsgHandler,PVOID Context,PBOOL FileWasInUse);
   1217 
   1218 #define SP_COPY_DELETESOURCE 0x0000001
   1219 #define SP_COPY_REPLACEONLY 0x0000002
   1220 #define SP_COPY_NEWER 0x0000004
   1221 #define SP_COPY_NEWER_OR_SAME SP_COPY_NEWER
   1222 #define SP_COPY_NOOVERWRITE 0x0000008
   1223 #define SP_COPY_NODECOMP 0x0000010
   1224 #define SP_COPY_LANGUAGEAWARE 0x0000020
   1225 #define SP_COPY_SOURCE_ABSOLUTE 0x0000040
   1226 #define SP_COPY_SOURCEPATH_ABSOLUTE 0x0000080
   1227 #define SP_COPY_IN_USE_NEEDS_REBOOT 0x0000100
   1228 #define SP_COPY_FORCE_IN_USE 0x0000200
   1229 #define SP_COPY_NOSKIP 0x0000400
   1230 #define SP_FLAG_CABINETCONTINUATION 0x0000800
   1231 #define SP_COPY_FORCE_NOOVERWRITE 0x0001000
   1232 #define SP_COPY_FORCE_NEWER 0x0002000
   1233 #define SP_COPY_WARNIFSKIP 0x0004000
   1234 #define SP_COPY_NOBROWSE 0x0008000
   1235 #define SP_COPY_NEWER_ONLY 0x0010000
   1236 #define SP_COPY_SOURCE_SIS_MASTER 0x0020000
   1237 #define SP_COPY_OEMINF_CATALOG_ONLY 0x0040000
   1238 #define SP_COPY_REPLACE_BOOT_FILE 0x0080000
   1239 #define SP_COPY_NOPRUNE 0x0100000
   1240 #define SP_COPY_OEM_F6_INF 0x0200000
   1241 
   1242 #define SP_BACKUP_BACKUPPASS 0x00000001
   1243 #define SP_BACKUP_DEMANDPASS 0x00000002
   1244 #define SP_BACKUP_SPECIAL 0x00000004
   1245 #define SP_BACKUP_BOOTFILE 0x00000008
   1246 
   1247 #define SetupSetFileQueueAlternatePlatform __MINGW_NAME_AW(SetupSetFileQueueAlternatePlatform)
   1248 #define SetupQueueDeleteSection __MINGW_NAME_AW(SetupQueueDeleteSection)
   1249 #define SetupQueueRename __MINGW_NAME_AW(SetupQueueRename)
   1250 #define SetupQueueRenameSection __MINGW_NAME_AW(SetupQueueRenameSection)
   1251 #define SetupCommitFileQueue __MINGW_NAME_AW(SetupCommitFileQueue)
   1252 #define SetupScanFileQueue __MINGW_NAME_AW(SetupScanFileQueue)
   1253 #define SetupSetPlatformPathOverride __MINGW_NAME_AW(SetupSetPlatformPathOverride)
   1254 #define SetupQueueCopy __MINGW_NAME_AW(SetupQueueCopy)
   1255 #define SetupQueueCopyIndirect __MINGW_NAME_AW(SetupQueueCopyIndirect)
   1256 #define SetupQueueDefaultCopy __MINGW_NAME_AW(SetupQueueDefaultCopy)
   1257 #define SetupQueueCopySection __MINGW_NAME_AW(SetupQueueCopySection)
   1258 #define SetupQueueDelete __MINGW_NAME_AW(SetupQueueDelete)
   1259 
   1260   WINSETUPAPI HSPFILEQ WINAPI SetupOpenFileQueue(VOID);
   1261   WINSETUPAPI WINBOOL WINAPI SetupCloseFileQueue(HSPFILEQ QueueHandle);
   1262   WINSETUPAPI WINBOOL WINAPI SetupSetFileQueueAlternatePlatformA(HSPFILEQ QueueHandle,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PCSTR AlternateDefaultCatalogFile);
   1263   WINSETUPAPI WINBOOL WINAPI SetupSetFileQueueAlternatePlatformW(HSPFILEQ QueueHandle,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PCWSTR AlternateDefaultCatalogFile);
   1264   WINSETUPAPI WINBOOL WINAPI SetupSetPlatformPathOverrideA(PCSTR Override);
   1265   WINSETUPAPI WINBOOL WINAPI SetupSetPlatformPathOverrideW(PCWSTR Override);
   1266   WINSETUPAPI WINBOOL WINAPI SetupQueueCopyA(HSPFILEQ QueueHandle,PCSTR SourceRootPath,PCSTR SourcePath,PCSTR SourceFilename,PCSTR SourceDescription,PCSTR SourceTagfile,PCSTR TargetDirectory,PCSTR TargetFilename,DWORD CopyStyle);
   1267   WINSETUPAPI WINBOOL WINAPI SetupQueueCopyW(HSPFILEQ QueueHandle,PCWSTR SourceRootPath,PCWSTR SourcePath,PCWSTR SourceFilename,PCWSTR SourceDescription,PCWSTR SourceTagfile,PCWSTR TargetDirectory,PCWSTR TargetFilename,DWORD CopyStyle);
   1268   WINSETUPAPI WINBOOL WINAPI SetupQueueCopyIndirectA(PSP_FILE_COPY_PARAMS_A CopyParams);
   1269   WINSETUPAPI WINBOOL WINAPI SetupQueueCopyIndirectW(PSP_FILE_COPY_PARAMS_W CopyParams);
   1270   WINSETUPAPI WINBOOL WINAPI SetupQueueDefaultCopyA(HSPFILEQ QueueHandle,HINF InfHandle,PCSTR SourceRootPath,PCSTR SourceFilename,PCSTR TargetFilename,DWORD CopyStyle);
   1271   WINSETUPAPI WINBOOL WINAPI SetupQueueDefaultCopyW(HSPFILEQ QueueHandle,HINF InfHandle,PCWSTR SourceRootPath,PCWSTR SourceFilename,PCWSTR TargetFilename,DWORD CopyStyle);
   1272   WINSETUPAPI WINBOOL WINAPI SetupQueueCopySectionA(HSPFILEQ QueueHandle,PCSTR SourceRootPath,HINF InfHandle,HINF ListInfHandle,PCSTR Section,DWORD CopyStyle);
   1273   WINSETUPAPI WINBOOL WINAPI SetupQueueCopySectionW(HSPFILEQ QueueHandle,PCWSTR SourceRootPath,HINF InfHandle,HINF ListInfHandle,PCWSTR Section,DWORD CopyStyle);
   1274   WINSETUPAPI WINBOOL WINAPI SetupQueueDeleteA(HSPFILEQ QueueHandle,PCSTR PathPart1,PCSTR PathPart2);
   1275   WINSETUPAPI WINBOOL WINAPI SetupQueueDeleteW(HSPFILEQ QueueHandle,PCWSTR PathPart1,PCWSTR PathPart2);
   1276   WINSETUPAPI WINBOOL WINAPI SetupQueueDeleteSectionA(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCSTR Section);
   1277   WINSETUPAPI WINBOOL WINAPI SetupQueueDeleteSectionW(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCWSTR Section);
   1278   WINSETUPAPI WINBOOL WINAPI SetupQueueRenameA(HSPFILEQ QueueHandle,PCSTR SourcePath,PCSTR SourceFilename,PCSTR TargetPath,PCSTR TargetFilename);
   1279   WINSETUPAPI WINBOOL WINAPI SetupQueueRenameW(HSPFILEQ QueueHandle,PCWSTR SourcePath,PCWSTR SourceFilename,PCWSTR TargetPath,PCWSTR TargetFilename);
   1280   WINSETUPAPI WINBOOL WINAPI SetupQueueRenameSectionA(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCSTR Section);
   1281   WINSETUPAPI WINBOOL WINAPI SetupQueueRenameSectionW(HSPFILEQ QueueHandle,HINF InfHandle,HINF ListInfHandle,PCWSTR Section);
   1282   WINSETUPAPI WINBOOL WINAPI SetupCommitFileQueueA(HWND Owner,HSPFILEQ QueueHandle,PSP_FILE_CALLBACK_A MsgHandler,PVOID Context);
   1283   WINSETUPAPI WINBOOL WINAPI SetupCommitFileQueueW(HWND Owner,HSPFILEQ QueueHandle,PSP_FILE_CALLBACK_W MsgHandler,PVOID Context);
   1284   WINSETUPAPI WINBOOL WINAPI SetupScanFileQueueA(HSPFILEQ FileQueue,DWORD Flags,HWND Window,PSP_FILE_CALLBACK_A CallbackRoutine,PVOID CallbackContext,PDWORD Result);
   1285   WINSETUPAPI WINBOOL WINAPI SetupScanFileQueueW(HSPFILEQ FileQueue,DWORD Flags,HWND Window,PSP_FILE_CALLBACK_W CallbackRoutine,PVOID CallbackContext,PDWORD Result);
   1286 
   1287 #define SPQ_SCAN_FILE_PRESENCE 0x00000001
   1288 #define SPQ_SCAN_FILE_VALIDITY 0x00000002
   1289 #define SPQ_SCAN_USE_CALLBACK 0x00000004
   1290 #define SPQ_SCAN_USE_CALLBACKEX 0x00000008
   1291 #define SPQ_SCAN_INFORM_USER 0x00000010
   1292 #define SPQ_SCAN_PRUNE_COPY_QUEUE 0x00000020
   1293 
   1294 #define SPQ_SCAN_USE_CALLBACK_SIGNERINFO 0x00000040
   1295 #define SPQ_SCAN_PRUNE_DELREN 0x00000080
   1296 
   1297 #define SPQ_DELAYED_COPY 0x00000001
   1298 
   1299   WINSETUPAPI WINBOOL WINAPI SetupGetFileQueueCount(HSPFILEQ FileQueue,UINT SubQueueFileOp,PUINT NumOperations);
   1300   WINSETUPAPI WINBOOL WINAPI SetupGetFileQueueFlags(HSPFILEQ FileQueue,PDWORD Flags);
   1301   WINSETUPAPI WINBOOL WINAPI SetupSetFileQueueFlags(HSPFILEQ FileQueue,DWORD FlagMask,DWORD Flags);
   1302 
   1303 #define SPQ_FLAG_BACKUP_AWARE 0x00000001
   1304 #define SPQ_FLAG_ABORT_IF_UNSIGNED 0x00000002
   1305 #define SPQ_FLAG_FILES_MODIFIED 0x00000004
   1306 #define SPQ_FLAG_VALID 0x00000007
   1307 
   1308 #define SPOST_NONE 0
   1309 #define SPOST_PATH 1
   1310 #define SPOST_URL 2
   1311 #define SPOST_MAX 3
   1312 
   1313 #define SetupCopyOEMInf __MINGW_NAME_AW(SetupCopyOEMInf)
   1314 
   1315   WINSETUPAPI WINBOOL WINAPI SetupCopyOEMInfA(PCSTR SourceInfFileName,PCSTR OEMSourceMediaLocation,DWORD OEMSourceMediaType,DWORD CopyStyle,PSTR DestinationInfFileName,DWORD DestinationInfFileNameSize,PDWORD RequiredSize,PSTR *DestinationInfFileNameComponent);
   1316   WINSETUPAPI WINBOOL WINAPI SetupCopyOEMInfW(PCWSTR SourceInfFileName,PCWSTR OEMSourceMediaLocation,DWORD OEMSourceMediaType,DWORD CopyStyle,PWSTR DestinationInfFileName,DWORD DestinationInfFileNameSize,PDWORD RequiredSize,PWSTR *DestinationInfFileNameComponent);
   1317 
   1318 #define SUOI_FORCEDELETE 0x00000001
   1319 
   1320 #define SetupUninstallOEMInf __MINGW_NAME_AW(SetupUninstallOEMInf)
   1321 #define SetupCreateDiskSpaceList __MINGW_NAME_AW(SetupCreateDiskSpaceList)
   1322 
   1323   WINSETUPAPI WINBOOL WINAPI SetupUninstallOEMInfA(PCSTR InfFileName,DWORD Flags,PVOID Reserved);
   1324   WINSETUPAPI WINBOOL WINAPI SetupUninstallOEMInfW(PCWSTR InfFileName,DWORD Flags,PVOID Reserved);
   1325   WINSETUPAPI WINBOOL WINAPI SetupUninstallNewlyCopiedInfs(HSPFILEQ FileQueue,DWORD Flags,PVOID Reserved);
   1326   WINSETUPAPI HDSKSPC WINAPI SetupCreateDiskSpaceListA(PVOID Reserved1,DWORD Reserved2,UINT Flags);
   1327   WINSETUPAPI HDSKSPC WINAPI SetupCreateDiskSpaceListW(PVOID Reserved1,DWORD Reserved2,UINT Flags);
   1328 
   1329 #define SPDSL_IGNORE_DISK 0x00000001
   1330 #define SPDSL_DISALLOW_NEGATIVE_ADJUST 0x00000002
   1331 
   1332 #define SetupDuplicateDiskSpaceList __MINGW_NAME_AW(SetupDuplicateDiskSpaceList)
   1333 #define SetupQueryDrivesInDiskSpaceList __MINGW_NAME_AW(SetupQueryDrivesInDiskSpaceList)
   1334 #define SetupQuerySpaceRequiredOnDrive __MINGW_NAME_AW(SetupQuerySpaceRequiredOnDrive)
   1335 #define SetupAdjustDiskSpaceList __MINGW_NAME_AW(SetupAdjustDiskSpaceList)
   1336 #define SetupAddToDiskSpaceList __MINGW_NAME_AW(SetupAddToDiskSpaceList)
   1337 #define SetupAddSectionToDiskSpaceList __MINGW_NAME_AW(SetupAddSectionToDiskSpaceList)
   1338 #define SetupAddInstallSectionToDiskSpaceList __MINGW_NAME_AW(SetupAddInstallSectionToDiskSpaceList)
   1339 #define SetupRemoveFromDiskSpaceList __MINGW_NAME_AW(SetupRemoveFromDiskSpaceList)
   1340 #define SetupRemoveSectionFromDiskSpaceList __MINGW_NAME_AW(SetupRemoveSectionFromDiskSpaceList)
   1341 #define SetupRemoveInstallSectionFromDiskSpaceList __MINGW_NAME_AW(SetupRemoveInstallSectionFromDiskSpaceList)
   1342 #define SetupIterateCabinet __MINGW_NAME_AW(SetupIterateCabinet)
   1343 
   1344   WINSETUPAPI HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace,PVOID Reserved1,DWORD Reserved2,UINT Flags);
   1345   WINSETUPAPI HDSKSPC WINAPI SetupDuplicateDiskSpaceListW(HDSKSPC DiskSpace,PVOID Reserved1,DWORD Reserved2,UINT Flags);
   1346   WINSETUPAPI WINBOOL WINAPI SetupDestroyDiskSpaceList(HDSKSPC DiskSpace);
   1347   WINSETUPAPI WINBOOL WINAPI SetupQueryDrivesInDiskSpaceListA(HDSKSPC DiskSpace,PSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1348   WINSETUPAPI WINBOOL WINAPI SetupQueryDrivesInDiskSpaceListW(HDSKSPC DiskSpace,PWSTR ReturnBuffer,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1349   WINSETUPAPI WINBOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace,PCSTR DriveSpec,LONGLONG *SpaceRequired,PVOID Reserved1,UINT Reserved2);
   1350   WINSETUPAPI WINBOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC DiskSpace,PCWSTR DriveSpec,LONGLONG *SpaceRequired,PVOID Reserved1,UINT Reserved2);
   1351   WINSETUPAPI WINBOOL WINAPI SetupAdjustDiskSpaceListA(HDSKSPC DiskSpace,LPCSTR DriveRoot,LONGLONG Amount,PVOID Reserved1,UINT Reserved2);
   1352   WINSETUPAPI WINBOOL WINAPI SetupAdjustDiskSpaceListW(HDSKSPC DiskSpace,LPCWSTR DriveRoot,LONGLONG Amount,PVOID Reserved1,UINT Reserved2);
   1353   WINSETUPAPI WINBOOL WINAPI SetupAddToDiskSpaceListA(HDSKSPC DiskSpace,PCSTR TargetFilespec,LONGLONG FileSize,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1354   WINSETUPAPI WINBOOL WINAPI SetupAddToDiskSpaceListW(HDSKSPC DiskSpace,PCWSTR TargetFilespec,LONGLONG FileSize,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1355   WINSETUPAPI WINBOOL WINAPI SetupAddSectionToDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1356   WINSETUPAPI WINBOOL WINAPI SetupAddSectionToDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCWSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1357   WINSETUPAPI WINBOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCSTR SectionName,PVOID Reserved1,UINT Reserved2);
   1358   WINSETUPAPI WINBOOL WINAPI SetupAddInstallSectionToDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCWSTR SectionName,PVOID Reserved1,UINT Reserved2);
   1359   WINSETUPAPI WINBOOL WINAPI SetupRemoveFromDiskSpaceListA(HDSKSPC DiskSpace,PCSTR TargetFilespec,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1360   WINSETUPAPI WINBOOL WINAPI SetupRemoveFromDiskSpaceListW(HDSKSPC DiskSpace,PCWSTR TargetFilespec,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1361   WINSETUPAPI WINBOOL WINAPI SetupRemoveSectionFromDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1362   WINSETUPAPI WINBOOL WINAPI SetupRemoveSectionFromDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF ListInfHandle,PCWSTR SectionName,UINT Operation,PVOID Reserved1,UINT Reserved2);
   1363   WINSETUPAPI WINBOOL WINAPI SetupRemoveInstallSectionFromDiskSpaceListA(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCSTR SectionName,PVOID Reserved1,UINT Reserved2);
   1364   WINSETUPAPI WINBOOL WINAPI SetupRemoveInstallSectionFromDiskSpaceListW(HDSKSPC DiskSpace,HINF InfHandle,HINF LayoutInfHandle,PCWSTR SectionName,PVOID Reserved1,UINT Reserved2);
   1365   WINSETUPAPI WINBOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile,DWORD Reserved,PSP_FILE_CALLBACK_A MsgHandler,PVOID Context);
   1366   WINSETUPAPI WINBOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile,DWORD Reserved,PSP_FILE_CALLBACK_W MsgHandler,PVOID Context);
   1367   WINSETUPAPI INT WINAPI SetupPromptReboot(HSPFILEQ FileQueue,HWND Owner,WINBOOL ScanOnly);
   1368 
   1369 #define SPFILEQ_FILE_IN_USE 0x00000001
   1370 #define SPFILEQ_REBOOT_RECOMMENDED 0x00000002
   1371 #define SPFILEQ_REBOOT_IN_PROGRESS 0x00000004
   1372 
   1373 #define SetupDefaultQueueCallback __MINGW_NAME_AW(SetupDefaultQueueCallback)
   1374 
   1375   WINSETUPAPI PVOID WINAPI SetupInitDefaultQueueCallback(HWND OwnerWindow);
   1376   WINSETUPAPI PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND OwnerWindow,HWND AlternateProgressWindow,UINT ProgressMessage,DWORD Reserved1,PVOID Reserved2);
   1377   WINSETUPAPI VOID WINAPI SetupTermDefaultQueueCallback(PVOID Context);
   1378   WINSETUPAPI UINT WINAPI SetupDefaultQueueCallbackA(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
   1379   WINSETUPAPI UINT WINAPI SetupDefaultQueueCallbackW(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
   1380 
   1381 #define FLG_ADDREG_DELREG_BIT (0x00008000)
   1382 #define FLG_ADDREG_BINVALUETYPE (0x00000001)
   1383 #define FLG_ADDREG_NOCLOBBER (0x00000002)
   1384 #define FLG_ADDREG_DELVAL (0x00000004)
   1385 #define FLG_ADDREG_APPEND (0x00000008)
   1386 #define FLG_ADDREG_KEYONLY (0x00000010)
   1387 #define FLG_ADDREG_OVERWRITEONLY (0x00000020)
   1388 #define FLG_ADDREG_64BITKEY (0x00001000)
   1389 #define FLG_ADDREG_KEYONLY_COMMON (0x00002000)
   1390 #define FLG_ADDREG_32BITKEY (0x00004000)
   1391 #define FLG_ADDREG_TYPE_MASK (0xFFFF0000 | FLG_ADDREG_BINVALUETYPE)
   1392 #define FLG_ADDREG_TYPE_SZ (0x00000000)
   1393 #define FLG_ADDREG_TYPE_MULTI_SZ (0x00010000)
   1394 #define FLG_ADDREG_TYPE_EXPAND_SZ (0x00020000)
   1395 #define FLG_ADDREG_TYPE_BINARY (0x00000000 | FLG_ADDREG_BINVALUETYPE)
   1396 #define FLG_ADDREG_TYPE_DWORD (0x00010000 | FLG_ADDREG_BINVALUETYPE)
   1397 #define FLG_ADDREG_TYPE_NONE (0x00020000 | FLG_ADDREG_BINVALUETYPE)
   1398 
   1399 #define FLG_DELREG_VALUE (0x00000000)
   1400 
   1401 #define FLG_DELREG_TYPE_MASK FLG_ADDREG_TYPE_MASK
   1402 #define FLG_DELREG_TYPE_SZ FLG_ADDREG_TYPE_SZ
   1403 #define FLG_DELREG_TYPE_MULTI_SZ FLG_ADDREG_TYPE_MULTI_SZ
   1404 #define FLG_DELREG_TYPE_EXPAND_SZ FLG_ADDREG_TYPE_EXPAND_SZ
   1405 #define FLG_DELREG_TYPE_BINARY FLG_ADDREG_TYPE_BINARY
   1406 #define FLG_DELREG_TYPE_DWORD FLG_ADDREG_TYPE_DWORD
   1407 #define FLG_DELREG_TYPE_NONE FLG_ADDREG_TYPE_NONE
   1408 #define FLG_DELREG_64BITKEY FLG_ADDREG_64BITKEY
   1409 #define FLG_DELREG_KEYONLY_COMMON FLG_ADDREG_KEYONLY_COMMON
   1410 #define FLG_DELREG_32BITKEY FLG_ADDREG_32BITKEY
   1411 
   1412 #define FLG_DELREG_OPERATION_MASK (0x000000FE)
   1413 #define FLG_DELREG_MULTI_SZ_DELSTRING (FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT | 0x00000002)
   1414 
   1415 #define FLG_BITREG_CLEARBITS (0x00000000)
   1416 #define FLG_BITREG_SETBITS (0x00000001)
   1417 
   1418 #define FLG_BITREG_64BITKEY (0x00001000)
   1419 #define FLG_BITREG_32BITKEY (0x00004000)
   1420 #define FLG_INI2REG_64BITKEY (0x00001000)
   1421 #define FLG_INI2REG_32BITKEY (0x00004000)
   1422 #define FLG_REGSVR_DLLREGISTER (0x00000001)
   1423 #define FLG_REGSVR_DLLINSTALL (0x00000002)
   1424 
   1425 #define FLG_PROFITEM_CURRENTUSER (0x00000001)
   1426 #define FLG_PROFITEM_DELETE (0x00000002)
   1427 #define FLG_PROFITEM_GROUP (0x00000004)
   1428 #define FLG_PROFITEM_CSIDL (0x00000008)
   1429 
   1430 #define SetupInstallFromInfSection __MINGW_NAME_AW(SetupInstallFromInfSection)
   1431 
   1432   WINSETUPAPI WINBOOL WINAPI SetupInstallFromInfSectionA(HWND Owner,HINF InfHandle,PCSTR SectionName,UINT Flags,HKEY RelativeKeyRoot,PCSTR SourceRootPath,UINT CopyFlags,PSP_FILE_CALLBACK_A MsgHandler,PVOID Context,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1433   WINSETUPAPI WINBOOL WINAPI SetupInstallFromInfSectionW(HWND Owner,HINF InfHandle,PCWSTR SectionName,UINT Flags,HKEY RelativeKeyRoot,PCWSTR SourceRootPath,UINT CopyFlags,PSP_FILE_CALLBACK_W MsgHandler,PVOID Context,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1434 
   1435 #define SPINST_LOGCONFIG 0x00000001
   1436 #define SPINST_INIFILES 0x00000002
   1437 #define SPINST_REGISTRY 0x00000004
   1438 #define SPINST_INI2REG 0x00000008
   1439 #define SPINST_FILES 0x00000010
   1440 #define SPINST_BITREG 0x00000020
   1441 #define SPINST_REGSVR 0x00000040
   1442 #define SPINST_UNREGSVR 0x00000080
   1443 #define SPINST_PROFILEITEMS 0x00000100
   1444 #define SPINST_COPYINF 0x00000200
   1445 #define SPINST_ALL 0x000003ff
   1446 #define SPINST_SINGLESECTION 0x00010000
   1447 #define SPINST_LOGCONFIG_IS_FORCED 0x00020000
   1448 #define SPINST_LOGCONFIGS_ARE_OVERRIDES 0x00040000
   1449 #define SPINST_REGISTERCALLBACKAWARE 0x00080000
   1450 
   1451 #define SetupInstallFilesFromInfSection __MINGW_NAME_AW(SetupInstallFilesFromInfSection)
   1452 
   1453   WINSETUPAPI WINBOOL WINAPI SetupInstallFilesFromInfSectionA(HINF InfHandle,HINF LayoutInfHandle,HSPFILEQ FileQueue,PCSTR SectionName,PCSTR SourceRootPath,UINT CopyFlags);
   1454   WINSETUPAPI WINBOOL WINAPI SetupInstallFilesFromInfSectionW(HINF InfHandle,HINF LayoutInfHandle,HSPFILEQ FileQueue,PCWSTR SectionName,PCWSTR SourceRootPath,UINT CopyFlags);
   1455 
   1456 #define SPSVCINST_TAGTOFRONT (0x00000001)
   1457 #define SPSVCINST_ASSOCSERVICE (0x00000002)
   1458 #define SPSVCINST_DELETEEVENTLOGENTRY (0x00000004)
   1459 #define SPSVCINST_NOCLOBBER_DISPLAYNAME (0x00000008)
   1460 #define SPSVCINST_NOCLOBBER_STARTTYPE (0x00000010)
   1461 #define SPSVCINST_NOCLOBBER_ERRORCONTROL (0x00000020)
   1462 #define SPSVCINST_NOCLOBBER_LOADORDERGROUP (0x00000040)
   1463 #define SPSVCINST_NOCLOBBER_DEPENDENCIES (0x00000080)
   1464 #define SPSVCINST_NOCLOBBER_DESCRIPTION (0x00000100)
   1465 #define SPSVCINST_STOPSERVICE (0x00000200)
   1466 #define SPSVCINST_CLOBBER_SECURITY (0x00000400)
   1467 
   1468 #define SPFILELOG_SYSTEMLOG 0x00000001
   1469 #define SPFILELOG_FORCENEW 0x00000002
   1470 #define SPFILELOG_QUERYONLY 0x00000004
   1471 
   1472 #define SPFILELOG_OEMFILE 0x00000001
   1473 
   1474   typedef PVOID HSPFILELOG;
   1475 
   1476 #define SetupInstallServicesFromInfSection __MINGW_NAME_AW(SetupInstallServicesFromInfSection)
   1477 #define SetupInstallServicesFromInfSectionEx __MINGW_NAME_AW(SetupInstallServicesFromInfSectionEx)
   1478 #define InstallHinfSection __MINGW_NAME_AW(InstallHinfSection)
   1479 #define SetupInitializeFileLog __MINGW_NAME_AW(SetupInitializeFileLog)
   1480 #define SetupLogFile __MINGW_NAME_AW(SetupLogFile)
   1481 #define SetupRemoveFileLogEntry __MINGW_NAME_AW(SetupRemoveFileLogEntry)
   1482 
   1483   WINSETUPAPI WINBOOL WINAPI SetupInstallServicesFromInfSectionA(HINF InfHandle,PCSTR SectionName,DWORD Flags);
   1484   WINSETUPAPI WINBOOL WINAPI SetupInstallServicesFromInfSectionW(HINF InfHandle,PCWSTR SectionName,DWORD Flags);
   1485   WINSETUPAPI WINBOOL WINAPI SetupInstallServicesFromInfSectionExA(HINF InfHandle,PCSTR SectionName,DWORD Flags,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PVOID Reserved1,PVOID Reserved2);
   1486   WINSETUPAPI WINBOOL WINAPI SetupInstallServicesFromInfSectionExW(HINF InfHandle,PCWSTR SectionName,DWORD Flags,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PVOID Reserved1,PVOID Reserved2);
   1487   VOID WINAPI InstallHinfSectionA(HWND Window,HINSTANCE ModuleHandle,PCSTR CommandLine,INT ShowCommand);
   1488   VOID WINAPI InstallHinfSectionW(HWND Window,HINSTANCE ModuleHandle,PCWSTR CommandLine,INT ShowCommand);
   1489   WINSETUPAPI HSPFILELOG WINAPI SetupInitializeFileLogA(PCSTR LogFileName,DWORD Flags);
   1490   WINSETUPAPI HSPFILELOG WINAPI SetupInitializeFileLogW(PCWSTR LogFileName,DWORD Flags);
   1491   WINSETUPAPI WINBOOL WINAPI SetupTerminateFileLog(HSPFILELOG FileLogHandle);
   1492   WINSETUPAPI WINBOOL WINAPI SetupLogFileA(HSPFILELOG FileLogHandle,PCSTR LogSectionName,PCSTR SourceFilename,PCSTR TargetFilename,DWORD Checksum,PCSTR DiskTagfile,PCSTR DiskDescription,PCSTR OtherInfo,DWORD Flags);
   1493   WINSETUPAPI WINBOOL WINAPI SetupLogFileW(HSPFILELOG FileLogHandle,PCWSTR LogSectionName,PCWSTR SourceFilename,PCWSTR TargetFilename,DWORD Checksum,PCWSTR DiskTagfile,PCWSTR DiskDescription,PCWSTR OtherInfo,DWORD Flags);
   1494   WINSETUPAPI WINBOOL WINAPI SetupRemoveFileLogEntryA(HSPFILELOG FileLogHandle,PCSTR LogSectionName,PCSTR TargetFilename);
   1495   WINSETUPAPI WINBOOL WINAPI SetupRemoveFileLogEntryW(HSPFILELOG FileLogHandle,PCWSTR LogSectionName,PCWSTR TargetFilename);
   1496 
   1497   typedef enum {
   1498     SetupFileLogSourceFilename,SetupFileLogChecksum,SetupFileLogDiskTagfile,SetupFileLogDiskDescription,SetupFileLogOtherInfo,SetupFileLogMax
   1499   } SetupFileLogInfo;
   1500 
   1501 #define SetupQueryFileLog __MINGW_NAME_AW(SetupQueryFileLog)
   1502 
   1503   WINSETUPAPI WINBOOL WINAPI SetupQueryFileLogA(HSPFILELOG FileLogHandle,PCSTR LogSectionName,PCSTR TargetFilename,SetupFileLogInfo DesiredInfo,PSTR DataOut,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1504   WINSETUPAPI WINBOOL WINAPI SetupQueryFileLogW(HSPFILELOG FileLogHandle,PCWSTR LogSectionName,PCWSTR TargetFilename,SetupFileLogInfo DesiredInfo,PWSTR DataOut,DWORD ReturnBufferSize,PDWORD RequiredSize);
   1505 
   1506 #define LogSeverity DWORD
   1507 #define LogSevInformation 0x00000000
   1508 #define LogSevWarning 0x00000001
   1509 #define LogSevError 0x00000002
   1510 #define LogSevFatalError 0x00000003
   1511 #define LogSevMaximum 0x00000004
   1512 
   1513 #define DICD_GENERATE_ID 0x00000001
   1514 #define DICD_INHERIT_CLASSDRVS 0x00000002
   1515 
   1516 #define DIOD_INHERIT_CLASSDRVS 0x00000002
   1517 #define DIOD_CANCEL_REMOVE 0x00000004
   1518 
   1519 #define DIODI_NO_ADD 0x00000001
   1520 
   1521 #define SPRDI_FIND_DUPS 0x00000001
   1522 
   1523 #define SPDIT_NODRIVER 0x00000000
   1524 #define SPDIT_CLASSDRIVER 0x00000001
   1525 #define SPDIT_COMPATDRIVER 0x00000002
   1526 
   1527 #define SetupLogError __MINGW_NAME_AW(SetupLogError)
   1528 #define SetupGetBackupInformation __MINGW_NAME_AW(SetupGetBackupInformation)
   1529 #define SetupPrepareQueueForRestore __MINGW_NAME_AW(SetupPrepareQueueForRestore)
   1530 #define SetupDiCreateDeviceInfoListEx __MINGW_NAME_AW(SetupDiCreateDeviceInfoListEx)
   1531 #define SetupDiGetDeviceInfoListDetail __MINGW_NAME_AW(SetupDiGetDeviceInfoListDetail)
   1532 #define SetupDiCreateDeviceInfo __MINGW_NAME_AW(SetupDiCreateDeviceInfo)
   1533 #define SetupDiOpenDeviceInfo __MINGW_NAME_AW(SetupDiOpenDeviceInfo)
   1534 #define SetupDiGetDeviceInstanceId __MINGW_NAME_AW(SetupDiGetDeviceInstanceId)
   1535 #define SetupDiCreateDeviceInterface __MINGW_NAME_AW(SetupDiCreateDeviceInterface)
   1536 #define SetupDiCreateInterfaceDevice __MINGW_NAME_AW(SetupDiCreateDeviceInterface)
   1537 #define SetupDiOpenDeviceInterface __MINGW_NAME_AW(SetupDiOpenDeviceInterface)
   1538 
   1539   WINSETUPAPI WINBOOL WINAPI SetupOpenLog(WINBOOL Erase);
   1540   WINSETUPAPI WINBOOL WINAPI SetupLogErrorA(LPCSTR MessageString,LogSeverity Severity);
   1541   WINSETUPAPI WINBOOL WINAPI SetupLogErrorW(LPCWSTR MessageString,LogSeverity Severity);
   1542   WINSETUPAPI VOID WINAPI SetupCloseLog(VOID);
   1543   WINSETUPAPI WINBOOL WINAPI SetupGetBackupInformationA(HSPFILEQ QueueHandle,PSP_BACKUP_QUEUE_PARAMS_A BackupParams);
   1544   WINSETUPAPI WINBOOL WINAPI SetupGetBackupInformationW(HSPFILEQ QueueHandle,PSP_BACKUP_QUEUE_PARAMS_W BackupParams);
   1545   WINSETUPAPI WINBOOL WINAPI SetupPrepareQueueForRestoreA(HSPFILEQ QueueHandle,PCSTR BackupPath,DWORD RestoreFlags);
   1546   WINSETUPAPI WINBOOL WINAPI SetupPrepareQueueForRestoreW(HSPFILEQ QueueHandle,PCWSTR BackupPath,DWORD RestoreFlags);
   1547   WINSETUPAPI WINBOOL WINAPI SetupSetNonInteractiveMode(WINBOOL NonInteractiveFlag);
   1548   WINSETUPAPI WINBOOL WINAPI SetupGetNonInteractiveMode(VOID);
   1549   WINSETUPAPI HDEVINFO WINAPI SetupDiCreateDeviceInfoList(CONST GUID *ClassGuid,HWND hwndParent);
   1550   WINSETUPAPI HDEVINFO WINAPI SetupDiCreateDeviceInfoListExA(CONST GUID *ClassGuid,HWND hwndParent,PCSTR MachineName,PVOID Reserved);
   1551   WINSETUPAPI HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(CONST GUID *ClassGuid,HWND hwndParent,PCWSTR MachineName,PVOID Reserved);
   1552   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInfoListClass(HDEVINFO DeviceInfoSet,LPGUID ClassGuid);
   1553   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInfoListDetailA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_LIST_DETAIL_DATA_A DeviceInfoSetDetailData);
   1554   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInfoListDetailW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_LIST_DETAIL_DATA_W DeviceInfoSetDetailData);
   1555   WINSETUPAPI WINBOOL WINAPI SetupDiCreateDeviceInfoA(HDEVINFO DeviceInfoSet,PCSTR DeviceName,CONST GUID *ClassGuid,PCSTR DeviceDescription,HWND hwndParent,DWORD CreationFlags,PSP_DEVINFO_DATA DeviceInfoData);
   1556   WINSETUPAPI WINBOOL WINAPI SetupDiCreateDeviceInfoW(HDEVINFO DeviceInfoSet,PCWSTR DeviceName,CONST GUID *ClassGuid,PCWSTR DeviceDescription,HWND hwndParent,DWORD CreationFlags,PSP_DEVINFO_DATA DeviceInfoData);
   1557   WINSETUPAPI WINBOOL WINAPI SetupDiOpenDeviceInfoA(HDEVINFO DeviceInfoSet,PCSTR DeviceInstanceId,HWND hwndParent,DWORD OpenFlags,PSP_DEVINFO_DATA DeviceInfoData);
   1558   WINSETUPAPI WINBOOL WINAPI SetupDiOpenDeviceInfoW(HDEVINFO DeviceInfoSet,PCWSTR DeviceInstanceId,HWND hwndParent,DWORD OpenFlags,PSP_DEVINFO_DATA DeviceInfoData);
   1559   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInstanceIdA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSTR DeviceInstanceId,DWORD DeviceInstanceIdSize,PDWORD RequiredSize);
   1560   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInstanceIdW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PWSTR DeviceInstanceId,DWORD DeviceInstanceIdSize,PDWORD RequiredSize);
   1561   WINSETUPAPI WINBOOL WINAPI SetupDiDeleteDeviceInfo(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1562   WINSETUPAPI WINBOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO DeviceInfoSet,DWORD MemberIndex,PSP_DEVINFO_DATA DeviceInfoData);
   1563   WINSETUPAPI WINBOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO DeviceInfoSet);
   1564   WINSETUPAPI WINBOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,CONST GUID *InterfaceClassGuid,DWORD MemberIndex,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1565 #define SetupDiEnumInterfaceDevice SetupDiEnumDeviceInterfaces
   1566   WINSETUPAPI WINBOOL WINAPI SetupDiCreateDeviceInterfaceA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,CONST GUID *InterfaceClassGuid,PCSTR ReferenceString,DWORD CreationFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1567   WINSETUPAPI WINBOOL WINAPI SetupDiCreateDeviceInterfaceW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,CONST GUID *InterfaceClassGuid,PCWSTR ReferenceString,DWORD CreationFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1568 #define SetupDiCreateInterfaceDeviceW SetupDiCreateDeviceInterfaceW
   1569 #define SetupDiCreateInterfaceDeviceA SetupDiCreateDeviceInterfaceA
   1570   WINSETUPAPI WINBOOL WINAPI SetupDiOpenDeviceInterfaceA(HDEVINFO DeviceInfoSet,PCSTR DevicePath,DWORD OpenFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1571   WINSETUPAPI WINBOOL WINAPI SetupDiOpenDeviceInterfaceW(HDEVINFO DeviceInfoSet,PCWSTR DevicePath,DWORD OpenFlags,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1572 #define SetupDiOpenInterfaceDeviceW SetupDiOpenDeviceInterfaceW
   1573 #define SetupDiOpenInterfaceDeviceA SetupDiOpenDeviceInterfaceA
   1574 
   1575 #define SetupDiOpenInterfaceDevice __MINGW_NAME_AW(SetupDiOpenDeviceInterface)
   1576 #define SetupDiGetDeviceInterfaceDetail __MINGW_NAME_AW(SetupDiGetDeviceInterfaceDetail)
   1577 #define SetupDiGetInterfaceDeviceDetail __MINGW_NAME_AW(SetupDiGetDeviceInterfaceDetail)
   1578 #define SetupDiEnumDriverInfo __MINGW_NAME_AW(SetupDiEnumDriverInfo)
   1579 #define SetupDiGetSelectedDriver __MINGW_NAME_AW(SetupDiGetSelectedDriver)
   1580 #define SetupDiSetSelectedDriver __MINGW_NAME_AW(SetupDiSetSelectedDriver)
   1581 #define SetupDiGetDriverInfoDetail __MINGW_NAME_AW(SetupDiGetDriverInfoDetail)
   1582 
   1583   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInterfaceAlias(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,CONST GUID *AliasInterfaceClassGuid,PSP_DEVICE_INTERFACE_DATA AliasDeviceInterfaceData);
   1584 #define SetupDiGetInterfaceDeviceAlias SetupDiGetDeviceInterfaceAlias
   1585   WINSETUPAPI WINBOOL WINAPI SetupDiDeleteDeviceInterfaceData(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1586 #define SetupDiDeleteInterfaceDeviceData SetupDiDeleteDeviceInterfaceData
   1587   WINSETUPAPI WINBOOL WINAPI SetupDiRemoveDeviceInterface(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
   1588 #define SetupDiRemoveInterfaceDevice SetupDiRemoveDeviceInterface
   1589   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,PSP_DEVICE_INTERFACE_DETAIL_DATA_A DeviceInterfaceDetailData,DWORD DeviceInterfaceDetailDataSize,PDWORD RequiredSize,PSP_DEVINFO_DATA DeviceInfoData);
   1590   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData,DWORD DeviceInterfaceDetailDataSize,PDWORD RequiredSize,PSP_DEVINFO_DATA DeviceInfoData);
   1591 #define SetupDiGetInterfaceDeviceDetailW SetupDiGetDeviceInterfaceDetailW
   1592 #define SetupDiGetInterfaceDeviceDetailA SetupDiGetDeviceInterfaceDetailA
   1593   WINSETUPAPI WINBOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1594 #define SetupDiInstallInterfaceDevices SetupDiInstallDeviceInterfaces
   1595   WINSETUPAPI WINBOOL WINAPI SetupDiSetDeviceInterfaceDefault(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Flags,PVOID Reserved);
   1596   WINSETUPAPI WINBOOL WINAPI SetupDiRegisterDeviceInfo(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Flags,PSP_DETSIG_CMPPROC CompareProc,PVOID CompareContext,PSP_DEVINFO_DATA DupDeviceInfoData);
   1597   WINSETUPAPI WINBOOL WINAPI SetupDiBuildDriverInfoList(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType);
   1598   WINSETUPAPI WINBOOL WINAPI SetupDiCancelDriverInfoSearch(HDEVINFO DeviceInfoSet);
   1599   WINSETUPAPI WINBOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType,DWORD MemberIndex,PSP_DRVINFO_DATA_A DriverInfoData);
   1600   WINSETUPAPI WINBOOL WINAPI SetupDiEnumDriverInfoW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType,DWORD MemberIndex,PSP_DRVINFO_DATA_W DriverInfoData);
   1601   WINSETUPAPI WINBOOL WINAPI SetupDiGetSelectedDriverA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData);
   1602   WINSETUPAPI WINBOOL WINAPI SetupDiGetSelectedDriverW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData);
   1603   WINSETUPAPI WINBOOL WINAPI SetupDiSetSelectedDriverA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData);
   1604   WINSETUPAPI WINBOOL WINAPI SetupDiSetSelectedDriverW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData);
   1605   WINSETUPAPI WINBOOL WINAPI SetupDiGetDriverInfoDetailA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData,PSP_DRVINFO_DETAIL_DATA_A DriverInfoDetailData,DWORD DriverInfoDetailDataSize,PDWORD RequiredSize);
   1606   WINSETUPAPI WINBOOL WINAPI SetupDiGetDriverInfoDetailW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData,PSP_DRVINFO_DETAIL_DATA_W DriverInfoDetailData,DWORD DriverInfoDetailDataSize,PDWORD RequiredSize);
   1607   WINSETUPAPI WINBOOL WINAPI SetupDiDestroyDriverInfoList(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD DriverType);
   1608 
   1609 #define DIGCF_DEFAULT 0x00000001
   1610 #define DIGCF_PRESENT 0x00000002
   1611 #define DIGCF_ALLCLASSES 0x00000004
   1612 #define DIGCF_PROFILE 0x00000008
   1613 #define DIGCF_DEVICEINTERFACE 0x00000010
   1614 
   1615 #define DIGCF_INTERFACEDEVICE DIGCF_DEVICEINTERFACE
   1616 
   1617 #define DIBCI_NOINSTALLCLASS 0x00000001
   1618 #define DIBCI_NODISPLAYCLASS 0x00000002
   1619 
   1620 #define SetupDiGetClassDevs __MINGW_NAME_AW(SetupDiGetClassDevs)
   1621 #define SetupDiGetClassDevsEx __MINGW_NAME_AW(SetupDiGetClassDevsEx)
   1622 #define SetupDiGetINFClass __MINGW_NAME_AW(SetupDiGetINFClass)
   1623 #define SetupDiBuildClassInfoListEx __MINGW_NAME_AW(SetupDiBuildClassInfoListEx)
   1624 #define SetupDiGetClassDescription __MINGW_NAME_AW(SetupDiGetClassDescription)
   1625 #define SetupDiGetClassDescriptionEx __MINGW_NAME_AW(SetupDiGetClassDescriptionEx)
   1626 #define SetupDiInstallClass __MINGW_NAME_AW(SetupDiInstallClass)
   1627 #define SetupDiInstallClassEx __MINGW_NAME_AW(SetupDiInstallClassEx)
   1628 #define SetupDiOpenClassRegKeyEx __MINGW_NAME_AW(SetupDiOpenClassRegKeyEx)
   1629 #define SetupDiCreateDeviceInterfaceRegKey __MINGW_NAME_AW(SetupDiCreateDeviceInterfaceRegKey)
   1630 #define SetupDiCreateInterfaceDeviceRegKey __MINGW_NAME_AW(SetupDiCreateDeviceInterfaceRegKey)
   1631 #define SetupDiCreateDevRegKey __MINGW_NAME_AW(SetupDiCreateDevRegKey)
   1632 #define SetupDiGetHwProfileListEx __MINGW_NAME_AW(SetupDiGetHwProfileListEx)
   1633 
   1634   WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsA(CONST GUID *ClassGuid,PCSTR Enumerator,HWND hwndParent,DWORD Flags);
   1635   WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *ClassGuid,PCWSTR Enumerator,HWND hwndParent,DWORD Flags);
   1636   WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsExA(CONST GUID *ClassGuid,PCSTR Enumerator,HWND hwndParent,DWORD Flags,HDEVINFO DeviceInfoSet,PCSTR MachineName,PVOID Reserved);
   1637   WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsExW(CONST GUID *ClassGuid,PCWSTR Enumerator,HWND hwndParent,DWORD Flags,HDEVINFO DeviceInfoSet,PCWSTR MachineName,PVOID Reserved);
   1638   WINSETUPAPI WINBOOL WINAPI SetupDiGetINFClassA(PCSTR InfName,LPGUID ClassGuid,PSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
   1639   WINSETUPAPI WINBOOL WINAPI SetupDiGetINFClassW(PCWSTR InfName,LPGUID ClassGuid,PWSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
   1640   WINSETUPAPI WINBOOL WINAPI SetupDiBuildClassInfoList(DWORD Flags,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize);
   1641   WINSETUPAPI WINBOOL WINAPI SetupDiBuildClassInfoListExA(DWORD Flags,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
   1642   WINSETUPAPI WINBOOL WINAPI SetupDiBuildClassInfoListExW(DWORD Flags,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
   1643   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassDescriptionA(CONST GUID *ClassGuid,PSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize);
   1644   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassDescriptionW(CONST GUID *ClassGuid,PWSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize);
   1645   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassDescriptionExA(CONST GUID *ClassGuid,PSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
   1646   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassDescriptionExW(CONST GUID *ClassGuid,PWSTR ClassDescription,DWORD ClassDescriptionSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
   1647   WINSETUPAPI WINBOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1648   WINSETUPAPI WINBOOL WINAPI SetupDiSelectDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1649   WINSETUPAPI WINBOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1650   WINSETUPAPI WINBOOL WINAPI SetupDiInstallDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1651   WINSETUPAPI WINBOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1652   WINSETUPAPI WINBOOL WINAPI SetupDiRegisterCoDeviceInstallers(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1653   WINSETUPAPI WINBOOL WINAPI SetupDiRemoveDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1654   WINSETUPAPI WINBOOL WINAPI SetupDiUnremoveDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1655   WINSETUPAPI WINBOOL WINAPI SetupDiRestartDevices(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1656   WINSETUPAPI WINBOOL WINAPI SetupDiChangeState(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1657   WINSETUPAPI WINBOOL WINAPI SetupDiInstallClassA(HWND hwndParent,PCSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue);
   1658   WINSETUPAPI WINBOOL WINAPI SetupDiInstallClassW(HWND hwndParent,PCWSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue);
   1659   WINSETUPAPI WINBOOL WINAPI SetupDiInstallClassExA(HWND hwndParent,PCSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue,CONST GUID *InterfaceClassGuid,PVOID Reserved1,PVOID Reserved2);
   1660   WINSETUPAPI WINBOOL WINAPI SetupDiInstallClassExW(HWND hwndParent,PCWSTR InfFileName,DWORD Flags,HSPFILEQ FileQueue,CONST GUID *InterfaceClassGuid,PVOID Reserved1,PVOID Reserved2);
   1661   WINSETUPAPI HKEY WINAPI SetupDiOpenClassRegKey(CONST GUID *ClassGuid,REGSAM samDesired);
   1662 
   1663 #define DIOCR_INSTALLER 0x00000001
   1664 #define DIOCR_INTERFACE 0x00000002
   1665 
   1666   WINSETUPAPI HKEY WINAPI SetupDiOpenClassRegKeyExA(CONST GUID *ClassGuid,REGSAM samDesired,DWORD Flags,PCSTR MachineName,PVOID Reserved);
   1667   WINSETUPAPI HKEY WINAPI SetupDiOpenClassRegKeyExW(CONST GUID *ClassGuid,REGSAM samDesired,DWORD Flags,PCWSTR MachineName,PVOID Reserved);
   1668   WINSETUPAPI HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyA(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved,REGSAM samDesired,HINF InfHandle,PCSTR InfSectionName);
   1669   WINSETUPAPI HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved,REGSAM samDesired,HINF InfHandle,PCWSTR InfSectionName);
   1670 
   1671 #define SetupDiCreateInterfaceDeviceRegKeyW SetupDiCreateDeviceInterfaceRegKeyW
   1672 #define SetupDiCreateInterfaceDeviceRegKeyA SetupDiCreateDeviceInterfaceRegKeyA
   1673 
   1674   WINSETUPAPI HKEY WINAPI SetupDiOpenDeviceInterfaceRegKey(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved,REGSAM samDesired);
   1675 #define SetupDiOpenInterfaceDeviceRegKey SetupDiOpenDeviceInterfaceRegKey
   1676   WINSETUPAPI WINBOOL WINAPI SetupDiDeleteDeviceInterfaceRegKey(HDEVINFO DeviceInfoSet,PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,DWORD Reserved);
   1677 #define SetupDiDeleteInterfaceDeviceRegKey SetupDiDeleteDeviceInterfaceRegKey
   1678 
   1679 #define DIREG_DEV 0x00000001
   1680 #define DIREG_DRV 0x00000002
   1681 #define DIREG_BOTH 0x00000004
   1682 
   1683   WINSETUPAPI HKEY WINAPI SetupDiCreateDevRegKeyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType,HINF InfHandle,PCSTR InfSectionName);
   1684   WINSETUPAPI HKEY WINAPI SetupDiCreateDevRegKeyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType,HINF InfHandle,PCWSTR InfSectionName);
   1685   WINSETUPAPI HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType,REGSAM samDesired);
   1686   WINSETUPAPI WINBOOL WINAPI SetupDiDeleteDevRegKey(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Scope,DWORD HwProfile,DWORD KeyType);
   1687   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileList(PDWORD HwProfileList,DWORD HwProfileListSize,PDWORD RequiredSize,PDWORD CurrentlyActiveIndex);
   1688   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileListExA(PDWORD HwProfileList,DWORD HwProfileListSize,PDWORD RequiredSize,PDWORD CurrentlyActiveIndex,PCSTR MachineName,PVOID Reserved);
   1689   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileListExW(PDWORD HwProfileList,DWORD HwProfileListSize,PDWORD RequiredSize,PDWORD CurrentlyActiveIndex,PCWSTR MachineName,PVOID Reserved);
   1690 
   1691 #define SPDRP_DEVICEDESC (0x00000000)
   1692 #define SPDRP_HARDWAREID (0x00000001)
   1693 #define SPDRP_COMPATIBLEIDS (0x00000002)
   1694 #define SPDRP_UNUSED0 (0x00000003)
   1695 #define SPDRP_SERVICE (0x00000004)
   1696 #define SPDRP_UNUSED1 (0x00000005)
   1697 #define SPDRP_UNUSED2 (0x00000006)
   1698 #define SPDRP_CLASS (0x00000007)
   1699 #define SPDRP_CLASSGUID (0x00000008)
   1700 #define SPDRP_DRIVER (0x00000009)
   1701 #define SPDRP_CONFIGFLAGS (0x0000000A)
   1702 #define SPDRP_MFG (0x0000000B)
   1703 #define SPDRP_FRIENDLYNAME (0x0000000C)
   1704 #define SPDRP_LOCATION_INFORMATION (0x0000000D)
   1705 #define SPDRP_PHYSICAL_DEVICE_OBJECT_NAME (0x0000000E)
   1706 #define SPDRP_CAPABILITIES (0x0000000F)
   1707 #define SPDRP_UI_NUMBER (0x00000010)
   1708 #define SPDRP_UPPERFILTERS (0x00000011)
   1709 #define SPDRP_LOWERFILTERS (0x00000012)
   1710 #define SPDRP_BUSTYPEGUID (0x00000013)
   1711 #define SPDRP_LEGACYBUSTYPE (0x00000014)
   1712 #define SPDRP_BUSNUMBER (0x00000015)
   1713 #define SPDRP_ENUMERATOR_NAME (0x00000016)
   1714 #define SPDRP_SECURITY (0x00000017)
   1715 #define SPDRP_SECURITY_SDS (0x00000018)
   1716 #define SPDRP_DEVTYPE (0x00000019)
   1717 #define SPDRP_EXCLUSIVE (0x0000001A)
   1718 #define SPDRP_CHARACTERISTICS (0x0000001B)
   1719 #define SPDRP_ADDRESS (0x0000001C)
   1720 #define SPDRP_UI_NUMBER_DESC_FORMAT (0X0000001D)
   1721 #define SPDRP_DEVICE_POWER_DATA (0x0000001E)
   1722 #define SPDRP_REMOVAL_POLICY (0x0000001F)
   1723 #define SPDRP_REMOVAL_POLICY_HW_DEFAULT (0x00000020)
   1724 #define SPDRP_REMOVAL_POLICY_OVERRIDE (0x00000021)
   1725 #define SPDRP_INSTALL_STATE (0x00000022)
   1726 #define SPDRP_LOCATION_PATHS (0x00000023)
   1727 #define SPDRP_MAXIMUM_PROPERTY (0x00000024)
   1728 #define SPCRP_SECURITY (0x00000017)
   1729 #define SPCRP_SECURITY_SDS (0x00000018)
   1730 #define SPCRP_DEVTYPE (0x00000019)
   1731 #define SPCRP_EXCLUSIVE (0x0000001A)
   1732 #define SPCRP_CHARACTERISTICS (0x0000001B)
   1733 #define SPCRP_MAXIMUM_PROPERTY (0x0000001C)
   1734 
   1735 #define SetupDiGetDeviceRegistryProperty __MINGW_NAME_AW(SetupDiGetDeviceRegistryProperty)
   1736 #define SetupDiGetClassRegistryProperty __MINGW_NAME_AW(SetupDiGetClassRegistryProperty)
   1737 #define SetupDiSetDeviceRegistryProperty __MINGW_NAME_AW(SetupDiSetDeviceRegistryProperty)
   1738 #define SetupDiSetClassRegistryProperty __MINGW_NAME_AW(SetupDiSetClassRegistryProperty)
   1739 #define SetupDiGetDeviceInstallParams __MINGW_NAME_AW(SetupDiGetDeviceInstallParams)
   1740 #define SetupDiGetClassInstallParams __MINGW_NAME_AW(SetupDiGetClassInstallParams)
   1741 #define SetupDiSetDeviceInstallParams __MINGW_NAME_AW(SetupDiSetDeviceInstallParams)
   1742 #define SetupDiSetClassInstallParams __MINGW_NAME_AW(SetupDiSetClassInstallParams)
   1743 #define SetupDiGetDriverInstallParams __MINGW_NAME_AW(SetupDiGetDriverInstallParams)
   1744 #define SetupDiSetDriverInstallParams __MINGW_NAME_AW(SetupDiSetDriverInstallParams)
   1745 #define SetupDiGetClassImageListEx __MINGW_NAME_AW(SetupDiGetClassImageListEx)
   1746 #define SetupDiGetClassDevPropertySheets __MINGW_NAME_AW(SetupDiGetClassDevPropertySheets)
   1747 #define SetupDiClassNameFromGuid __MINGW_NAME_AW(SetupDiClassNameFromGuid)
   1748 #define SetupDiClassNameFromGuidEx __MINGW_NAME_AW(SetupDiClassNameFromGuidEx)
   1749 #define SetupDiClassGuidsFromName __MINGW_NAME_AW(SetupDiClassGuidsFromName)
   1750 #define SetupDiClassGuidsFromNameEx __MINGW_NAME_AW(SetupDiClassGuidsFromNameEx)
   1751 #define SetupDiGetHwProfileFriendlyName __MINGW_NAME_AW(SetupDiGetHwProfileFriendlyName)
   1752 #define SetupDiGetHwProfileFriendlyNameEx __MINGW_NAME_AW(SetupDiGetHwProfileFriendlyNameEx)
   1753 #define SetupDiGetActualModelsSection __MINGW_NAME_AW(SetupDiGetActualModelsSection)
   1754 #define SetupDiGetActualSectionToInstall __MINGW_NAME_AW(SetupDiGetActualSectionToInstall)
   1755 #define SetupDiGetActualSectionToInstallEx __MINGW_NAME_AW(SetupDiGetActualSectionToInstallEx)
   1756 #define SetupEnumInfSections __MINGW_NAME_AW(SetupEnumInfSections)
   1757 
   1758   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceRegistryPropertyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
   1759   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
   1760   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassRegistryPropertyA(CONST GUID *ClassGuid,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
   1761   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassRegistryPropertyW(CONST GUID *ClassGuid,DWORD Property,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
   1762   WINSETUPAPI WINBOOL WINAPI SetupDiSetDeviceRegistryPropertyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize);
   1763   WINSETUPAPI WINBOOL WINAPI SetupDiSetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize);
   1764   WINSETUPAPI WINBOOL WINAPI SetupDiSetClassRegistryPropertyA(CONST GUID *ClassGuid,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize,PCSTR MachineName,PVOID Reserved);
   1765   WINSETUPAPI WINBOOL WINAPI SetupDiSetClassRegistryPropertyW(CONST GUID *ClassGuid,DWORD Property,CONST BYTE *PropertyBuffer,DWORD PropertyBufferSize,PCWSTR MachineName,PVOID Reserved);
   1766   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_A DeviceInstallParams);
   1767   WINSETUPAPI WINBOOL WINAPI SetupDiGetDeviceInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_W DeviceInstallParams);
   1768   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize,PDWORD RequiredSize);
   1769   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize,PDWORD RequiredSize);
   1770   WINSETUPAPI WINBOOL WINAPI SetupDiSetDeviceInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_A DeviceInstallParams);
   1771   WINSETUPAPI WINBOOL WINAPI SetupDiSetDeviceInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DEVINSTALL_PARAMS_W DeviceInstallParams);
   1772   WINSETUPAPI WINBOOL WINAPI SetupDiSetClassInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize);
   1773   WINSETUPAPI WINBOOL WINAPI SetupDiSetClassInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_CLASSINSTALL_HEADER ClassInstallParams,DWORD ClassInstallParamsSize);
   1774   WINSETUPAPI WINBOOL WINAPI SetupDiGetDriverInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
   1775   WINSETUPAPI WINBOOL WINAPI SetupDiGetDriverInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
   1776   WINSETUPAPI WINBOOL WINAPI SetupDiSetDriverInstallParamsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_A DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
   1777   WINSETUPAPI WINBOOL WINAPI SetupDiSetDriverInstallParamsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_DRVINFO_DATA_W DriverInfoData,PSP_DRVINSTALL_PARAMS DriverInstallParams);
   1778   WINSETUPAPI WINBOOL WINAPI SetupDiLoadClassIcon(CONST GUID *ClassGuid,HICON *LargeIcon,PINT MiniIconIndex);
   1779 
   1780 #define DMI_MASK 0x00000001
   1781 #define DMI_BKCOLOR 0x00000002
   1782 #define DMI_USERECT 0x00000004
   1783 
   1784   WINSETUPAPI INT WINAPI SetupDiDrawMiniIcon(HDC hdc,RECT rc,INT MiniIconIndex,DWORD Flags);
   1785   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassBitmapIndex(CONST GUID *ClassGuid,PINT MiniIconIndex);
   1786   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData);
   1787   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassImageListExA(PSP_CLASSIMAGELIST_DATA ClassImageListData,PCSTR MachineName,PVOID Reserved);
   1788   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassImageListExW(PSP_CLASSIMAGELIST_DATA ClassImageListData,PCWSTR MachineName,PVOID Reserved);
   1789   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassImageIndex(PSP_CLASSIMAGELIST_DATA ClassImageListData,CONST GUID *ClassGuid,PINT ImageIndex);
   1790   WINSETUPAPI WINBOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData);
   1791 
   1792 #define DIGCDP_FLAG_BASIC 0x00000001
   1793 #define DIGCDP_FLAG_ADVANCED 0x00000002
   1794 #define DIGCDP_FLAG_REMOTE_BASIC 0x00000003
   1795 #define DIGCDP_FLAG_REMOTE_ADVANCED 0x00000004
   1796 
   1797   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassDevPropertySheetsA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,LPPROPSHEETHEADERA PropertySheetHeader,DWORD PropertySheetHeaderPageListSize,PDWORD RequiredSize,DWORD PropertySheetType);
   1798   WINSETUPAPI WINBOOL WINAPI SetupDiGetClassDevPropertySheetsW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,LPPROPSHEETHEADERW PropertySheetHeader,DWORD PropertySheetHeaderPageListSize,PDWORD RequiredSize,DWORD PropertySheetType);
   1799 
   1800 #define IDI_RESOURCEFIRST 159
   1801 #define IDI_RESOURCE 159
   1802 #define IDI_RESOURCELAST 161
   1803 #define IDI_RESOURCEOVERLAYFIRST 161
   1804 #define IDI_RESOURCEOVERLAYLAST 161
   1805 #define IDI_CONFLICT 161
   1806 
   1807 #define IDI_CLASSICON_OVERLAYFIRST 500
   1808 #define IDI_CLASSICON_OVERLAYLAST 502
   1809 #define IDI_PROBLEM_OVL 500
   1810 #define IDI_DISABLED_OVL 501
   1811 #define IDI_FORCED_OVL 502
   1812 
   1813   WINSETUPAPI WINBOOL WINAPI SetupDiAskForOEMDisk(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1814   WINSETUPAPI WINBOOL WINAPI SetupDiSelectOEMDrv(HWND hwndParent,HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1815   WINSETUPAPI WINBOOL WINAPI SetupDiClassNameFromGuidA(CONST GUID *ClassGuid,PSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
   1816   WINSETUPAPI WINBOOL WINAPI SetupDiClassNameFromGuidW(CONST GUID *ClassGuid,PWSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize);
   1817   WINSETUPAPI WINBOOL WINAPI SetupDiClassNameFromGuidExA(CONST GUID *ClassGuid,PSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
   1818   WINSETUPAPI WINBOOL WINAPI SetupDiClassNameFromGuidExW(CONST GUID *ClassGuid,PWSTR ClassName,DWORD ClassNameSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
   1819   WINSETUPAPI WINBOOL WINAPI SetupDiClassGuidsFromNameA(PCSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize);
   1820   WINSETUPAPI WINBOOL WINAPI SetupDiClassGuidsFromNameW(PCWSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize);
   1821   WINSETUPAPI WINBOOL WINAPI SetupDiClassGuidsFromNameExA(PCSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
   1822   WINSETUPAPI WINBOOL WINAPI SetupDiClassGuidsFromNameExW(PCWSTR ClassName,LPGUID ClassGuidList,DWORD ClassGuidListSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
   1823   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameA(DWORD HwProfile,PSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize);
   1824   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameW(DWORD HwProfile,PWSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize);
   1825   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameExA(DWORD HwProfile,PSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize,PCSTR MachineName,PVOID Reserved);
   1826   WINSETUPAPI WINBOOL WINAPI SetupDiGetHwProfileFriendlyNameExW(DWORD HwProfile,PWSTR FriendlyName,DWORD FriendlyNameSize,PDWORD RequiredSize,PCWSTR MachineName,PVOID Reserved);
   1827 
   1828 #define SPWPT_SELECTDEVICE 0x00000001
   1829 #define SPWP_USE_DEVINFO_DATA 0x00000001
   1830 
   1831   WINSETUPAPI HPROPSHEETPAGE WINAPI SetupDiGetWizardPage(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PSP_INSTALLWIZARD_DATA InstallWizardData,DWORD PageType,DWORD Flags);
   1832   WINSETUPAPI WINBOOL WINAPI SetupDiGetSelectedDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1833   WINSETUPAPI WINBOOL WINAPI SetupDiSetSelectedDevice(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData);
   1834   WINSETUPAPI WINBOOL WINAPI SetupDiGetActualModelsSectionA(PINFCONTEXT Context,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PVOID Reserved);
   1835   WINSETUPAPI WINBOOL WINAPI SetupDiGetActualModelsSectionW(PINFCONTEXT Context,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PWSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PVOID Reserved);
   1836   WINSETUPAPI WINBOOL WINAPI SetupDiGetActualSectionToInstallA(HINF InfHandle,PCSTR InfSectionName,PSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PSTR *Extension);
   1837   WINSETUPAPI WINBOOL WINAPI SetupDiGetActualSectionToInstallW(HINF InfHandle,PCWSTR InfSectionName,PWSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PWSTR *Extension);
   1838   WINSETUPAPI WINBOOL WINAPI SetupDiGetActualSectionToInstallExA(HINF InfHandle,PCSTR InfSectionName,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PSTR *Extension,PVOID Reserved);
   1839   WINSETUPAPI WINBOOL WINAPI SetupDiGetActualSectionToInstallExW(HINF InfHandle,PCWSTR InfSectionName,PSP_ALTPLATFORM_INFO AlternatePlatformInfo,PWSTR InfSectionWithExt,DWORD InfSectionWithExtSize,PDWORD RequiredSize,PWSTR *Extension,PVOID Reserved);
   1840   WINSETUPAPI WINBOOL WINAPI SetupEnumInfSectionsA (HINF InfHandle,UINT Index,PSTR Buffer,UINT Size,UINT *SizeNeeded);
   1841   WINSETUPAPI WINBOOL WINAPI SetupEnumInfSectionsW (HINF InfHandle,UINT Index,PWSTR Buffer,UINT Size,UINT *SizeNeeded);
   1842 
   1843   typedef struct _SP_INF_SIGNER_INFO_A {
   1844     DWORD cbSize;
   1845     CHAR CatalogFile[MAX_PATH];
   1846     CHAR DigitalSigner[MAX_PATH];
   1847     CHAR DigitalSignerVersion[MAX_PATH];
   1848   } SP_INF_SIGNER_INFO_A,*PSP_INF_SIGNER_INFO_A;
   1849 
   1850   typedef struct _SP_INF_SIGNER_INFO_W {
   1851     DWORD cbSize;
   1852     WCHAR CatalogFile[MAX_PATH];
   1853     WCHAR DigitalSigner[MAX_PATH];
   1854     WCHAR DigitalSignerVersion[MAX_PATH];
   1855   } SP_INF_SIGNER_INFO_W,*PSP_INF_SIGNER_INFO_W;
   1856 
   1857   __MINGW_TYPEDEF_UAW(SP_INF_SIGNER_INFO)
   1858   __MINGW_TYPEDEF_UAW(PSP_INF_SIGNER_INFO)
   1859 
   1860 #define SetupVerifyInfFile __MINGW_NAME_AW(SetupVerifyInfFile)
   1861 #define SetupDiGetCustomDeviceProperty __MINGW_NAME_AW(SetupDiGetCustomDeviceProperty)
   1862 #define SetupConfigureWmiFromInfSection __MINGW_NAME_AW(SetupConfigureWmiFromInfSection)
   1863 
   1864   WINSETUPAPI WINBOOL WINAPI SetupVerifyInfFileA(PCSTR InfName,PSP_ALTPLATFORM_INFO AltPlatformInfo,PSP_INF_SIGNER_INFO_A InfSignerInfo);
   1865   WINSETUPAPI WINBOOL WINAPI SetupVerifyInfFileW(PCWSTR InfName,PSP_ALTPLATFORM_INFO AltPlatformInfo,PSP_INF_SIGNER_INFO_W InfSignerInfo);
   1866 
   1867 #define DICUSTOMDEVPROP_MERGE_MULTISZ 0x00000001
   1868 
   1869   WINSETUPAPI WINBOOL WINAPI SetupDiGetCustomDevicePropertyA(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PCSTR CustomPropertyName,DWORD Flags,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
   1870   WINSETUPAPI WINBOOL WINAPI SetupDiGetCustomDevicePropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData,PCWSTR CustomPropertyName,DWORD Flags,PDWORD PropertyRegDataType,PBYTE PropertyBuffer,DWORD PropertyBufferSize,PDWORD RequiredSize);
   1871 
   1872 #define SCWMI_CLOBBER_SECURITY 0x00000001
   1873 
   1874   WINSETUPAPI WINBOOL WINAPI SetupConfigureWmiFromInfSectionA(HINF InfHandle,PCSTR SectionName,DWORD Flags);
   1875   WINSETUPAPI WINBOOL WINAPI SetupConfigureWmiFromInfSectionW(HINF InfHandle,PCWSTR SectionName,DWORD Flags);
   1876 
   1877 #ifdef __cplusplus
   1878 }
   1879 #endif
   1880 
   1881 #include <poppack.h>
   1882 #endif
   1883