setupapi.h 29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Copyright (C) 2000 James Hatheway
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
18

19 20
#ifndef _INC_SETUPAPI
#define _INC_SETUPAPI
21

22
#include <commctrl.h>
23

24 25 26 27 28 29 30
/* setupapi doesn't use the normal convention, it adds an underscore before A/W */
#ifdef __WINESRC__
# define DECL_WINELIB_SETUPAPI_TYPE_AW(type)  /* nothing */
#else   /* __WINESRC__ */
# define DECL_WINELIB_SETUPAPI_TYPE_AW(type)  typedef WINELIB_NAME_AW(type##_) type;
#endif  /* __WINESRC__ */

31 32 33 34 35 36
/* Define type for handle to a loaded inf file */
typedef PVOID HINF;

/* Define type for handle to a device information set */
typedef PVOID HDEVINFO;

37 38 39
/* Define type for setup file queue */
typedef PVOID HSPFILEQ;

40 41 42 43 44 45 46 47 48
/* inf structure. */
typedef struct _INFCONTEXT
{
   PVOID Inf;
   PVOID CurrentInf;
   UINT  Section;
   UINT  Line;
} INFCONTEXT, *PINFCONTEXT;

49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
typedef struct _SP_ALTPLATFORM_INFO_V2
{
    DWORD cbSize;
    DWORD Platform;
    DWORD MajorVersion;
    DWORD MinorVersion;
    WORD  ProcessorArchitecture;
    union
    {
        WORD  Reserved;
        WORD  Flags;
    } DUMMYUNIONNAME;
    DWORD FirstValidatedMajorVersion;
    DWORD FirstValidatedMinorVersion;
} SP_ALTPLATFORM_INFO_V2, *PSP_ALTPLATFORM_INFO_V2;

#define SP_ALTPLATFORM_FLAGS_VERSION_RANGE 0x0001

typedef struct _SP_ALTPLATFORM_INFO_V1
{
    DWORD cbSize;
    DWORD Platform;
    DWORD MajorVersion;
    DWORD MinorVersion;
    WORD  ProcessorArchitecture;
    WORD  Reserved;
} SP_ALTPLATFORM_INFO_V1, *PSP_ALTPLATFORM_INFO_V1;

typedef SP_ALTPLATFORM_INFO_V2 SP_ALTPLATFORM_INFO;
typedef PSP_ALTPLATFORM_INFO_V2 PSP_ALTPLATFORM_INFO;

typedef struct _SP_FILE_COPY_PARAMS_A
{
    DWORD    cbSize;
    HSPFILEQ QueueHandle;
    PCSTR    SourceRootPath;
    PCSTR    SourcePath;
    PCSTR    SourceFilename;
    PCSTR    SourceDescription;
    PCSTR    SourceTagfile;
    PCSTR    TargetDirectory;
    PCSTR    TargetFilename;
    DWORD    CopyStyle;
    HINF     LayoutInf;
    PCSTR    SecurityDescriptor;
} SP_FILE_COPY_PARAMS_A, *PSP_FILE_COPY_PARAMS_A;

typedef struct _SP_FILE_COPY_PARAMS_W
{
    DWORD    cbSize;
    HSPFILEQ QueueHandle;
    PCWSTR   SourceRootPath;
    PCWSTR   SourcePath;
    PCWSTR   SourceFilename;
    PCWSTR   SourceDescription;
    PCWSTR   SourceTagfile;
    PCWSTR   TargetDirectory;
    PCWSTR   TargetFilename;
    DWORD    CopyStyle;
    HINF     LayoutInf;
    PCWSTR   SecurityDescriptor;
} SP_FILE_COPY_PARAMS_W, *PSP_FILE_COPY_PARAMS_W;

112 113
DECL_WINELIB_SETUPAPI_TYPE_AW(SP_FILE_COPY_PARAMS)
DECL_WINELIB_SETUPAPI_TYPE_AW(PSP_FILE_COPY_PARAMS)
114

115
typedef UINT (CALLBACK *PSP_FILE_CALLBACK_A)( PVOID Context, UINT Notification,
116
                                              UINT Param1, UINT Param2 );
117
typedef UINT (CALLBACK *PSP_FILE_CALLBACK_W)( PVOID Context, UINT Notification,
118
                                              UINT Param1, UINT Param2 );
119
DECL_WINELIB_SETUPAPI_TYPE_AW(PSP_FILE_CALLBACK)
120

121 122 123 124 125 126 127 128
#define LINE_LEN                    256
#define MAX_INF_STRING_LENGTH       4096
#define MAX_TITLE_LEN               60
#define MAX_INSTRUCTION_LEN         256
#define MAX_LABEL_LEN               30
#define MAX_SERVICE_NAME_LEN        256
#define MAX_SUBTITLE_LEN            256
#define SP_MAX_MACHINENAME_LENGTH   (MAX_PATH + 3)
129

130 131 132 133 134 135 136 137 138 139
/* Device Information structure (references a device instance that is a member
   of a device information set) */
typedef struct _SP_DEVINFO_DATA
{
   DWORD cbSize;
   GUID  ClassGuid;
   DWORD DevInst;   /* DEVINST handle */
   DWORD Reserved;
} SP_DEVINFO_DATA, *PSP_DEVINFO_DATA;

140 141 142 143 144 145 146 147
typedef struct _SP_DEVICE_INTERFACE_DATA
{
   DWORD      cbSize;
   GUID       InterfaceClassGuid;
   DWORD      Flags;
   ULONG_PTR  Reserved;
} SP_DEVICE_INTERFACE_DATA, *PSP_DEVICE_INTERFACE_DATA;

148
typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A
149 150 151
{
   DWORD      cbSize;
   CHAR       DevicePath[ANYSIZE_ARRAY];
152
} SP_DEVICE_INTERFACE_DETAIL_DATA_A, *PSP_DEVICE_INTERFACE_DETAIL_DATA_A;
153

154
typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W
155 156 157
{
   DWORD      cbSize;
   WCHAR      DevicePath[ANYSIZE_ARRAY];
158
} SP_DEVICE_INTERFACE_DETAIL_DATA_W, *PSP_DEVICE_INTERFACE_DETAIL_DATA_W;
159

160 161
DECL_WINELIB_SETUPAPI_TYPE_AW(SP_DEVICE_INTERFACE_DETAIL_DATA)
DECL_WINELIB_SETUPAPI_TYPE_AW(PSP_DEVICE_INTERFACE_DETAIL_DATA)
162

Steven Edwards's avatar
Steven Edwards committed
163
typedef struct _FILE_IN_CABINET_INFO_A {
164 165 166 167 168 169 170
  LPCSTR NameInCabinet;
  DWORD FileSize;
  DWORD Win32Error;
  WORD DosDate;
  WORD DosTime;
  WORD DosAttribs;
  CHAR FullTargetName[MAX_PATH];
Steven Edwards's avatar
Steven Edwards committed
171
} FILE_IN_CABINET_INFO_A, *PFILE_IN_CABINET_INFO_A;
172

Steven Edwards's avatar
Steven Edwards committed
173
typedef struct _FILE_IN_CABINET_INFO_W {
174 175 176 177 178 179 180
  LPCWSTR NameInCabinet;
  DWORD FileSize;
  DWORD Win32Error;
  WORD DosDate;
  WORD DosTime;
  WORD DosAttribs;
  WCHAR FullTargetName[MAX_PATH];
Steven Edwards's avatar
Steven Edwards committed
181
} FILE_IN_CABINET_INFO_W, *PFILE_IN_CABINET_INFO_W;
182

183 184
DECL_WINELIB_SETUPAPI_TYPE_AW(FILE_IN_CABINET_INFO)
DECL_WINELIB_SETUPAPI_TYPE_AW(PFILE_IN_CABINET_INFO)
185

Steven Edwards's avatar
Steven Edwards committed
186
typedef struct _CABINET_INFO_A {
187 188 189 190 191
  PCSTR CabinetPath;
  PCSTR CabinetFile;
  PCSTR DiskName;
  USHORT SetId;
  USHORT CabinetNumber;
Steven Edwards's avatar
Steven Edwards committed
192
} CABINET_INFO_A, *PCABINET_INFO_A;
193

Steven Edwards's avatar
Steven Edwards committed
194
typedef struct _CABINET_INFO_W {
195 196 197 198 199
  PCWSTR CabinetPath;
  PCWSTR CabinetFile;
  PCWSTR DiskName;
  USHORT SetId;
  USHORT CabinetNumber;
Steven Edwards's avatar
Steven Edwards committed
200
} CABINET_INFO_W, *PCABINET_INFO_W;
201

202 203
DECL_WINELIB_SETUPAPI_TYPE_AW(CABINET_INFO);
DECL_WINELIB_SETUPAPI_TYPE_AW(PCABINET_INFO);
204

205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
#define INF_STYLE_NONE           0x00
#define INF_STYLE_OLDNT          0x01
#define INF_STYLE_WIN4           0x02
#define INF_STYLE_CACHE_ENABLE   0x10
#define INF_STYLE_CACHE_DISABLE  0x20

#define FILEOP_COPY              0
#define FILEOP_RENAME            1
#define FILEOP_DELETE            2
#define FILEOP_BACKUP            3

#define FILEOP_ABORT             0
#define FILEOP_DOIT              1
#define FILEOP_SKIP              2
#define FILEOP_RETRY             FILEOP_DOIT
#define FILEOP_NEWPATH           4

typedef struct _FILEPATHS_A
{
    PCSTR  Target;
    PCSTR  Source;
    UINT   Win32Error;
    DWORD  Flags;
} FILEPATHS_A, *PFILEPATHS_A;

typedef struct _FILEPATHS_W
{
    PCWSTR Target;
    PCWSTR Source;
    UINT   Win32Error;
    DWORD  Flags;
} FILEPATHS_W, *PFILEPATHS_W;

238 239
DECL_WINELIB_SETUPAPI_TYPE_AW(FILEPATHS)
DECL_WINELIB_SETUPAPI_TYPE_AW(PFILEPATHS)
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503

#define SPFILENOTIFY_STARTQUEUE           0x0001
#define SPFILENOTIFY_ENDQUEUE             0x0002
#define SPFILENOTIFY_STARTSUBQUEUE        0x0003
#define SPFILENOTIFY_ENDSUBQUEUE          0x0004
#define SPFILENOTIFY_STARTDELETE          0x0005
#define SPFILENOTIFY_ENDDELETE            0x0006
#define SPFILENOTIFY_DELETEERROR          0x0007
#define SPFILENOTIFY_STARTRENAME          0x0008
#define SPFILENOTIFY_ENDRENAME            0x0009
#define SPFILENOTIFY_RENAMEERROR          0x000a
#define SPFILENOTIFY_STARTCOPY            0x000b
#define SPFILENOTIFY_ENDCOPY              0x000c
#define SPFILENOTIFY_COPYERROR            0x000d
#define SPFILENOTIFY_NEEDMEDIA            0x000e
#define SPFILENOTIFY_QUEUESCAN            0x000f
#define SPFILENOTIFY_CABINETINFO          0x0010
#define SPFILENOTIFY_FILEINCABINET        0x0011
#define SPFILENOTIFY_NEEDNEWCABINET       0x0012
#define SPFILENOTIFY_FILEEXTRACTED        0x0013
#define SPFILENOTIFY_FILEOPDELAYED        0x0014
#define SPFILENOTIFY_STARTBACKUP          0x0015
#define SPFILENOTIFY_BACKUPERROR          0x0016
#define SPFILENOTIFY_ENDBACKUP            0x0017
#define SPFILENOTIFY_QUEUESCAN_EX         0x0018
#define SPFILENOTIFY_STARTREGISTRATION    0x0019
#define SPFILENOTIFY_ENDREGISTRATION      0x0020
#define SPFILENOTIFY_QUEUESCAN_SIGNERINFO 0x0040

#define SPFILENOTIFY_LANGMISMATCH         0x00010000
#define SPFILENOTIFY_TARGETEXISTS         0x00020000
#define SPFILENOTIFY_TARGETNEWER          0x00040000

#define SPINST_LOGCONFIG                  0x00000001
#define SPINST_INIFILES                   0x00000002
#define SPINST_REGISTRY                   0x00000004
#define SPINST_INI2REG                    0x00000008
#define SPINST_FILES                      0x00000010
#define SPINST_BITREG                     0x00000020
#define SPINST_REGSVR                     0x00000040
#define SPINST_UNREGSVR                   0x00000080
#define SPINST_PROFILEITEMS               0x00000100
#define SPINST_COPYINF                    0x00000200
#define SPINST_ALL                        0x000003ff
#define SPINST_SINGLESECTION              0x00010000
#define SPINST_LOGCONFIG_IS_FORCED        0x00020000
#define SPINST_LOGCONFIGS_ARE_OVERRIDES   0x00040000
#define SPINST_REGISTERCALLBACKAWARE      0x00080000

#define SP_COPY_DELETESOURCE              0x00000001
#define SP_COPY_REPLACEONLY               0x00000002
#define SP_COPY_NEWER                     0x00000004
#define SP_COPY_NEWER_OR_SAME             SP_COPY_NEWER
#define SP_COPY_NOOVERWRITE               0x00000008
#define SP_COPY_NODECOMP                  0x00000010
#define SP_COPY_LANGUAGEAWARE             0x00000020
#define SP_COPY_SOURCE_ABSOLUTE           0x00000040
#define SP_COPY_SOURCEPATH_ABSOLUTE       0x00000080
#define SP_COPY_IN_USE_NEEDS_REBOOT       0x00000100
#define SP_COPY_FORCE_IN_USE              0x00000200
#define SP_COPY_NOSKIP                    0x00000400
#define SP_FLAG_CABINETCONTINUATION       0x00000800
#define SP_COPY_FORCE_NOOVERWRITE         0x00001000
#define SP_COPY_FORCE_NEWER               0x00002000
#define SP_COPY_WARNIFSKIP                0x00004000
#define SP_COPY_NOBROWSE                  0x00008000
#define SP_COPY_NEWER_ONLY                0x00010000
#define SP_COPY_SOURCE_SIS_MASTER         0x00020000
#define SP_COPY_OEMINF_CATALOG_ONLY       0x00040000
#define SP_COPY_REPLACE_BOOT_FILE         0x00080000
#define SP_COPY_NOPRUNE                   0x00100000
#define SP_COPY_OEM_F6_INF                0x00200000

#define FLG_ADDREG_DELREG_BIT             0x00008000
#define FLG_ADDREG_BINVALUETYPE           0x00000001
#define FLG_ADDREG_NOCLOBBER              0x00000002
#define FLG_ADDREG_DELVAL                 0x00000004
#define FLG_ADDREG_APPEND                 0x00000008
#define FLG_ADDREG_KEYONLY                0x00000010
#define FLG_ADDREG_OVERWRITEONLY          0x00000020
#define FLG_ADDREG_64BITKEY               0x00001000
#define FLG_ADDREG_KEYONLY_COMMON         0x00002000
#define FLG_ADDREG_32BITKEY               0x00004000
#define FLG_ADDREG_TYPE_SZ                0x00000000
#define FLG_ADDREG_TYPE_MULTI_SZ          0x00010000
#define FLG_ADDREG_TYPE_EXPAND_SZ         0x00020000
#define FLG_ADDREG_TYPE_BINARY           (0x00000000 | FLG_ADDREG_BINVALUETYPE)
#define FLG_ADDREG_TYPE_DWORD            (0x00010000 | FLG_ADDREG_BINVALUETYPE)
#define FLG_ADDREG_TYPE_NONE             (0x00020000 | FLG_ADDREG_BINVALUETYPE)
#define FLG_ADDREG_TYPE_MASK             (0xFFFF0000 | FLG_ADDREG_BINVALUETYPE)

#define FLG_DELREG_VALUE                 (0x00000000)
#define FLG_DELREG_TYPE_MASK             FLG_ADDREG_TYPE_MASK
#define FLG_DELREG_TYPE_SZ               FLG_ADDREG_TYPE_SZ
#define FLG_DELREG_TYPE_MULTI_SZ         FLG_ADDREG_TYPE_MULTI_SZ
#define FLG_DELREG_TYPE_EXPAND_SZ        FLG_ADDREG_TYPE_EXPAND_SZ
#define FLG_DELREG_TYPE_BINARY           FLG_ADDREG_TYPE_BINARY
#define FLG_DELREG_TYPE_DWORD            FLG_ADDREG_TYPE_DWORD
#define FLG_DELREG_TYPE_NONE             FLG_ADDREG_TYPE_NONE
#define FLG_DELREG_64BITKEY              FLG_ADDREG_64BITKEY
#define FLG_DELREG_KEYONLY_COMMON        FLG_ADDREG_KEYONLY_COMMON
#define FLG_DELREG_32BITKEY              FLG_ADDREG_32BITKEY
#define FLG_DELREG_OPERATION_MASK        (0x000000FE)
#define FLG_DELREG_MULTI_SZ_DELSTRING    (FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT | 0x00000002)

/* Class installer function codes */
#define DIF_SELECTDEVICE                    0x01
#define DIF_INSTALLDEVICE                   0x02
#define DIF_ASSIGNRESOURCES                 0x03
#define DIF_PROPERTIES                      0x04
#define DIF_REMOVE                          0x05
#define DIF_FIRSTTIMESETUP                  0x06
#define DIF_FOUNDDEVICE                     0x07
#define DIF_SELECTCLASSDRIVERS              0x08
#define DIF_VALIDATECLASSDRIVERS            0x09
#define DIF_INSTALLCLASSDRIVERS             0x0a
#define DIF_CALCDISKSPACE                   0x0b
#define DIF_DESTROYPRIVATEDATA              0x0c
#define DIF_VALIDATEDRIVER                  0x0d
#define DIF_MOVEDEVICE                      0x0e
#define DIF_DETECT                          0x0f
#define DIF_INSTALLWIZARD                   0x10
#define DIF_DESTROYWIZARDDATA               0x11
#define DIF_PROPERTYCHANGE                  0x12
#define DIF_ENABLECLASS                     0x13
#define DIF_DETECTVERIFY                    0x14
#define DIF_INSTALLDEVICEFILES              0x15
#define DIF_UNREMOVE                        0x16
#define DIF_SELECTBESTCOMPATDRV             0x17
#define DIF_ALLOW_INSTALL                   0x18
#define DIF_REGISTERDEVICE                  0x19
#define DIF_NEWDEVICEWIZARD_PRESELECT       0x1a
#define DIF_NEWDEVICEWIZARD_SELECT          0x1b
#define DIF_NEWDEVICEWIZARD_PREANALYZE      0x1c
#define DIF_NEWDEVICEWIZARD_POSTANALYZE     0x1d
#define DIF_NEWDEVICEWIZARD_FINISHINSTALL   0x1e
#define DIF_UNUSED1                         0x1f
#define DIF_INSTALLINTERFACES               0x20
#define DIF_DETECTCANCEL                    0x21
#define DIF_REGISTER_COINSTALLERS           0x22
#define DIF_ADDPROPERTYPAGE_ADVANCED        0x23
#define DIF_ADDPROPERTYPAGE_BASIC           0x24
#define DIF_RESERVED1                       0x25
#define DIF_TROUBLESHOOTER                  0x26
#define DIF_POWERMESSAGEWAKE                0x27
#define DIF_ADDREMOTEPROPERTYPAGE_ADVANCED  0x28
#define DIF_UPDATEDRIVER_UI                 0x29
#define DIF_RESERVED2                       0x30

/* Directory ids */
#define DIRID_ABSOLUTE                (-1)
#define DIRID_ABSOLUTE_16BIT          0xffff
#define DIRID_NULL                    0
#define DIRID_SRCPATH                 1
#define DIRID_WINDOWS                 10
#define DIRID_SYSTEM                  11
#define DIRID_DRIVERS                 12
#define DIRID_IOSUBSYS                DIRID_DRIVERS
#define DIRID_INF                     17
#define DIRID_HELP                    18
#define DIRID_FONTS                   20
#define DIRID_VIEWERS                 21
#define DIRID_COLOR                   23
#define DIRID_APPS                    24
#define DIRID_SHARED                  25
#define DIRID_BOOT                    30
#define DIRID_SYSTEM16                50
#define DIRID_SPOOL                   51
#define DIRID_SPOOLDRIVERS            52
#define DIRID_USERPROFILE             53
#define DIRID_LOADER                  54
#define DIRID_PRINTPROCESSOR          55
#define DIRID_DEFAULT                 DIRID_SYSTEM

#define DIRID_COMMON_STARTMENU        16406
#define DIRID_COMMON_PROGRAMS         16407
#define DIRID_COMMON_STARTUP          16408
#define DIRID_COMMON_DESKTOPDIRECTORY 16409
#define DIRID_COMMON_FAVORITES        16415
#define DIRID_COMMON_APPDATA          16419
#define DIRID_PROGRAM_FILES           16422
#define DIRID_SYSTEM_X86              16425
#define DIRID_PROGRAM_FILES_X86       16426
#define DIRID_PROGRAM_FILES_COMMON    16427
#define DIRID_PROGRAM_FILES_COMMONX86 16428
#define DIRID_COMMON_TEMPLATES        16429
#define DIRID_COMMON_DOCUMENTS        16430

#define DIRID_USER                    0x8000


/* Error code */

#define ERROR_EXPECTED_SECTION_NAME       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0)
#define ERROR_BAD_SECTION_NAME_LINE       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|1)
#define ERROR_SECTION_NAME_TOO_LONG       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|2)
#define ERROR_GENERAL_SYNTAX              (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|3)
#define ERROR_WRONG_INF_STYLE             (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x100)
#define ERROR_SECTION_NOT_FOUND           (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x101)
#define ERROR_LINE_NOT_FOUND              (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x102)
#define ERROR_NO_BACKUP                   (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x103)
#define ERROR_NO_ASSOCIATED_CLASS         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x200)
#define ERROR_CLASS_MISMATCH              (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x201)
#define ERROR_DUPLICATE_FOUND             (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x202)
#define ERROR_NO_DRIVER_SELECTED          (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x203)
#define ERROR_KEY_DOES_NOT_EXIST          (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x204)
#define ERROR_INVALID_DEVINST_NAME        (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x205)
#define ERROR_INVALID_CLASS               (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x206)
#define ERROR_DEVINST_ALREADY_EXISTS      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x207)
#define ERROR_DEVINFO_NOT_REGISTERED      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x208)
#define ERROR_INVALID_REG_PROPERTY        (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x209)
#define ERROR_NO_INF                      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20A)
#define ERROR_NO_SUCH_DEVINST             (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20B)
#define ERROR_CANT_LOAD_CLASS_ICON        (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20C)
#define ERROR_INVALID_CLASS_INSTALLER     (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20D)
#define ERROR_DI_DO_DEFAULT               (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20E)
#define ERROR_DI_NOFILECOPY               (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20F)
#define ERROR_INVALID_HWPROFILE           (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x210)
#define ERROR_NO_DEVICE_SELECTED          (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x211)
#define ERROR_DEVINFO_LIST_LOCKED         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x212)
#define ERROR_DEVINFO_DATA_LOCKED         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x213)
#define ERROR_DI_BAD_PATH                 (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x214)
#define ERROR_NO_CLASSINSTALL_PARAMS      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x215)
#define ERROR_FILEQUEUE_LOCKED            (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x216)
#define ERROR_BAD_SERVICE_INSTALLSECT     (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x217)
#define ERROR_NO_CLASS_DRIVER_LIST        (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x218)
#define ERROR_NO_ASSOCIATED_SERVICE       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x219)
#define ERROR_NO_DEFAULT_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21A)
#define ERROR_DEVICE_INTERFACE_ACTIVE     (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21B)
#define ERROR_DEVICE_INTERFACE_REMOVED    (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21C)
#define ERROR_BAD_INTERFACE_INSTALLSECT   (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21D)
#define ERROR_NO_SUCH_INTERFACE_CLASS     (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21E)
#define ERROR_INVALID_REFERENCE_STRING    (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21F)
#define ERROR_INVALID_MACHINENAME         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x220)
#define ERROR_REMOTE_COMM_FAILURE         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x221)
#define ERROR_MACHINE_UNAVAILABLE         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x222)
#define ERROR_NO_CONFIGMGR_SERVICES       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x223)
#define ERROR_INVALID_PROPPAGE_PROVIDER   (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x224)
#define ERROR_NO_SUCH_DEVICE_INTERFACE    (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x225)
#define ERROR_DI_POSTPROCESSING_REQUIRED  (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x226)
#define ERROR_INVALID_COINSTALLER         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x227)
#define ERROR_NO_COMPAT_DRIVERS           (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x228)
#define ERROR_NO_DEVICE_ICON              (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x229)
#define ERROR_INVALID_INF_LOGCONFIG       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22A)
#define ERROR_DI_DONT_INSTALL             (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22B)
#define ERROR_INVALID_FILTER_DRIVER       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22C)
#define ERROR_NON_WINDOWS_NT_DRIVER       (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22D)
#define ERROR_NON_WINDOWS_DRIVER          (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22E)
#define ERROR_NO_CATALOG_FOR_OEM_INF      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22F)
#define ERROR_DEVINSTALL_QUEUE_NONNATIVE  (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x230)
#define ERROR_NOT_DISABLEABLE             (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x231)
#define ERROR_CANT_REMOVE_DEVINST         (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x232)
#define ERROR_INVALID_TARGET              (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x233)
#define ERROR_DRIVER_NONNATIVE            (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x234)
#define ERROR_IN_WOW64                    (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x235)
#define ERROR_SET_SYSTEM_RESTORE_POINT    (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x236)
#define ERROR_INCORRECTLY_COPIED_INF      (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x237)
#define ERROR_SCE_DISABLED                (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x238)
#define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
#define ERROR_INTERFACE_DEVICE_ACTIVE     ERROR_DEVICE_INTERFACE_ACTIVE
#define ERROR_INTERFACE_DEVICE_REMOVED    ERROR_DEVICE_INTERFACE_REMOVED
#define ERROR_NO_SUCH_INTERFACE_DEVICE    ERROR_NO_SUCH_DEVICE_INTERFACE
#define ERROR_NOT_INSTALLED               (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x1000)

504 505
HINF     WINAPI SetupOpenInfFileA( PCSTR name, PCSTR pszclass, DWORD style, UINT *error );
HINF     WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR pszclass, DWORD style, UINT *error );
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582
#define         SetupOpenInfFile WINELIB_NAME_AW(SetupOpenInfFile)
BOOL     WINAPI SetupOpenAppendInfFileA( PCSTR, HINF, UINT * );
BOOL     WINAPI SetupOpenAppendInfFileW( PCWSTR, HINF, UINT * );
#define         SetupOpenAppendInfFile WINELIB_NAME_AW(SetupOpenAppendInfFile)
void     WINAPI SetupCloseInfFile( HINF hinf );
BOOL     WINAPI SetupGetLineByIndexA( HINF, PCSTR, DWORD, INFCONTEXT * );
BOOL     WINAPI SetupGetLineByIndexW( HINF, PCWSTR, DWORD, INFCONTEXT * );
#define         SetupGetLineByIndex WINELIB_NAME_AW(SetupGetLineByIndex)
LONG     WINAPI SetupGetLineCountA( HINF hinf, PCSTR section );
LONG     WINAPI SetupGetLineCountW( HINF hinf, PCWSTR section );
#define         SetupGetLineCount WINELIB_NAME_AW(SetupGetLineCount)
BOOL     WINAPI SetupFindFirstLineA( HINF hinf, PCSTR section, PCSTR key, INFCONTEXT *context );
BOOL     WINAPI SetupFindFirstLineW( HINF hinf, PCWSTR section, PCWSTR key, INFCONTEXT *context );
#define         SetupFindFirstLine WINELIB_NAME_AW(SetupFindFirstLine)
BOOL     WINAPI SetupFindNextLine( const INFCONTEXT *, INFCONTEXT * );
BOOL     WINAPI SetupFindNextMatchLineA( const INFCONTEXT *, PCSTR, INFCONTEXT * );
BOOL     WINAPI SetupFindNextMatchLineW( const INFCONTEXT *, PCWSTR, INFCONTEXT * );
#define         SetupFindNextMatchLine WINELIB_NAME_AW(SetupFindNextMatchLine)
BOOL     WINAPI SetupGetLineTextA( const INFCONTEXT *, HINF, PCSTR, PCSTR, PSTR, DWORD, DWORD * );
BOOL     WINAPI SetupGetLineTextW( const INFCONTEXT *, HINF, PCWSTR, PCWSTR, PWSTR, DWORD, DWORD * );
#define         SetupGetLineText WINELIB_NAME_AW(SetupGetLineText)
DWORD    WINAPI SetupGetFieldCount( const INFCONTEXT * );
BOOL     WINAPI SetupGetIntField( const INFCONTEXT *, DWORD, INT * );
BOOL     WINAPI SetupGetStringFieldA( const INFCONTEXT *, DWORD, PSTR, DWORD, DWORD * );
BOOL     WINAPI SetupGetStringFieldW( const INFCONTEXT *, DWORD, PWSTR, DWORD, DWORD * );
#define         SetupGetStringField WINELIB_NAME_AW(SetupGetStringField)
BOOL     WINAPI SetupGetBinaryField( const INFCONTEXT *, DWORD, BYTE *, DWORD, DWORD * );
BOOL     WINAPI SetupGetMultiSzFieldA( const INFCONTEXT *, DWORD, PSTR, DWORD, DWORD * );
BOOL     WINAPI SetupGetMultiSzFieldW( const INFCONTEXT *, DWORD, PWSTR, DWORD, DWORD * );
#define         SetupGetMultiSzField WINELIB_NAME_AW(SetupGetMultiSzField)
BOOL     WINAPI SetupSetDirectoryIdA( HINF, DWORD, PCSTR );
BOOL     WINAPI SetupSetDirectoryIdW( HINF, DWORD, PCWSTR );
#define         SetupSetDirectoryId WINELIB_NAME_AW(SetupSetDirectoryId)
HSPFILEQ WINAPI SetupOpenFileQueue(void);
BOOL     WINAPI SetupCloseFileQueue( HSPFILEQ );
BOOL     WINAPI SetupSetFileQueueAlternatePlatformA( HSPFILEQ, PSP_ALTPLATFORM_INFO, PCSTR );
BOOL     WINAPI SetupSetFileQueueAlternatePlatformW( HSPFILEQ, PSP_ALTPLATFORM_INFO, PCWSTR );
#define         SetupSetFileQueueAlternatePlatform WINELIB_NAME_AW(SetupSetFileQueueAlternatePlatform)
BOOL     WINAPI SetupQueueCopyA(HSPFILEQ,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,DWORD);
BOOL     WINAPI SetupQueueCopyW(HSPFILEQ,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,DWORD);
#define         SetupQueueCopy WINELIB_NAME_AW(SetupQueueCopy)
BOOL     WINAPI SetupQueueCopyIndirectA( PSP_FILE_COPY_PARAMS_A );
BOOL     WINAPI SetupQueueCopyIndirectW( PSP_FILE_COPY_PARAMS_W );
#define         SetupQueueCopyIndirect WINELIB_NAME_AW(SetupQueueCopyIndirect)
BOOL     WINAPI SetupQueueDefaultCopyA( HSPFILEQ, HINF, PCSTR, PCSTR, PCSTR, DWORD );
BOOL     WINAPI SetupQueueDefaultCopyW( HSPFILEQ, HINF, PCWSTR, PCWSTR, PCWSTR, DWORD );
#define         SetupQueueDefaultCopy WINELIB_NAME_AW(SetupQueueDefaultCopy)
BOOL     WINAPI SetupQueueDeleteA( HSPFILEQ, PCSTR, PCSTR );
BOOL     WINAPI SetupQueueDeleteW( HSPFILEQ, PCWSTR, PCWSTR );
#define         SetupQueueDelete WINELIB_NAME_AW(SetupQueueDelete)
BOOL     WINAPI SetupQueueRenameA( HSPFILEQ, PCSTR, PCSTR, PCSTR, PCSTR );
BOOL     WINAPI SetupQueueRenameW( HSPFILEQ, PCWSTR, PCWSTR, PCWSTR, PCWSTR );
#define         SetupQueueRename WINELIB_NAME_AW(SetupQueueRename)
BOOL     WINAPI SetupCommitFileQueueA( HWND, HSPFILEQ, PSP_FILE_CALLBACK_A, PVOID );
BOOL     WINAPI SetupCommitFileQueueW( HWND, HSPFILEQ, PSP_FILE_CALLBACK_W, PVOID );
#define         SetupCommitFileQueue WINELIB_NAME_AW(SetupCommitFileQueue)
BOOL     WINAPI SetupScanFileQueueA( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_A, PVOID, PDWORD );
BOOL     WINAPI SetupScanFileQueueW( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_W, PVOID, PDWORD );
#define         SetupScanFileQueue WINELIB_NAME_AW(SetupScanFileQueue)
BOOL     WINAPI SetupGetFileQueueCount( HSPFILEQ, UINT, PUINT );
BOOL     WINAPI SetupGetFileQueueFlags( HSPFILEQ, PDWORD );
BOOL     WINAPI SetupSetFileQueueFlags( HSPFILEQ, DWORD, DWORD );
BOOL     WINAPI SetupQueueCopySectionA( HSPFILEQ, PCSTR, HINF, HINF, PCSTR, DWORD );
BOOL     WINAPI SetupQueueCopySectionW( HSPFILEQ, PCWSTR, HINF, HINF, PCWSTR, DWORD );
#define         SetupQueueCopySection WINELIB_NAME_AW(SetupQueueCopySection)
BOOL     WINAPI SetupQueueDeleteSectionA( HSPFILEQ, HINF, HINF, PCSTR );
BOOL     WINAPI SetupQueueDeleteSectionW( HSPFILEQ, HINF, HINF, PCWSTR );
#define         SetupQueueDeleteSection WINELIB_NAME_AW(SetupQueueDeleteSection)
BOOL     WINAPI SetupQueueRenameSectionA( HSPFILEQ, HINF, HINF, PCSTR );
BOOL     WINAPI SetupQueueRenameSectionW( HSPFILEQ, HINF, HINF, PCWSTR );
#define         SetupQueueRenameSection WINELIB_NAME_AW(SetupQueueRenameSection)
PVOID    WINAPI SetupInitDefaultQueueCallback( HWND );
PVOID    WINAPI SetupInitDefaultQueueCallbackEx( HWND, HWND, UINT, DWORD, PVOID );
void     WINAPI SetupTermDefaultQueueCallback( PVOID );
UINT     WINAPI SetupDefaultQueueCallbackA( PVOID, UINT, UINT_PTR, UINT_PTR );
UINT     WINAPI SetupDefaultQueueCallbackW( PVOID, UINT, UINT_PTR, UINT_PTR );
#define         SetupDefaultQueueCallback WINELIB_NAME_AW(SetupDefaultQueueCallback)
583 584 585
HDEVINFO WINAPI SetupDiGetClassDevsA(CONST GUID *,LPCSTR,HWND,DWORD);
HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *,LPCWSTR,HWND,DWORD);
#define         SetupDiGetClassDevs WINELIB_NAME_AW(SetupDiGetClassDevs)
586 587 588 589 590 591 592 593
BOOL     WINAPI SetupInstallFilesFromInfSectionA( HINF, HINF, HSPFILEQ, PCSTR, PCSTR, UINT );
BOOL     WINAPI SetupInstallFilesFromInfSectionW( HINF, HINF, HSPFILEQ, PCWSTR, PCWSTR, UINT );
#define         SetupInstallFilesFromInfSection WINELIB_NAME_AW(SetupInstallFilesFromInfSection)
BOOL     WINAPI SetupInstallFromInfSectionA(HWND,HINF,PCSTR,UINT,HKEY,PCSTR,UINT,
                                            PSP_FILE_CALLBACK_A,PVOID,HDEVINFO,PSP_DEVINFO_DATA);
BOOL     WINAPI SetupInstallFromInfSectionW(HWND,HINF,PCWSTR,UINT,HKEY,PCWSTR,UINT,
                                            PSP_FILE_CALLBACK_W,PVOID,HDEVINFO,PSP_DEVINFO_DATA);
#define         SetupInstallFromInfSection WINELIB_NAME_AW(SetupInstallFromInfSection)
594 595 596
BOOL     WINAPI SetupIterateCabinetA(PCSTR, DWORD, PSP_FILE_CALLBACK_A, PVOID);
BOOL     WINAPI SetupIterateCabinetW(PCWSTR, DWORD, PSP_FILE_CALLBACK_W, PVOID);
#define         SetupIterateCabinet WINELIB_NAME_AW(SetupIterateCabinet)
597

598 599
#undef DECL_WINELIB_SETUPAPI_TYPE_AW

600
#endif /* _INC_SETUPAPI */