SetupAPI.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:192k
源码类别:

模拟服务器

开发平台:

C/C++

  1. WINSETUPAPI
  2. BOOL
  3. WINAPI
  4. SetupGetFileQueueFlags(
  5.     IN  HSPFILEQ            FileQueue,
  6.     OUT PDWORD              Flags
  7.     );
  8. WINSETUPAPI
  9. BOOL
  10. WINAPI
  11. SetupSetFileQueueFlags(
  12.     IN  HSPFILEQ            FileQueue,
  13.     IN  DWORD               FlagMask,
  14.     IN  DWORD               Flags
  15.     );
  16. //
  17. // Flags/FlagMask for use with SetupSetFileQueueFlags and returned by SetupGetFileQueueFlags
  18. //
  19. #define SPQ_FLAG_BACKUP_AWARE      0x00000001  // If set, SetupCommitFileQueue will
  20.                                                // issue backup notifications.
  21. #define SPQ_FLAG_ABORT_IF_UNSIGNED 0x00000002  // If set, SetupCommitFileQueue will
  22.                                                // fail with ERROR_SET_SYSTEM_RESTORE_POINT
  23.                                                // if the user elects to proceed with an
  24.                                                // unsigned queue committal.  This allows
  25.                                                // the caller to set a system restore point,
  26.                                                // then re-commit the file queue.
  27. #define SPQ_FLAG_FILES_MODIFIED    0x00000004  // If set, at least one file was
  28.                                                // replaced by a different version
  29. #define SPQ_FLAG_VALID             0x00000007  // mask of valid flags (can be passed as FlagMask)
  30. #endif  // _SETUPAPI_VER >= 0x0501
  31. //
  32. // Define OEM Source Type values for use in SetupCopyOEMInf.
  33. //
  34. #define SPOST_NONE  0
  35. #define SPOST_PATH  1
  36. #define SPOST_URL   2
  37. #define SPOST_MAX   3
  38. WINSETUPAPI
  39. BOOL
  40. WINAPI
  41. SetupCopyOEMInfA(
  42.     IN  PCSTR   SourceInfFileName,
  43.     IN  PCSTR   OEMSourceMediaLocation,         OPTIONAL
  44.     IN  DWORD   OEMSourceMediaType,
  45.     IN  DWORD   CopyStyle,
  46.     OUT PSTR    DestinationInfFileName,         OPTIONAL
  47.     IN  DWORD   DestinationInfFileNameSize,
  48.     OUT PDWORD  RequiredSize,                   OPTIONAL
  49.     OUT PSTR   *DestinationInfFileNameComponent OPTIONAL
  50.     );
  51. WINSETUPAPI
  52. BOOL
  53. WINAPI
  54. SetupCopyOEMInfW(
  55.     IN  PCWSTR  SourceInfFileName,
  56.     IN  PCWSTR  OEMSourceMediaLocation,         OPTIONAL
  57.     IN  DWORD   OEMSourceMediaType,
  58.     IN  DWORD   CopyStyle,
  59.     OUT PWSTR   DestinationInfFileName,         OPTIONAL
  60.     IN  DWORD   DestinationInfFileNameSize,
  61.     OUT PDWORD  RequiredSize,                   OPTIONAL
  62.     OUT PWSTR  *DestinationInfFileNameComponent OPTIONAL
  63.     );
  64. #ifdef UNICODE
  65. #define SetupCopyOEMInf SetupCopyOEMInfW
  66. #else
  67. #define SetupCopyOEMInf SetupCopyOEMInfA
  68. #endif
  69. #if _SETUPAPI_VER >= 0x0501
  70. //
  71. // Flags used by SetupUninstallOEMInf
  72. //
  73. #define SUOI_FORCEDELETE   0x00000001
  74. WINSETUPAPI
  75. BOOL
  76. WINAPI
  77. SetupUninstallOEMInfA(
  78.     IN PCSTR InfFileName,
  79.     IN DWORD Flags,
  80.     IN PVOID Reserved
  81.     );
  82. WINSETUPAPI
  83. BOOL
  84. WINAPI
  85. SetupUninstallOEMInfW(
  86.     IN PCWSTR InfFileName,
  87.     IN DWORD  Flags,
  88.     IN PVOID  Reserved
  89.     );
  90. #ifdef UNICODE
  91. #define SetupUninstallOEMInf SetupUninstallOEMInfW
  92. #else
  93. #define SetupUninstallOEMInf SetupUninstallOEMInfA
  94. #endif
  95. WINSETUPAPI
  96. BOOL
  97. WINAPI
  98. SetupUninstallNewlyCopiedInfs(
  99.     IN HSPFILEQ FileQueue,
  100.     IN DWORD Flags,
  101.     IN PVOID Reserved
  102.     );
  103. #endif // _SETUPAPI_VER >= 0x0501
  104. //
  105. // Disk space list APIs
  106. //
  107. WINSETUPAPI
  108. HDSKSPC
  109. WINAPI
  110. SetupCreateDiskSpaceListA(
  111.     IN PVOID Reserved1,
  112.     IN DWORD Reserved2,
  113.     IN UINT  Flags
  114.     );
  115. WINSETUPAPI
  116. HDSKSPC
  117. WINAPI
  118. SetupCreateDiskSpaceListW(
  119.     IN PVOID Reserved1,
  120.     IN DWORD Reserved2,
  121.     IN UINT  Flags
  122.     );
  123. #ifdef UNICODE
  124. #define SetupCreateDiskSpaceList SetupCreateDiskSpaceListW
  125. #else
  126. #define SetupCreateDiskSpaceList SetupCreateDiskSpaceListA
  127. #endif
  128. //
  129. // Flags for SetupCreateDiskSpaceList
  130. //
  131. #define SPDSL_IGNORE_DISK              0x00000001  // ignore deletes and on-disk files in copies
  132. #define SPDSL_DISALLOW_NEGATIVE_ADJUST 0x00000002
  133. WINSETUPAPI
  134. HDSKSPC
  135. WINAPI
  136. SetupDuplicateDiskSpaceListA(
  137.     IN HDSKSPC DiskSpace,
  138.     IN PVOID   Reserved1,
  139.     IN DWORD   Reserved2,
  140.     IN UINT    Flags
  141.     );
  142. WINSETUPAPI
  143. HDSKSPC
  144. WINAPI
  145. SetupDuplicateDiskSpaceListW(
  146.     IN HDSKSPC DiskSpace,
  147.     IN PVOID   Reserved1,
  148.     IN DWORD   Reserved2,
  149.     IN UINT    Flags
  150.     );
  151. #ifdef UNICODE
  152. #define SetupDuplicateDiskSpaceList SetupDuplicateDiskSpaceListW
  153. #else
  154. #define SetupDuplicateDiskSpaceList SetupDuplicateDiskSpaceListA
  155. #endif
  156. WINSETUPAPI
  157. BOOL
  158. WINAPI
  159. SetupDestroyDiskSpaceList(
  160.     IN OUT HDSKSPC DiskSpace
  161.     );
  162. WINSETUPAPI
  163. BOOL
  164. WINAPI
  165. SetupQueryDrivesInDiskSpaceListA(
  166.     IN  HDSKSPC DiskSpace,
  167.     OUT PSTR    ReturnBuffer,       OPTIONAL
  168.     IN  DWORD   ReturnBufferSize,
  169.     OUT PDWORD  RequiredSize        OPTIONAL
  170.     );
  171. WINSETUPAPI
  172. BOOL
  173. WINAPI
  174. SetupQueryDrivesInDiskSpaceListW(
  175.     IN  HDSKSPC DiskSpace,
  176.     OUT PWSTR   ReturnBuffer,       OPTIONAL
  177.     IN  DWORD   ReturnBufferSize,
  178.     OUT PDWORD  RequiredSize        OPTIONAL
  179.     );
  180. #ifdef UNICODE
  181. #define SetupQueryDrivesInDiskSpaceList SetupQueryDrivesInDiskSpaceListW
  182. #else
  183. #define SetupQueryDrivesInDiskSpaceList SetupQueryDrivesInDiskSpaceListA
  184. #endif
  185. WINSETUPAPI
  186. BOOL
  187. WINAPI
  188. SetupQuerySpaceRequiredOnDriveA(
  189.     IN  HDSKSPC   DiskSpace,
  190.     IN  PCSTR     DriveSpec,
  191.     OUT LONGLONG *SpaceRequired,
  192.     IN  PVOID     Reserved1,
  193.     IN  UINT      Reserved2
  194.     );
  195. WINSETUPAPI
  196. BOOL
  197. WINAPI
  198. SetupQuerySpaceRequiredOnDriveW(
  199.     IN  HDSKSPC   DiskSpace,
  200.     IN  PCWSTR    DriveSpec,
  201.     OUT LONGLONG *SpaceRequired,
  202.     IN  PVOID     Reserved1,
  203.     IN  UINT      Reserved2
  204.     );
  205. #ifdef UNICODE
  206. #define SetupQuerySpaceRequiredOnDrive SetupQuerySpaceRequiredOnDriveW
  207. #else
  208. #define SetupQuerySpaceRequiredOnDrive SetupQuerySpaceRequiredOnDriveA
  209. #endif
  210. WINSETUPAPI
  211. BOOL
  212. WINAPI
  213. SetupAdjustDiskSpaceListA(
  214.     IN HDSKSPC  DiskSpace,
  215.     IN LPCSTR   DriveRoot,
  216.     IN LONGLONG Amount,
  217.     IN PVOID    Reserved1,
  218.     IN UINT     Reserved2
  219.     );
  220. WINSETUPAPI
  221. BOOL
  222. WINAPI
  223. SetupAdjustDiskSpaceListW(
  224.     IN HDSKSPC  DiskSpace,
  225.     IN LPCWSTR  DriveRoot,
  226.     IN LONGLONG Amount,
  227.     IN PVOID    Reserved1,
  228.     IN UINT     Reserved2
  229.     );
  230. #ifdef UNICODE
  231. #define SetupAdjustDiskSpaceList SetupAdjustDiskSpaceListW
  232. #else
  233. #define SetupAdjustDiskSpaceList SetupAdjustDiskSpaceListA
  234. #endif
  235. WINSETUPAPI
  236. BOOL
  237. WINAPI
  238. SetupAddToDiskSpaceListA(
  239.     IN HDSKSPC  DiskSpace,
  240.     IN PCSTR    TargetFilespec,
  241.     IN LONGLONG FileSize,
  242.     IN UINT     Operation,
  243.     IN PVOID    Reserved1,
  244.     IN UINT     Reserved2
  245.     );
  246. WINSETUPAPI
  247. BOOL
  248. WINAPI
  249. SetupAddToDiskSpaceListW(
  250.     IN HDSKSPC  DiskSpace,
  251.     IN PCWSTR   TargetFilespec,
  252.     IN LONGLONG FileSize,
  253.     IN UINT     Operation,
  254.     IN PVOID    Reserved1,
  255.     IN UINT     Reserved2
  256.     );
  257. #ifdef UNICODE
  258. #define SetupAddToDiskSpaceList SetupAddToDiskSpaceListW
  259. #else
  260. #define SetupAddToDiskSpaceList SetupAddToDiskSpaceListA
  261. #endif
  262. WINSETUPAPI
  263. BOOL
  264. WINAPI
  265. SetupAddSectionToDiskSpaceListA(
  266.     IN HDSKSPC DiskSpace,
  267.     IN HINF    InfHandle,
  268.     IN HINF    ListInfHandle,  OPTIONAL
  269.     IN PCSTR   SectionName,
  270.     IN UINT    Operation,
  271.     IN PVOID   Reserved1,
  272.     IN UINT    Reserved2
  273.     );
  274. WINSETUPAPI
  275. BOOL
  276. WINAPI
  277. SetupAddSectionToDiskSpaceListW(     IN HDSKSPC DiskSpace,
  278.     IN HINF    InfHandle,
  279.     IN HINF    ListInfHandle,  OPTIONAL
  280.     IN PCWSTR  SectionName,
  281.     IN UINT    Operation,
  282.     IN PVOID   Reserved1,
  283.     IN UINT    Reserved2
  284.     );
  285. #ifdef UNICODE
  286. #define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListW
  287. #else
  288. #define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListA
  289. #endif
  290. WINSETUPAPI
  291. BOOL
  292. WINAPI
  293. SetupAddInstallSectionToDiskSpaceListA(
  294.     IN HDSKSPC DiskSpace,
  295.     IN HINF    InfHandle,
  296.     IN HINF    LayoutInfHandle,     OPTIONAL
  297.     IN PCSTR   SectionName,
  298.     IN PVOID   Reserved1,
  299.     IN UINT    Reserved2
  300.     );
  301. WINSETUPAPI
  302. BOOL
  303. WINAPI
  304. SetupAddInstallSectionToDiskSpaceListW(
  305.     IN HDSKSPC DiskSpace,
  306.     IN HINF    InfHandle,
  307.     IN HINF    LayoutInfHandle,     OPTIONAL
  308.     IN PCWSTR  SectionName,
  309.     IN PVOID   Reserved1,
  310.     IN UINT    Reserved2
  311.     );
  312. #ifdef UNICODE
  313. #define SetupAddInstallSectionToDiskSpaceList SetupAddInstallSectionToDiskSpaceListW
  314. #else
  315. #define SetupAddInstallSectionToDiskSpaceList SetupAddInstallSectionToDiskSpaceListA
  316. #endif
  317. WINSETUPAPI
  318. BOOL
  319. WINAPI
  320. SetupRemoveFromDiskSpaceListA(
  321.     IN HDSKSPC DiskSpace,
  322.     IN PCSTR   TargetFilespec,
  323.     IN UINT    Operation,
  324.     IN PVOID   Reserved1,
  325.     IN UINT    Reserved2
  326.     );
  327. WINSETUPAPI
  328. BOOL
  329. WINAPI
  330. SetupRemoveFromDiskSpaceListW(
  331.     IN HDSKSPC DiskSpace,
  332.     IN PCWSTR  TargetFilespec,
  333.     IN UINT    Operation,
  334.     IN PVOID   Reserved1,
  335.     IN UINT    Reserved2
  336.     );
  337. #ifdef UNICODE
  338. #define SetupRemoveFromDiskSpaceList SetupRemoveFromDiskSpaceListW
  339. #else
  340. #define SetupRemoveFromDiskSpaceList SetupRemoveFromDiskSpaceListA
  341. #endif
  342. WINSETUPAPI
  343. BOOL
  344. WINAPI
  345. SetupRemoveSectionFromDiskSpaceListA(
  346.     IN HDSKSPC DiskSpace,
  347.     IN HINF    InfHandle,
  348.     IN HINF    ListInfHandle,  OPTIONAL
  349.     IN PCSTR   SectionName,
  350.     IN UINT    Operation,
  351.     IN PVOID   Reserved1,
  352.     IN UINT    Reserved2
  353.     );
  354. WINSETUPAPI
  355. BOOL
  356. WINAPI
  357. SetupRemoveSectionFromDiskSpaceListW(
  358.     IN HDSKSPC DiskSpace,
  359.     IN HINF    InfHandle,
  360.     IN HINF    ListInfHandle,  OPTIONAL
  361.     IN PCWSTR  SectionName,
  362.     IN UINT    Operation,
  363.     IN PVOID   Reserved1,
  364.     IN UINT    Reserved2
  365.     );
  366. #ifdef UNICODE
  367. #define SetupRemoveSectionFromDiskSpaceList SetupRemoveSectionFromDiskSpaceListW
  368. #else
  369. #define SetupRemoveSectionFromDiskSpaceList SetupRemoveSectionFromDiskSpaceListA
  370. #endif
  371. WINSETUPAPI
  372. BOOL
  373. WINAPI
  374. SetupRemoveInstallSectionFromDiskSpaceListA(
  375.     IN HDSKSPC DiskSpace,
  376.     IN HINF    InfHandle,
  377.     IN HINF    LayoutInfHandle,     OPTIONAL
  378.     IN PCSTR   SectionName,
  379.     IN PVOID   Reserved1,
  380.     IN UINT    Reserved2
  381.     );
  382. WINSETUPAPI
  383. BOOL
  384. WINAPI
  385. SetupRemoveInstallSectionFromDiskSpaceListW(
  386.     IN HDSKSPC DiskSpace,
  387.     IN HINF    InfHandle,
  388.     IN HINF    LayoutInfHandle,     OPTIONAL
  389.     IN PCWSTR  SectionName,
  390.     IN PVOID   Reserved1,
  391.     IN UINT    Reserved2
  392.     );
  393. #ifdef UNICODE
  394. #define SetupRemoveInstallSectionFromDiskSpaceList SetupRemoveInstallSectionFromDiskSpaceListW
  395. #else
  396. #define SetupRemoveInstallSectionFromDiskSpaceList SetupRemoveInstallSectionFromDiskSpaceListA
  397. #endif
  398. //
  399. // Cabinet APIs
  400. //
  401. WINSETUPAPI
  402. BOOL
  403. WINAPI
  404. SetupIterateCabinetA(
  405.     IN  PCSTR               CabinetFile,
  406.     IN  DWORD               Reserved,
  407.     IN  PSP_FILE_CALLBACK_A MsgHandler,
  408.     IN  PVOID               Context
  409.     );
  410. WINSETUPAPI
  411. BOOL
  412. WINAPI
  413. SetupIterateCabinetW(
  414.     IN  PCWSTR              CabinetFile,
  415.     IN  DWORD               Reserved,
  416.     IN  PSP_FILE_CALLBACK_W MsgHandler,
  417.     IN  PVOID               Context
  418.     );
  419. #ifdef UNICODE
  420. #define SetupIterateCabinet SetupIterateCabinetW
  421. #else
  422. #define SetupIterateCabinet SetupIterateCabinetA
  423. #endif
  424. WINSETUPAPI
  425. INT
  426. WINAPI
  427. SetupPromptReboot(
  428.     IN HSPFILEQ FileQueue,  OPTIONAL
  429.     IN HWND     Owner,
  430.     IN BOOL     ScanOnly
  431.     );
  432. //
  433. // Define flags that are returned by SetupPromptReboot
  434. //
  435. #define SPFILEQ_FILE_IN_USE         0x00000001
  436. #define SPFILEQ_REBOOT_RECOMMENDED  0x00000002
  437. #define SPFILEQ_REBOOT_IN_PROGRESS  0x00000004
  438. WINSETUPAPI
  439. PVOID
  440. WINAPI
  441. SetupInitDefaultQueueCallback(
  442.     IN HWND OwnerWindow
  443.     );
  444. WINSETUPAPI
  445. PVOID
  446. WINAPI
  447. SetupInitDefaultQueueCallbackEx(
  448.     IN HWND  OwnerWindow,
  449.     IN HWND  AlternateProgressWindow, OPTIONAL
  450.     IN UINT  ProgressMessage,
  451.     IN DWORD Reserved1,
  452.     IN PVOID Reserved2
  453.     );
  454. WINSETUPAPI
  455. VOID
  456. WINAPI
  457. SetupTermDefaultQueueCallback(
  458.     IN PVOID Context
  459.     );
  460. WINSETUPAPI
  461. UINT
  462. WINAPI
  463. SetupDefaultQueueCallbackA(
  464.     IN PVOID Context,
  465.     IN UINT  Notification,
  466.     IN UINT_PTR Param1,
  467.     IN UINT_PTR Param2
  468.     );
  469. WINSETUPAPI
  470. UINT
  471. WINAPI
  472. SetupDefaultQueueCallbackW(
  473.     IN PVOID Context,
  474.     IN UINT  Notification,
  475.     IN UINT_PTR Param1,
  476.     IN UINT_PTR Param2
  477.     );
  478. #ifdef UNICODE
  479. #define SetupDefaultQueueCallback SetupDefaultQueueCallbackW
  480. #else
  481. #define SetupDefaultQueueCallback SetupDefaultQueueCallbackA
  482. #endif
  483. //
  484. // Flags for AddReg section lines in INF.  The corresponding value
  485. // is <ValueType> in the AddReg line format given below:
  486. //
  487. // <RegRootString>,<SubKey>,<ValueName>,<ValueType>,<Value>...
  488. //
  489. // The low word contains basic flags concerning the general data type
  490. // and AddReg action. The high word contains values that more specifically
  491. // identify the data type of the registry value.  The high word is ignored
  492. // by the 16-bit Windows 95 SETUPX APIs.
  493. //
  494. // If <ValueType> has FLG_ADDREG_DELREG_BIT set, it will be ignored by AddReg
  495. // (not supported by SetupX).
  496. //
  497. #if _SETUPAPI_VER >= 0x0501
  498. #define FLG_ADDREG_DELREG_BIT       ( 0x00008000 ) // if set, interpret as DELREG, see below
  499. #endif // _SETUPAPI_VER >= 0x0501
  500. #define FLG_ADDREG_BINVALUETYPE     ( 0x00000001 )
  501. #define FLG_ADDREG_NOCLOBBER        ( 0x00000002 )
  502. #define FLG_ADDREG_DELVAL           ( 0x00000004 )
  503. #define FLG_ADDREG_APPEND           ( 0x00000008 ) // Currently supported only
  504.                                                    // for REG_MULTI_SZ values.
  505. #define FLG_ADDREG_KEYONLY          ( 0x00000010 ) // Just create the key, ignore value
  506. #define FLG_ADDREG_OVERWRITEONLY    ( 0x00000020 ) // Set only if value already exists
  507. #if _SETUPAPI_VER >= 0x0501
  508. #define FLG_ADDREG_64BITKEY         ( 0x00001000 ) // make this change in the 64 bit registry.
  509. #define FLG_ADDREG_KEYONLY_COMMON   ( 0x00002000 ) // same as FLG_ADDREG_KEYONLY but also works for DELREG
  510. #define FLG_ADDREG_32BITKEY         ( 0x00004000 ) // make this change in the 32 bit registry.
  511. #endif // _SETUPAPI_VER >= 0x0501
  512. //
  513. // The INF may supply any arbitrary data type ordinal in the highword except
  514. // for the following: REG_NONE, REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ.  If this
  515. // technique is used, then the data is given in binary format, one byte per
  516. // field.
  517. //
  518. #define FLG_ADDREG_TYPE_MASK        ( 0xFFFF0000 | FLG_ADDREG_BINVALUETYPE )
  519. #define FLG_ADDREG_TYPE_SZ          ( 0x00000000                           )
  520. #define FLG_ADDREG_TYPE_MULTI_SZ    ( 0x00010000                           )
  521. #define FLG_ADDREG_TYPE_EXPAND_SZ   ( 0x00020000                           )
  522. #define FLG_ADDREG_TYPE_BINARY      ( 0x00000000 | FLG_ADDREG_BINVALUETYPE )
  523. #define FLG_ADDREG_TYPE_DWORD       ( 0x00010000 | FLG_ADDREG_BINVALUETYPE )
  524. #define FLG_ADDREG_TYPE_NONE        ( 0x00020000 | FLG_ADDREG_BINVALUETYPE )
  525. //
  526. // Flags for DelReg section lines in INF.  The corresponding value
  527. // is <Operation> in the extended DelReg line format given below:
  528. //
  529. // <RegRootString>,<SubKey>,<ValueName>,<Operation>[,...]
  530. //
  531. // In SetupX and some versions of SetupAPI, <Operation> will be ignored and <ValueName> will
  532. // be deleted. Use with care.
  533. //
  534. // The bits determined by mask FLG_DELREG_TYPE_MASK indicates type of data expected.
  535. // <Operation> must have FLG_ADDREG_DELREG_BIT set, otherwise it is ignored and specified
  536. // value will be deleted (allowing an AddReg section to also be used as a DelReg section)
  537. // if <Operation> is not specified, <ValueName> will be deleted (if specified) otherwise
  538. // <SubKey> will be deleted.
  539. //
  540. // the compatability flag
  541. //
  542. #define FLG_DELREG_VALUE            (0x00000000)
  543. #if _SETUPAPI_VER >= 0x0501
  544. #define FLG_DELREG_TYPE_MASK        FLG_ADDREG_TYPE_MASK        // 0xFFFF0001
  545. #define FLG_DELREG_TYPE_SZ          FLG_ADDREG_TYPE_SZ          // 0x00000000
  546. #define FLG_DELREG_TYPE_MULTI_SZ    FLG_ADDREG_TYPE_MULTI_SZ    // 0x00010000
  547. #define FLG_DELREG_TYPE_EXPAND_SZ   FLG_ADDREG_TYPE_EXPAND_SZ   // 0x00020000
  548. #define FLG_DELREG_TYPE_BINARY      FLG_ADDREG_TYPE_BINARY      // 0x00000001
  549. #define FLG_DELREG_TYPE_DWORD       FLG_ADDREG_TYPE_DWORD       // 0x00010001
  550. #define FLG_DELREG_TYPE_NONE        FLG_ADDREG_TYPE_NONE        // 0x00020001
  551. #define FLG_DELREG_64BITKEY         FLG_ADDREG_64BITKEY         // 0x00001000
  552. #define FLG_DELREG_KEYONLY_COMMON   FLG_ADDREG_KEYONLY_COMMON   // 0x00002000
  553. #define FLG_DELREG_32BITKEY         FLG_ADDREG_32BITKEY         // 0x00004000
  554. //
  555. // <Operation> = FLG_DELREG_MULTI_SZ_DELSTRING
  556. //               <RegRootString>,<SubKey>,<ValueName>,0x00018002,<String>
  557. //               removes all entries matching <String> (case ignored) from multi-sz registry value
  558. //
  559. #define FLG_DELREG_OPERATION_MASK   (0x000000FE)
  560. #define FLG_DELREG_MULTI_SZ_DELSTRING ( FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT | 0x00000002 ) // 0x00018002
  561. #endif // _SETUPAPI_VER >= 0x0501
  562. //
  563. // Flags for BitReg section lines in INF.
  564. //
  565. #define FLG_BITREG_CLEARBITS        ( 0x00000000 )
  566. #define FLG_BITREG_SETBITS          ( 0x00000001 )
  567. #if _SETUPAPI_VER >= 0x0501
  568. #define FLG_BITREG_64BITKEY         ( 0x00001000 )
  569. #define FLG_BITREG_32BITKEY         ( 0x00004000 )
  570. #endif // _SETUPAPI_VER >= 0x0501
  571. //
  572. // Flags for Ini2Reg section lines in INF.
  573. //
  574. #if _SETUPAPI_VER >= 0x0501
  575. #define FLG_INI2REG_64BITKEY        ( 0x00001000 )
  576. #define FLG_INI2REG_32BITKEY        ( 0x00004000 )
  577. #endif // _SETUPAPI_VER >= 0x0501
  578. //
  579. // Flags for RegSvr section lines in INF
  580. //
  581. #define FLG_REGSVR_DLLREGISTER      ( 0x00000001 )
  582. #define FLG_REGSVR_DLLINSTALL       ( 0x00000002 )
  583. // Flags for RegSvr section lines in INF
  584. //
  585. #define FLG_PROFITEM_CURRENTUSER    ( 0x00000001 )
  586. #define FLG_PROFITEM_DELETE         ( 0x00000002 )
  587. #define FLG_PROFITEM_GROUP          ( 0x00000004 )
  588. #define FLG_PROFITEM_CSIDL          ( 0x00000008 )
  589. WINSETUPAPI
  590. BOOL
  591. WINAPI
  592. SetupInstallFromInfSectionA(
  593.     IN HWND                Owner,
  594.     IN HINF                InfHandle,
  595.     IN PCSTR               SectionName,
  596.     IN UINT                Flags,
  597.     IN HKEY                RelativeKeyRoot,   OPTIONAL
  598.     IN PCSTR               SourceRootPath,    OPTIONAL
  599.     IN UINT                CopyFlags,         OPTIONAL
  600.     IN PSP_FILE_CALLBACK_A MsgHandler,        OPTIONAL
  601.     IN PVOID               Context,           OPTIONAL
  602.     IN HDEVINFO            DeviceInfoSet,     OPTIONAL
  603.     IN PSP_DEVINFO_DATA    DeviceInfoData     OPTIONAL
  604.     );
  605. WINSETUPAPI
  606. BOOL
  607. WINAPI
  608. SetupInstallFromInfSectionW(
  609.     IN HWND                Owner,
  610.     IN HINF                InfHandle,
  611.     IN PCWSTR              SectionName,
  612.     IN UINT                Flags,
  613.     IN HKEY                RelativeKeyRoot,   OPTIONAL
  614.     IN PCWSTR              SourceRootPath,    OPTIONAL
  615.     IN UINT                CopyFlags,         OPTIONAL
  616.     IN PSP_FILE_CALLBACK_W MsgHandler,        OPTIONAL
  617.     IN PVOID               Context,           OPTIONAL
  618.     IN HDEVINFO            DeviceInfoSet,     OPTIONAL
  619.     IN PSP_DEVINFO_DATA    DeviceInfoData     OPTIONAL
  620.     );
  621. #ifdef UNICODE
  622. #define SetupInstallFromInfSection SetupInstallFromInfSectionW
  623. #else
  624. #define SetupInstallFromInfSection SetupInstallFromInfSectionA
  625. #endif
  626. //
  627. // Flags for SetupInstallFromInfSection
  628. //
  629. #define SPINST_LOGCONFIG                0x00000001
  630. #define SPINST_INIFILES                 0x00000002
  631. #define SPINST_REGISTRY                 0x00000004
  632. #define SPINST_INI2REG                  0x00000008
  633. #define SPINST_FILES                    0x00000010
  634. #define SPINST_BITREG                   0x00000020
  635. #define SPINST_REGSVR                   0x00000040
  636. #define SPINST_UNREGSVR                 0x00000080
  637. #define SPINST_PROFILEITEMS             0x00000100
  638. #if _SETUPAPI_VER >= 0x0501
  639. #define SPINST_COPYINF                  0x00000200
  640. #define SPINST_ALL                      0x000003ff
  641. #else
  642. #define SPINST_ALL                      0x000001ff
  643. #endif // _SETUPAPI_VER >= 0x0501
  644. #define SPINST_SINGLESECTION            0x00010000
  645. #define SPINST_LOGCONFIG_IS_FORCED      0x00020000
  646. #define SPINST_LOGCONFIGS_ARE_OVERRIDES 0x00040000
  647. #if _SETUPAPI_VER >= 0x0501
  648. #define SPINST_REGISTERCALLBACKAWARE    0x00080000
  649. #endif // _SETUPAPI_VER >= 0x0501
  650. WINSETUPAPI
  651. BOOL
  652. WINAPI
  653. SetupInstallFilesFromInfSectionA(
  654.     IN HINF     InfHandle,
  655.     IN HINF     LayoutInfHandle,    OPTIONAL
  656.     IN HSPFILEQ FileQueue,
  657.     IN PCSTR    SectionName,
  658.     IN PCSTR    SourceRootPath,     OPTIONAL
  659.     IN UINT     CopyFlags
  660.     );
  661. WINSETUPAPI
  662. BOOL
  663. WINAPI
  664. SetupInstallFilesFromInfSectionW(
  665.     IN HINF     InfHandle,
  666.     IN HINF     LayoutInfHandle,    OPTIONAL
  667.     IN HSPFILEQ FileQueue,
  668.     IN PCWSTR   SectionName,
  669.     IN PCWSTR   SourceRootPath,     OPTIONAL
  670.     IN UINT     CopyFlags
  671.     );
  672. #ifdef UNICODE
  673. #define SetupInstallFilesFromInfSection SetupInstallFilesFromInfSectionW
  674. #else
  675. #define SetupInstallFilesFromInfSection SetupInstallFilesFromInfSectionA
  676. #endif
  677. //
  678. // Flags for SetupInstallServicesFromInfSection(Ex).  These flags are also used
  679. // in the flags field of AddService or DelService lines in a device INF.  Some
  680. // of these flags are not permitted in the non-Ex API.  These flags are marked
  681. // as such below.
  682. //
  683. //
  684. // (AddService) move service's tag to front of its group order list
  685. //
  686. #define SPSVCINST_TAGTOFRONT               (0x00000001)
  687. //
  688. // (AddService) **Ex API only** mark this service as the function driver for the
  689. // device being installed
  690. //
  691. #define SPSVCINST_ASSOCSERVICE             (0x00000002)
  692. //
  693. // (DelService) delete the associated event log entry for a service specified in
  694. // a DelService entry
  695. //
  696. #define SPSVCINST_DELETEEVENTLOGENTRY      (0x00000004)
  697. //
  698. // (AddService) don't overwrite display name if it already exists
  699. //
  700. #define SPSVCINST_NOCLOBBER_DISPLAYNAME    (0x00000008)
  701. //
  702. // (AddService) don't overwrite start type value if service already exists
  703. //
  704. #define SPSVCINST_NOCLOBBER_STARTTYPE      (0x00000010)
  705. //
  706. // (AddService) don't overwrite error control value if service already exists
  707. //
  708. #define SPSVCINST_NOCLOBBER_ERRORCONTROL   (0x00000020)
  709. //
  710. // (AddService) don't overwrite load order group if it already exists
  711. //
  712. #define SPSVCINST_NOCLOBBER_LOADORDERGROUP (0x00000040)
  713. //
  714. // (AddService) don't overwrite dependencies list if it already exists
  715. //
  716. #define SPSVCINST_NOCLOBBER_DEPENDENCIES   (0x00000080)
  717. //
  718. // (AddService) don't overwrite description if it already exists
  719. //
  720. #define SPSVCINST_NOCLOBBER_DESCRIPTION    (0x00000100)
  721. //
  722. // (DelService) stop the associated service specified in
  723. // a DelService entry before deleting the service
  724. //
  725. #define SPSVCINST_STOPSERVICE              (0x00000200)
  726. #if _SETUPAPI_VER >= 0x0501
  727. //
  728. // (AddService) force overwrite of security settings
  729. //
  730. #define SPSVCINST_CLOBBER_SECURITY         (0x00000400)
  731. #endif // _SETUPAPI_VER >= 0x0501
  732. WINSETUPAPI
  733. BOOL
  734. WINAPI
  735. SetupInstallServicesFromInfSectionA(
  736.     IN HINF   InfHandle,
  737.     IN PCSTR  SectionName,
  738.     IN DWORD  Flags
  739.     );
  740. WINSETUPAPI
  741. BOOL
  742. WINAPI
  743. SetupInstallServicesFromInfSectionW(
  744.     IN HINF   InfHandle,
  745.     IN PCWSTR SectionName,
  746.     IN DWORD  Flags
  747.     );
  748. #ifdef UNICODE
  749. #define SetupInstallServicesFromInfSection SetupInstallServicesFromInfSectionW
  750. #else
  751. #define SetupInstallServicesFromInfSection SetupInstallServicesFromInfSectionA
  752. #endif
  753. WINSETUPAPI
  754. BOOL
  755. WINAPI
  756. SetupInstallServicesFromInfSectionExA(
  757.     IN HINF             InfHandle,
  758.     IN PCSTR            SectionName,
  759.     IN DWORD            Flags,
  760.     IN HDEVINFO         DeviceInfoSet,  OPTIONAL
  761.     IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
  762.     IN PVOID            Reserved1,
  763.     IN PVOID            Reserved2
  764.     );
  765. WINSETUPAPI
  766. BOOL
  767. WINAPI
  768. SetupInstallServicesFromInfSectionExW(
  769.     IN HINF             InfHandle,
  770.     IN PCWSTR           SectionName,
  771.     IN DWORD            Flags,
  772.     IN HDEVINFO         DeviceInfoSet,  OPTIONAL
  773.     IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
  774.     IN PVOID            Reserved1,
  775.     IN PVOID            Reserved2
  776.     );
  777. #ifdef UNICODE
  778. #define SetupInstallServicesFromInfSectionEx SetupInstallServicesFromInfSectionExW
  779. #else
  780. #define SetupInstallServicesFromInfSectionEx SetupInstallServicesFromInfSectionExA
  781. #endif
  782. //
  783. // High level routine, usually used via rundll32.dll
  784. // to perform right-click install action on INFs
  785. // May be called directly:
  786. //
  787. // wsprintf(CmdLineBuffer,TEXT("DefaultInstall 132 %s"),InfPath);
  788. // InstallHinfSection(NULL,NULL,CmdLineBuffer,0);
  789. //
  790. VOID
  791. WINAPI
  792. InstallHinfSectionA(
  793.     IN HWND      Window,
  794.     IN HINSTANCE ModuleHandle,
  795.     IN PCSTR     CommandLine,
  796.     IN INT       ShowCommand
  797.     );
  798. VOID
  799. WINAPI
  800. InstallHinfSectionW(
  801.     IN HWND      Window,
  802.     IN HINSTANCE ModuleHandle,
  803.     IN PCWSTR    CommandLine,
  804.     IN INT       ShowCommand
  805.     );
  806. #ifdef UNICODE
  807. #define InstallHinfSection InstallHinfSectionW
  808. #else
  809. #define InstallHinfSection InstallHinfSectionA
  810. #endif
  811. //
  812. // Define handle type for Setup file log.
  813. //
  814. typedef PVOID HSPFILELOG;
  815. WINSETUPAPI
  816. HSPFILELOG
  817. WINAPI
  818. SetupInitializeFileLogA(
  819.     IN PCSTR LogFileName,   OPTIONAL
  820.     IN DWORD Flags
  821.     );
  822. WINSETUPAPI
  823. HSPFILELOG
  824. WINAPI
  825. SetupInitializeFileLogW(
  826.     IN PCWSTR LogFileName,  OPTIONAL
  827.     IN DWORD  Flags
  828.     );
  829. #ifdef UNICODE
  830. #define SetupInitializeFileLog SetupInitializeFileLogW
  831. #else
  832. #define SetupInitializeFileLog SetupInitializeFileLogA
  833. #endif
  834. //
  835. // Flags for SetupInitializeFileLog
  836. //
  837. #define SPFILELOG_SYSTEMLOG     0x00000001  // use system log -- must be Administrator
  838. #define SPFILELOG_FORCENEW      0x00000002  // not valid with SPFILELOG_SYSTEMLOG
  839. #define SPFILELOG_QUERYONLY     0x00000004  // allows non-administrators to read system log
  840. WINSETUPAPI
  841. BOOL
  842. WINAPI
  843. SetupTerminateFileLog(
  844.     IN HSPFILELOG FileLogHandle
  845.     );
  846. WINSETUPAPI
  847. BOOL
  848. WINAPI
  849. SetupLogFileA(
  850.     IN HSPFILELOG FileLogHandle,
  851.     IN PCSTR      LogSectionName,   OPTIONAL
  852.     IN PCSTR      SourceFilename,
  853.     IN PCSTR      TargetFilename,
  854.     IN DWORD      Checksum,         OPTIONAL
  855.     IN PCSTR      DiskTagfile,      OPTIONAL
  856.     IN PCSTR      DiskDescription,  OPTIONAL
  857.     IN PCSTR      OtherInfo,        OPTIONAL
  858.     IN DWORD      Flags
  859.     );
  860. WINSETUPAPI
  861. BOOL
  862. WINAPI
  863. SetupLogFileW(
  864.     IN HSPFILELOG FileLogHandle,
  865.     IN PCWSTR     LogSectionName,   OPTIONAL
  866.     IN PCWSTR     SourceFilename,
  867.     IN PCWSTR     TargetFilename,
  868.     IN DWORD      Checksum,         OPTIONAL
  869.     IN PCWSTR     DiskTagfile,      OPTIONAL
  870.     IN PCWSTR     DiskDescription,  OPTIONAL
  871.     IN PCWSTR     OtherInfo,        OPTIONAL
  872.     IN DWORD      Flags
  873.     );
  874. #ifdef UNICODE
  875. #define SetupLogFile SetupLogFileW
  876. #else
  877. #define SetupLogFile SetupLogFileA
  878. #endif
  879. //
  880. // Flags for SetupLogFile
  881. //
  882. #define SPFILELOG_OEMFILE   0x00000001
  883. WINSETUPAPI
  884. BOOL
  885. WINAPI
  886. SetupRemoveFileLogEntryA(
  887.     IN HSPFILELOG FileLogHandle,
  888.     IN PCSTR      LogSectionName,   OPTIONAL
  889.     IN PCSTR      TargetFilename    OPTIONAL
  890.     );
  891. WINSETUPAPI
  892. BOOL
  893. WINAPI
  894. SetupRemoveFileLogEntryW(
  895.     IN HSPFILELOG FileLogHandle,
  896.     IN PCWSTR     LogSectionName,   OPTIONAL
  897.     IN PCWSTR     TargetFilename    OPTIONAL
  898.     );
  899. #ifdef UNICODE
  900. #define SetupRemoveFileLogEntry SetupRemoveFileLogEntryW
  901. #else
  902. #define SetupRemoveFileLogEntry SetupRemoveFileLogEntryA
  903. #endif
  904. //
  905. // Items retrievable from SetupQueryFileLog()
  906. //
  907. typedef enum {
  908.     SetupFileLogSourceFilename,
  909.     SetupFileLogChecksum,
  910.     SetupFileLogDiskTagfile,
  911.     SetupFileLogDiskDescription,
  912.     SetupFileLogOtherInfo,
  913.     SetupFileLogMax
  914. } SetupFileLogInfo;
  915. WINSETUPAPI
  916. BOOL
  917. WINAPI
  918. SetupQueryFileLogA(
  919.     IN  HSPFILELOG       FileLogHandle,
  920.     IN  PCSTR            LogSectionName,   OPTIONAL
  921.     IN  PCSTR            TargetFilename,
  922.     IN  SetupFileLogInfo DesiredInfo,
  923.     OUT PSTR             DataOut,          OPTIONAL
  924.     IN  DWORD            ReturnBufferSize,
  925.     OUT PDWORD           RequiredSize      OPTIONAL
  926.     );
  927. WINSETUPAPI
  928. BOOL
  929. WINAPI
  930. SetupQueryFileLogW(
  931.     IN  HSPFILELOG       FileLogHandle,
  932.     IN  PCWSTR           LogSectionName,   OPTIONAL
  933.     IN  PCWSTR           TargetFilename,
  934.     IN  SetupFileLogInfo DesiredInfo,
  935.     OUT PWSTR            DataOut,          OPTIONAL
  936.     IN  DWORD            ReturnBufferSize,
  937.     OUT PDWORD           RequiredSize      OPTIONAL
  938.     );
  939. #ifdef UNICODE
  940. #define SetupQueryFileLog SetupQueryFileLogW
  941. #else
  942. #define SetupQueryFileLog SetupQueryFileLogA
  943. #endif
  944. //
  945. // Text logging APIs
  946. //
  947. #define LogSeverity                 DWORD
  948. #define LogSevInformation           0x00000000
  949. #define LogSevWarning               0x00000001
  950. #define LogSevError                 0x00000002
  951. #define LogSevFatalError            0x00000003
  952. #define LogSevMaximum               0x00000004
  953. WINSETUPAPI
  954. BOOL
  955. WINAPI
  956. SetupOpenLog (
  957.     BOOL Erase
  958.     );
  959. WINSETUPAPI
  960. BOOL
  961. WINAPI
  962. SetupLogErrorA (
  963.     IN  LPCSTR              MessageString,
  964.     IN  LogSeverity         Severity
  965.     );
  966. WINSETUPAPI
  967. BOOL
  968. WINAPI
  969. SetupLogErrorW (
  970.     IN  LPCWSTR             MessageString,
  971.     IN  LogSeverity         Severity
  972.     );
  973. #ifdef UNICODE
  974. #define SetupLogError SetupLogErrorW
  975. #else
  976. #define SetupLogError SetupLogErrorA
  977. #endif
  978. WINSETUPAPI
  979. VOID
  980. WINAPI
  981. SetupCloseLog (
  982.     VOID
  983.     );
  984. //
  985. // Backup Information API's
  986. //
  987. WINSETUPAPI
  988. BOOL
  989. WINAPI
  990. SetupGetBackupInformationA(
  991.     IN     HSPFILEQ                     QueueHandle,
  992.     OUT    PSP_BACKUP_QUEUE_PARAMS_A    BackupParams
  993.     );
  994. WINSETUPAPI
  995. BOOL
  996. WINAPI
  997. SetupGetBackupInformationW(
  998.     IN     HSPFILEQ                     QueueHandle,
  999.     OUT    PSP_BACKUP_QUEUE_PARAMS_W    BackupParams
  1000.     );
  1001. #ifdef UNICODE
  1002. #define SetupGetBackupInformation SetupGetBackupInformationW
  1003. #else
  1004. #define SetupGetBackupInformation SetupGetBackupInformationA
  1005. #endif
  1006. #if _SETUPAPI_VER >= 0x0501
  1007. WINSETUPAPI
  1008. BOOL
  1009. WINAPI
  1010. SetupPrepareQueueForRestoreA(
  1011.     IN     HSPFILEQ                     QueueHandle,
  1012.     IN     PCSTR                        BackupPath,
  1013.     IN     DWORD                        RestoreFlags
  1014.     );
  1015. WINSETUPAPI
  1016. BOOL
  1017. WINAPI
  1018. SetupPrepareQueueForRestoreW(
  1019.     IN     HSPFILEQ                     QueueHandle,
  1020.     IN     PCWSTR                       BackupPath,
  1021.     IN     DWORD                        RestoreFlags
  1022.     );
  1023. #ifdef UNICODE
  1024. #define SetupPrepareQueueForRestore SetupPrepareQueueForRestoreW
  1025. #else
  1026. #define SetupPrepareQueueForRestore SetupPrepareQueueForRestoreA
  1027. #endif
  1028. #endif // _SETUPAPI_VER >= 0x0501
  1029. #if _SETUPAPI_VER >= 0x0501
  1030. //
  1031. // Control forcing of Non-Interactive Mode
  1032. // Overriden if SetupAPI is run in non-interactive window session
  1033. //
  1034. WINSETUPAPI
  1035. BOOL
  1036. WINAPI
  1037. SetupSetNonInteractiveMode(
  1038.     IN BOOL NonInteractiveFlag
  1039.     );
  1040. WINSETUPAPI
  1041. BOOL
  1042. WINAPI
  1043. SetupGetNonInteractiveMode(
  1044.     VOID
  1045.     );
  1046. #endif // _SETUPAPI_VER >= 0x0501
  1047. //
  1048. // Device Installer APIs
  1049. //
  1050. WINSETUPAPI
  1051. HDEVINFO
  1052. WINAPI
  1053. SetupDiCreateDeviceInfoList(
  1054.     IN CONST GUID *ClassGuid, OPTIONAL
  1055.     IN HWND        hwndParent OPTIONAL
  1056.     );
  1057. WINSETUPAPI
  1058. HDEVINFO
  1059. WINAPI
  1060. SetupDiCreateDeviceInfoListExA(
  1061.     IN CONST GUID *ClassGuid,   OPTIONAL
  1062.     IN HWND        hwndParent,  OPTIONAL
  1063.     IN PCSTR       MachineName, OPTIONAL
  1064.     IN PVOID       Reserved
  1065.     );
  1066. WINSETUPAPI
  1067. HDEVINFO
  1068. WINAPI
  1069. SetupDiCreateDeviceInfoListExW(
  1070.     IN CONST GUID *ClassGuid,   OPTIONAL
  1071.     IN HWND        hwndParent,  OPTIONAL
  1072.     IN PCWSTR      MachineName, OPTIONAL
  1073.     IN PVOID       Reserved
  1074.     );
  1075. #ifdef UNICODE
  1076. #define SetupDiCreateDeviceInfoListEx SetupDiCreateDeviceInfoListExW
  1077. #else
  1078. #define SetupDiCreateDeviceInfoListEx SetupDiCreateDeviceInfoListExA
  1079. #endif
  1080. WINSETUPAPI
  1081. BOOL
  1082. WINAPI
  1083. SetupDiGetDeviceInfoListClass(
  1084.     IN  HDEVINFO DeviceInfoSet,
  1085.     OUT LPGUID   ClassGuid
  1086.     );
  1087. WINSETUPAPI
  1088. BOOL
  1089. WINAPI
  1090. SetupDiGetDeviceInfoListDetailA(
  1091.     IN  HDEVINFO                       DeviceInfoSet,
  1092.     OUT PSP_DEVINFO_LIST_DETAIL_DATA_A DeviceInfoSetDetailData
  1093.     );
  1094. WINSETUPAPI
  1095. BOOL
  1096. WINAPI
  1097. SetupDiGetDeviceInfoListDetailW(
  1098.     IN  HDEVINFO                       DeviceInfoSet,
  1099.     OUT PSP_DEVINFO_LIST_DETAIL_DATA_W DeviceInfoSetDetailData
  1100.     );
  1101. #ifdef UNICODE
  1102. #define SetupDiGetDeviceInfoListDetail SetupDiGetDeviceInfoListDetailW
  1103. #else
  1104. #define SetupDiGetDeviceInfoListDetail SetupDiGetDeviceInfoListDetailA
  1105. #endif
  1106. //
  1107. // Flags for SetupDiCreateDeviceInfo
  1108. //
  1109. #define DICD_GENERATE_ID        0x00000001
  1110. #define DICD_INHERIT_CLASSDRVS  0x00000002
  1111. WINSETUPAPI
  1112. BOOL
  1113. WINAPI
  1114. SetupDiCreateDeviceInfoA(
  1115.     IN  HDEVINFO          DeviceInfoSet,
  1116.     IN  PCSTR             DeviceName,
  1117.     IN  CONST GUID       *ClassGuid,
  1118.     IN  PCSTR             DeviceDescription, OPTIONAL
  1119.     IN  HWND              hwndParent,        OPTIONAL
  1120.     IN  DWORD             CreationFlags,
  1121.     OUT PSP_DEVINFO_DATA  DeviceInfoData     OPTIONAL
  1122.     );
  1123. WINSETUPAPI
  1124. BOOL
  1125. WINAPI
  1126. SetupDiCreateDeviceInfoW(
  1127.     IN  HDEVINFO          DeviceInfoSet,
  1128.     IN  PCWSTR            DeviceName,
  1129.     IN  CONST GUID       *ClassGuid,
  1130.     IN  PCWSTR            DeviceDescription, OPTIONAL
  1131.     IN  HWND              hwndParent,        OPTIONAL
  1132.     IN  DWORD             CreationFlags,
  1133.     OUT PSP_DEVINFO_DATA  DeviceInfoData     OPTIONAL
  1134.     );
  1135. #ifdef UNICODE
  1136. #define SetupDiCreateDeviceInfo SetupDiCreateDeviceInfoW
  1137. #else
  1138. #define SetupDiCreateDeviceInfo SetupDiCreateDeviceInfoA
  1139. #endif
  1140. //
  1141. // Flags for SetupDiOpenDeviceInfo
  1142. //
  1143. #define DIOD_INHERIT_CLASSDRVS  0x00000002
  1144. #define DIOD_CANCEL_REMOVE      0x00000004
  1145. WINSETUPAPI
  1146. BOOL
  1147. WINAPI
  1148. SetupDiOpenDeviceInfoA(
  1149.     IN  HDEVINFO         DeviceInfoSet,
  1150.     IN  PCSTR            DeviceInstanceId,
  1151.     IN  HWND             hwndParent,       OPTIONAL
  1152.     IN  DWORD            OpenFlags,
  1153.     OUT PSP_DEVINFO_DATA DeviceInfoData    OPTIONAL
  1154.     );
  1155. WINSETUPAPI
  1156. BOOL
  1157. WINAPI
  1158. SetupDiOpenDeviceInfoW(
  1159.     IN  HDEVINFO         DeviceInfoSet,
  1160.     IN  PCWSTR           DeviceInstanceId,
  1161.     IN  HWND             hwndParent,       OPTIONAL
  1162.     IN  DWORD            OpenFlags,
  1163.     OUT PSP_DEVINFO_DATA DeviceInfoData    OPTIONAL
  1164.     );
  1165. #ifdef UNICODE
  1166. #define SetupDiOpenDeviceInfo SetupDiOpenDeviceInfoW
  1167. #else
  1168. #define SetupDiOpenDeviceInfo SetupDiOpenDeviceInfoA
  1169. #endif
  1170. WINSETUPAPI
  1171. BOOL
  1172. WINAPI
  1173. SetupDiGetDeviceInstanceIdA(
  1174.     IN  HDEVINFO         DeviceInfoSet,
  1175.     IN  PSP_DEVINFO_DATA DeviceInfoData,
  1176.     OUT PSTR             DeviceInstanceId,
  1177.     IN  DWORD            DeviceInstanceIdSize,
  1178.     OUT PDWORD           RequiredSize          OPTIONAL
  1179.     );
  1180. WINSETUPAPI
  1181. BOOL
  1182. WINAPI
  1183. SetupDiGetDeviceInstanceIdW(
  1184.     IN  HDEVINFO         DeviceInfoSet,
  1185.     IN  PSP_DEVINFO_DATA DeviceInfoData,
  1186.     OUT PWSTR            DeviceInstanceId,
  1187.     IN  DWORD            DeviceInstanceIdSize,
  1188.     OUT PDWORD           RequiredSize          OPTIONAL
  1189.     );
  1190. #ifdef UNICODE
  1191. #define SetupDiGetDeviceInstanceId SetupDiGetDeviceInstanceIdW
  1192. #else
  1193. #define SetupDiGetDeviceInstanceId SetupDiGetDeviceInstanceIdA
  1194. #endif
  1195. WINSETUPAPI
  1196. BOOL
  1197. WINAPI
  1198. SetupDiDeleteDeviceInfo(
  1199.     IN HDEVINFO         DeviceInfoSet,
  1200.     IN PSP_DEVINFO_DATA DeviceInfoData
  1201.     );
  1202. WINSETUPAPI
  1203. BOOL
  1204. WINAPI
  1205. SetupDiEnumDeviceInfo(
  1206.     IN  HDEVINFO         DeviceInfoSet,
  1207.     IN  DWORD            MemberIndex,
  1208.     OUT PSP_DEVINFO_DATA DeviceInfoData
  1209.     );
  1210. WINSETUPAPI
  1211. BOOL
  1212. WINAPI
  1213. SetupDiDestroyDeviceInfoList(
  1214.     IN HDEVINFO DeviceInfoSet
  1215.     );
  1216. WINSETUPAPI
  1217. BOOL
  1218. WINAPI
  1219. SetupDiEnumDeviceInterfaces(
  1220.     IN  HDEVINFO                   DeviceInfoSet,
  1221.     IN  PSP_DEVINFO_DATA           DeviceInfoData,     OPTIONAL
  1222.     IN  CONST GUID                *InterfaceClassGuid,
  1223.     IN  DWORD                      MemberIndex,
  1224.     OUT PSP_DEVICE_INTERFACE_DATA  DeviceInterfaceData
  1225.     );
  1226. //
  1227. // Backward compatibility--do not use
  1228. //
  1229. #define SetupDiEnumInterfaceDevice SetupDiEnumDeviceInterfaces
  1230. WINSETUPAPI
  1231. BOOL
  1232. WINAPI
  1233. SetupDiCreateDeviceInterfaceA(
  1234.     IN  HDEVINFO                   DeviceInfoSet,
  1235.     IN  PSP_DEVINFO_DATA           DeviceInfoData,
  1236.     IN  CONST GUID                *InterfaceClassGuid,
  1237.     IN  PCSTR                      ReferenceString,    OPTIONAL
  1238.     IN  DWORD                      CreationFlags,
  1239.     OUT PSP_DEVICE_INTERFACE_DATA  DeviceInterfaceData OPTIONAL
  1240.     );
  1241. WINSETUPAPI
  1242. BOOL
  1243. WINAPI
  1244. SetupDiCreateDeviceInterfaceW(
  1245.     IN  HDEVINFO                   DeviceInfoSet,
  1246.     IN  PSP_DEVINFO_DATA           DeviceInfoData,
  1247.     IN  CONST GUID                *InterfaceClassGuid,
  1248.     IN  PCWSTR                     ReferenceString,    OPTIONAL
  1249.     IN  DWORD                      CreationFlags,
  1250.     OUT PSP_DEVICE_INTERFACE_DATA  DeviceInterfaceData OPTIONAL
  1251.     );
  1252. #ifdef UNICODE
  1253. #define SetupDiCreateDeviceInterface SetupDiCreateDeviceInterfaceW
  1254. #else
  1255. #define SetupDiCreateDeviceInterface SetupDiCreateDeviceInterfaceA
  1256. #endif
  1257. //
  1258. // Backward compatibility--do not use.
  1259. //
  1260. #define SetupDiCreateInterfaceDeviceW SetupDiCreateDeviceInterfaceW
  1261. #define SetupDiCreateInterfaceDeviceA SetupDiCreateDeviceInterfaceA
  1262. #ifdef UNICODE
  1263. #define SetupDiCreateInterfaceDevice SetupDiCreateDeviceInterfaceW
  1264. #else
  1265. #define SetupDiCreateInterfaceDevice SetupDiCreateDeviceInterfaceA
  1266. #endif
  1267. //
  1268. // Flags for SetupDiOpenDeviceInterface
  1269. //
  1270. #define DIODI_NO_ADD    0x00000001
  1271. WINSETUPAPI
  1272. BOOL
  1273. WINAPI
  1274. SetupDiOpenDeviceInterfaceA(
  1275.     IN  HDEVINFO                  DeviceInfoSet,
  1276.     IN  PCSTR                     DevicePath,
  1277.     IN  DWORD                     OpenFlags,
  1278.     OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData OPTIONAL
  1279.     );
  1280. WINSETUPAPI
  1281. BOOL
  1282. WINAPI
  1283. SetupDiOpenDeviceInterfaceW(
  1284.     IN  HDEVINFO                  DeviceInfoSet,
  1285.     IN  PCWSTR                    DevicePath,
  1286.     IN  DWORD                     OpenFlags,
  1287.     OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData OPTIONAL
  1288.     );
  1289. #ifdef UNICODE
  1290. #define SetupDiOpenDeviceInterface SetupDiOpenDeviceInterfaceW
  1291. #else
  1292. #define SetupDiOpenDeviceInterface SetupDiOpenDeviceInterfaceA
  1293. #endif
  1294. //
  1295. // Backward compatibility--do not use
  1296. //
  1297. #define SetupDiOpenInterfaceDeviceW SetupDiOpenDeviceInterfaceW
  1298. #define SetupDiOpenInterfaceDeviceA SetupDiOpenDeviceInterfaceA
  1299. #ifdef UNICODE
  1300. #define SetupDiOpenInterfaceDevice SetupDiOpenDeviceInterfaceW
  1301. #else
  1302. #define SetupDiOpenInterfaceDevice SetupDiOpenDeviceInterfaceA
  1303. #endif
  1304. WINSETUPAPI
  1305. BOOL
  1306. WINAPI
  1307. SetupDiGetDeviceInterfaceAlias(
  1308.     IN  HDEVINFO                   DeviceInfoSet,
  1309.     IN  PSP_DEVICE_INTERFACE_DATA  DeviceInterfaceData,
  1310.     IN  CONST GUID                *AliasInterfaceClassGuid,
  1311.     OUT PSP_DEVICE_INTERFACE_DATA  AliasDeviceInterfaceData
  1312.     );
  1313. //
  1314. // Backward compatibility--do not use.
  1315. //
  1316. #define SetupDiGetInterfaceDeviceAlias SetupDiGetDeviceInterfaceAlias
  1317. WINSETUPAPI
  1318. BOOL
  1319. WINAPI
  1320. SetupDiDeleteDeviceInterfaceData(
  1321.     IN HDEVINFO                  DeviceInfoSet,
  1322.     IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData
  1323.     );
  1324. //
  1325. // Backward compatibility--do not use.
  1326. //
  1327. #define SetupDiDeleteInterfaceDeviceData SetupDiDeleteDeviceInterfaceData
  1328. WINSETUPAPI
  1329. BOOL
  1330. WINAPI
  1331. SetupDiRemoveDeviceInterface(
  1332.     IN     HDEVINFO                  DeviceInfoSet,
  1333.     IN OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData
  1334.     );
  1335. //
  1336. // Backward compatibility--do not use.
  1337. //
  1338. #define SetupDiRemoveInterfaceDevice SetupDiRemoveDeviceInterface
  1339. WINSETUPAPI
  1340. BOOL
  1341. WINAPI
  1342. SetupDiGetDeviceInterfaceDetailA(
  1343.     IN  HDEVINFO                           DeviceInfoSet,
  1344.     IN  PSP_DEVICE_INTERFACE_DATA          DeviceInterfaceData,
  1345.     OUT PSP_DEVICE_INTERFACE_DETAIL_DATA_A DeviceInterfaceDetailData,     OPTIONAL
  1346.     IN  DWORD                              DeviceInterfaceDetailDataSize,
  1347.     OUT PDWORD                             RequiredSize,                  OPTIONAL
  1348.     OUT PSP_DEVINFO_DATA                   DeviceInfoData                 OPTIONAL
  1349.     );
  1350. WINSETUPAPI
  1351. BOOL
  1352. WINAPI
  1353. SetupDiGetDeviceInterfaceDetailW(
  1354.     IN  HDEVINFO                           DeviceInfoSet,
  1355.     IN  PSP_DEVICE_INTERFACE_DATA          DeviceInterfaceData,
  1356.     OUT PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData,     OPTIONAL
  1357.     IN  DWORD                              DeviceInterfaceDetailDataSize,
  1358.     OUT PDWORD                             RequiredSize,                  OPTIONAL
  1359.     OUT PSP_DEVINFO_DATA                   DeviceInfoData                 OPTIONAL
  1360.     );
  1361. #ifdef UNICODE
  1362. #define SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceInterfaceDetailW
  1363. #else
  1364. #define SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceInterfaceDetailA
  1365. #endif
  1366. //
  1367. // Backward compatibility--do not use.
  1368. //
  1369. #define SetupDiGetInterfaceDeviceDetailW SetupDiGetDeviceInterfaceDetailW
  1370. #define SetupDiGetInterfaceDeviceDetailA SetupDiGetDeviceInterfaceDetailA
  1371. #ifdef UNICODE
  1372. #define SetupDiGetInterfaceDeviceDetail SetupDiGetDeviceInterfaceDetailW
  1373. #else
  1374. #define SetupDiGetInterfaceDeviceDetail SetupDiGetDeviceInterfaceDetailA
  1375. #endif
  1376. //
  1377. // Default install handler for DIF_INSTALLINTERFACES.
  1378. //
  1379. WINSETUPAPI
  1380. BOOL
  1381. WINAPI
  1382. SetupDiInstallDeviceInterfaces(
  1383.     IN HDEVINFO         DeviceInfoSet,
  1384.     IN PSP_DEVINFO_DATA DeviceInfoData
  1385.     );
  1386. //
  1387. // Backward compatibility--do not use.
  1388. //
  1389. #define SetupDiInstallInterfaceDevices SetupDiInstallDeviceInterfaces
  1390. #if _SETUPAPI_VER >= 0x0501
  1391. WINSETUPAPI
  1392. BOOL
  1393. WINAPI
  1394. SetupDiSetDeviceInterfaceDefault(
  1395.     IN HDEVINFO DeviceInfoSet,
  1396.     IN OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
  1397.     IN DWORD Flags,
  1398.     IN PVOID Reserved
  1399.     );
  1400. #endif // _SETUPAPI_VER >= 0x0501
  1401. //
  1402. // Default install handler for DIF_REGISTERDEVICE
  1403. //
  1404. //
  1405. // Flags for SetupDiRegisterDeviceInfo
  1406. //
  1407. #define SPRDI_FIND_DUPS        0x00000001
  1408. WINSETUPAPI
  1409. BOOL
  1410. WINAPI
  1411. SetupDiRegisterDeviceInfo(
  1412.     IN     HDEVINFO           DeviceInfoSet,
  1413.     IN OUT PSP_DEVINFO_DATA   DeviceInfoData,
  1414.     IN     DWORD              Flags,
  1415.     IN     PSP_DETSIG_CMPPROC CompareProc,      OPTIONAL
  1416.     IN     PVOID              CompareContext,   OPTIONAL
  1417.     OUT    PSP_DEVINFO_DATA   DupDeviceInfoData OPTIONAL
  1418.     );
  1419. //
  1420. // Ordinal values distinguishing between class drivers and
  1421. // device drivers.
  1422. // (Passed in 'DriverType' parameter of driver information list APIs)
  1423. //
  1424. #define SPDIT_NODRIVER           0x00000000
  1425. #define SPDIT_CLASSDRIVER        0x00000001
  1426. #define SPDIT_COMPATDRIVER       0x00000002
  1427. WINSETUPAPI
  1428. BOOL
  1429. WINAPI
  1430. SetupDiBuildDriverInfoList(
  1431.     IN     HDEVINFO         DeviceInfoSet,
  1432.     IN OUT PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
  1433.     IN     DWORD            DriverType
  1434.     );
  1435. WINSETUPAPI
  1436. BOOL
  1437. WINAPI
  1438. SetupDiCancelDriverInfoSearch(
  1439.     IN HDEVINFO DeviceInfoSet
  1440.     );
  1441. WINSETUPAPI
  1442. BOOL
  1443. WINAPI
  1444. SetupDiEnumDriverInfoA(
  1445.     IN  HDEVINFO           DeviceInfoSet,
  1446.     IN  PSP_DEVINFO_DATA   DeviceInfoData, OPTIONAL
  1447.     IN  DWORD              DriverType,
  1448.     IN  DWORD              MemberIndex,
  1449.     OUT PSP_DRVINFO_DATA_A DriverInfoData
  1450.     );
  1451. WINSETUPAPI
  1452. BOOL
  1453. WINAPI
  1454. SetupDiEnumDriverInfoW(
  1455.     IN  HDEVINFO           DeviceInfoSet,
  1456.     IN  PSP_DEVINFO_DATA   DeviceInfoData, OPTIONAL
  1457.     IN  DWORD              DriverType,
  1458.     IN  DWORD              MemberIndex,
  1459.     OUT PSP_DRVINFO_DATA_W DriverInfoData
  1460.     );
  1461. #ifdef UNICODE
  1462. #define SetupDiEnumDriverInfo SetupDiEnumDriverInfoW
  1463. #else
  1464. #define SetupDiEnumDriverInfo SetupDiEnumDriverInfoA
  1465. #endif
  1466. WINSETUPAPI
  1467. BOOL
  1468. WINAPI
  1469. SetupDiGetSelectedDriverA(
  1470.     IN  HDEVINFO           DeviceInfoSet,
  1471.     IN  PSP_DEVINFO_DATA   DeviceInfoData, OPTIONAL
  1472.     OUT PSP_DRVINFO_DATA_A DriverInfoData
  1473.     );
  1474. WINSETUPAPI
  1475. BOOL
  1476. WINAPI
  1477. SetupDiGetSelectedDriverW(
  1478.     IN  HDEVINFO           DeviceInfoSet,
  1479.     IN  PSP_DEVINFO_DATA   DeviceInfoData, OPTIONAL
  1480.     OUT PSP_DRVINFO_DATA_W DriverInfoData
  1481.     );
  1482. #ifdef UNICODE
  1483. #define SetupDiGetSelectedDriver SetupDiGetSelectedDriverW
  1484. #else
  1485. #define SetupDiGetSelectedDriver SetupDiGetSelectedDriverA
  1486. #endif
  1487. WINSETUPAPI
  1488. BOOL
  1489. WINAPI
  1490. SetupDiSetSelectedDriverA(
  1491.     IN     HDEVINFO           DeviceInfoSet,
  1492.     IN     PSP_DEVINFO_DATA   DeviceInfoData, OPTIONAL
  1493.     IN OUT PSP_DRVINFO_DATA_A DriverInfoData  OPTIONAL
  1494.     );
  1495. WINSETUPAPI
  1496. BOOL
  1497. WINAPI
  1498. SetupDiSetSelectedDriverW(
  1499.     IN     HDEVINFO           DeviceInfoSet,
  1500.     IN     PSP_DEVINFO_DATA   DeviceInfoData, OPTIONAL
  1501.     IN OUT PSP_DRVINFO_DATA_W DriverInfoData  OPTIONAL
  1502.     );
  1503. #ifdef UNICODE
  1504. #define SetupDiSetSelectedDriver SetupDiSetSelectedDriverW
  1505. #else
  1506. #define SetupDiSetSelectedDriver SetupDiSetSelectedDriverA
  1507. #endif
  1508. WINSETUPAPI
  1509. BOOL
  1510. WINAPI
  1511. SetupDiGetDriverInfoDetailA(
  1512.     IN  HDEVINFO                  DeviceInfoSet,
  1513.     IN  PSP_DEVINFO_DATA          DeviceInfoData,           OPTIONAL
  1514.     IN  PSP_DRVINFO_DATA_A        DriverInfoData,
  1515.     OUT PSP_DRVINFO_DETAIL_DATA_A DriverInfoDetailData,     OPTIONAL
  1516.     IN  DWORD                     DriverInfoDetailDataSize,
  1517.     OUT PDWORD                    RequiredSize              OPTIONAL
  1518.     );
  1519. WINSETUPAPI
  1520. BOOL
  1521. WINAPI
  1522. SetupDiGetDriverInfoDetailW(
  1523.     IN  HDEVINFO                  DeviceInfoSet,
  1524.     IN  PSP_DEVINFO_DATA          DeviceInfoData,           OPTIONAL
  1525.     IN  PSP_DRVINFO_DATA_W        DriverInfoData,
  1526.     OUT PSP_DRVINFO_DETAIL_DATA_W DriverInfoDetailData,     OPTIONAL
  1527.     IN  DWORD                     DriverInfoDetailDataSize,
  1528.     OUT PDWORD                    RequiredSize              OPTIONAL
  1529.     );
  1530. #ifdef UNICODE
  1531. #define SetupDiGetDriverInfoDetail SetupDiGetDriverInfoDetailW
  1532. #else
  1533. #define SetupDiGetDriverInfoDetail SetupDiGetDriverInfoDetailA
  1534. #endif
  1535. WINSETUPAPI
  1536. BOOL
  1537. WINAPI
  1538. SetupDiDestroyDriverInfoList(
  1539.     IN HDEVINFO         DeviceInfoSet,
  1540.     IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
  1541.     IN DWORD            DriverType
  1542.     );
  1543. //
  1544. // Flags controlling what is included in the device information set built
  1545. // by SetupDiGetClassDevs
  1546. //
  1547. #define DIGCF_DEFAULT           0x00000001  // only valid with DIGCF_DEVICEINTERFACE
  1548. #define DIGCF_PRESENT           0x00000002
  1549. #define DIGCF_ALLCLASSES        0x00000004
  1550. #define DIGCF_PROFILE           0x00000008
  1551. #define DIGCF_DEVICEINTERFACE   0x00000010
  1552. //
  1553. // Backward compatibility--do not use.
  1554. //
  1555. #define DIGCF_INTERFACEDEVICE DIGCF_DEVICEINTERFACE
  1556. WINSETUPAPI
  1557. HDEVINFO
  1558. WINAPI
  1559. SetupDiGetClassDevsA(
  1560.     IN CONST GUID *ClassGuid,  OPTIONAL
  1561.     IN PCSTR       Enumerator, OPTIONAL
  1562.     IN HWND        hwndParent, OPTIONAL
  1563.     IN DWORD       Flags
  1564.     );
  1565. WINSETUPAPI
  1566. HDEVINFO
  1567. WINAPI
  1568. SetupDiGetClassDevsW(
  1569.     IN CONST GUID *ClassGuid,  OPTIONAL
  1570.     IN PCWSTR      Enumerator, OPTIONAL
  1571.     IN HWND        hwndParent, OPTIONAL
  1572.     IN DWORD       Flags
  1573.     );
  1574. #ifdef UNICODE
  1575. #define SetupDiGetClassDevs SetupDiGetClassDevsW
  1576. #else
  1577. #define SetupDiGetClassDevs SetupDiGetClassDevsA
  1578. #endif
  1579. WINSETUPAPI
  1580. HDEVINFO
  1581. WINAPI
  1582. SetupDiGetClassDevsExA(
  1583.     IN CONST GUID *ClassGuid,     OPTIONAL
  1584.     IN PCSTR       Enumerator,    OPTIONAL
  1585.     IN HWND        hwndParent,    OPTIONAL
  1586.     IN DWORD       Flags,
  1587.     IN HDEVINFO    DeviceInfoSet, OPTIONAL
  1588.     IN PCSTR       MachineName,   OPTIONAL
  1589.     IN PVOID       Reserved
  1590.     );
  1591. WINSETUPAPI
  1592. HDEVINFO
  1593. WINAPI
  1594. SetupDiGetClassDevsExW(
  1595.     IN CONST GUID *ClassGuid,     OPTIONAL
  1596.     IN PCWSTR      Enumerator,    OPTIONAL
  1597.     IN HWND        hwndParent,    OPTIONAL
  1598.     IN DWORD       Flags,
  1599.     IN HDEVINFO    DeviceInfoSet, OPTIONAL
  1600.     IN PCWSTR      MachineName,   OPTIONAL
  1601.     IN PVOID       Reserved
  1602.     );
  1603. #ifdef UNICODE
  1604. #define SetupDiGetClassDevsEx SetupDiGetClassDevsExW
  1605. #else
  1606. #define SetupDiGetClassDevsEx SetupDiGetClassDevsExA
  1607. #endif
  1608. WINSETUPAPI
  1609. BOOL
  1610. WINAPI
  1611. SetupDiGetINFClassA(
  1612.     IN  PCSTR  InfName,
  1613.     OUT LPGUID ClassGuid,
  1614.     OUT PSTR   ClassName,
  1615.     IN  DWORD  ClassNameSize,
  1616.     OUT PDWORD RequiredSize   OPTIONAL
  1617.     );
  1618. WINSETUPAPI
  1619. BOOL
  1620. WINAPI
  1621. SetupDiGetINFClassW(
  1622.     IN  PCWSTR InfName,
  1623.     OUT LPGUID ClassGuid,
  1624.     OUT PWSTR  ClassName,
  1625.     IN  DWORD  ClassNameSize,
  1626.     OUT PDWORD RequiredSize   OPTIONAL
  1627.     );
  1628. #ifdef UNICODE
  1629. #define SetupDiGetINFClass SetupDiGetINFClassW
  1630. #else
  1631. #define SetupDiGetINFClass SetupDiGetINFClassA
  1632. #endif
  1633. //
  1634. // Flags controlling exclusion from the class information list built
  1635. // by SetupDiBuildClassInfoList(Ex)
  1636. //
  1637. #define DIBCI_NOINSTALLCLASS   0x00000001
  1638. #define DIBCI_NODISPLAYCLASS   0x00000002
  1639. WINSETUPAPI
  1640. BOOL
  1641. WINAPI
  1642. SetupDiBuildClassInfoList(
  1643.     IN  DWORD  Flags,
  1644.     OUT LPGUID ClassGuidList,
  1645.     IN  DWORD  ClassGuidListSize,
  1646.     OUT PDWORD RequiredSize
  1647.     );
  1648. WINSETUPAPI
  1649. BOOL
  1650. WINAPI
  1651. SetupDiBuildClassInfoListExA(
  1652.     IN  DWORD  Flags,
  1653.     OUT LPGUID ClassGuidList,
  1654.     IN  DWORD  ClassGuidListSize,
  1655.     OUT PDWORD RequiredSize,
  1656.     IN  PCSTR  MachineName,       OPTIONAL
  1657.     IN  PVOID  Reserved
  1658.     );
  1659. WINSETUPAPI
  1660. BOOL
  1661. WINAPI
  1662. SetupDiBuildClassInfoListExW(
  1663.     IN  DWORD  Flags,
  1664.     OUT LPGUID ClassGuidList,
  1665.     IN  DWORD  ClassGuidListSize,
  1666.     OUT PDWORD RequiredSize,
  1667.     IN  PCWSTR MachineName,       OPTIONAL
  1668.     IN  PVOID  Reserved
  1669.     );
  1670. #ifdef UNICODE
  1671. #define SetupDiBuildClassInfoListEx SetupDiBuildClassInfoListExW
  1672. #else
  1673. #define SetupDiBuildClassInfoListEx SetupDiBuildClassInfoListExA
  1674. #endif
  1675. WINSETUPAPI
  1676. BOOL
  1677. WINAPI
  1678. SetupDiGetClassDescriptionA(
  1679.     IN  CONST GUID *ClassGuid,
  1680.     OUT PSTR        ClassDescription,
  1681.     IN  DWORD       ClassDescriptionSize,
  1682.     OUT PDWORD      RequiredSize          OPTIONAL
  1683.     );
  1684. WINSETUPAPI
  1685. BOOL
  1686. WINAPI
  1687. SetupDiGetClassDescriptionW(
  1688.     IN  CONST GUID *ClassGuid,
  1689.     OUT PWSTR       ClassDescription,
  1690.     IN  DWORD       ClassDescriptionSize,
  1691.     OUT PDWORD      RequiredSize          OPTIONAL
  1692.     );
  1693. #ifdef UNICODE
  1694. #define SetupDiGetClassDescription SetupDiGetClassDescriptionW
  1695. #else
  1696. #define SetupDiGetClassDescription SetupDiGetClassDescriptionA
  1697. #endif
  1698. WINSETUPAPI
  1699. BOOL
  1700. WINAPI
  1701. SetupDiGetClassDescriptionExA(
  1702.     IN  CONST GUID *ClassGuid,
  1703.     OUT PSTR        ClassDescription,
  1704.     IN  DWORD       ClassDescriptionSize,
  1705.     OUT PDWORD      RequiredSize,         OPTIONAL
  1706.     IN  PCSTR       MachineName,          OPTIONAL
  1707.     IN  PVOID       Reserved
  1708.     );
  1709. WINSETUPAPI
  1710. BOOL
  1711. WINAPI
  1712. SetupDiGetClassDescriptionExW(
  1713.     IN  CONST GUID *ClassGuid,
  1714.     OUT PWSTR       ClassDescription,
  1715.     IN  DWORD       ClassDescriptionSize,
  1716.     OUT PDWORD      RequiredSize,         OPTIONAL
  1717.     IN  PCWSTR      MachineName,          OPTIONAL
  1718.     IN  PVOID       Reserved
  1719.     );
  1720. #ifdef UNICODE
  1721. #define SetupDiGetClassDescriptionEx SetupDiGetClassDescriptionExW
  1722. #else
  1723. #define SetupDiGetClassDescriptionEx SetupDiGetClassDescriptionExA
  1724. #endif
  1725. WINSETUPAPI
  1726. BOOL
  1727. WINAPI
  1728. SetupDiCallClassInstaller(
  1729.     IN DI_FUNCTION      InstallFunction,
  1730.     IN HDEVINFO         DeviceInfoSet,
  1731.     IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  1732.     );
  1733. //
  1734. // Default install handler for DIF_SELECTDEVICE
  1735. //
  1736. WINSETUPAPI
  1737. BOOL
  1738. WINAPI
  1739. SetupDiSelectDevice(
  1740.     IN     HDEVINFO         DeviceInfoSet,
  1741.     IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  1742.     );
  1743. //
  1744. // Default install handler for DIF_SELECTBESTCOMPATDRV
  1745. //
  1746. WINSETUPAPI
  1747. BOOL
  1748. WINAPI
  1749. SetupDiSelectBestCompatDrv(
  1750.     IN     HDEVINFO         DeviceInfoSet,
  1751.     IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  1752.     );
  1753. //
  1754. // Default install handler for DIF_INSTALLDEVICE
  1755. //
  1756. WINSETUPAPI
  1757. BOOL
  1758. WINAPI
  1759. SetupDiInstallDevice(
  1760.     IN     HDEVINFO         DeviceInfoSet,
  1761.     IN OUT PSP_DEVINFO_DATA DeviceInfoData
  1762.     );
  1763. //
  1764. // Default install handler for DIF_INSTALLDEVICEFILES
  1765. //
  1766. WINSETUPAPI
  1767. BOOL
  1768. WINAPI
  1769. SetupDiInstallDriverFiles(
  1770.     IN HDEVINFO         DeviceInfoSet,
  1771.     IN PSP_DEVINFO_DATA DeviceInfoData
  1772.     );
  1773. //
  1774. // Default install handler for DIF_REGISTER_COINSTALLERS
  1775. //
  1776. WINSETUPAPI
  1777. BOOL
  1778. WINAPI
  1779. SetupDiRegisterCoDeviceInstallers(
  1780.     IN HDEVINFO         DeviceInfoSet,
  1781.     IN PSP_DEVINFO_DATA DeviceInfoData
  1782.     );
  1783. //
  1784. // Default install handler for DIF_REMOVE
  1785. //
  1786. WINSETUPAPI
  1787. BOOL
  1788. WINAPI
  1789. SetupDiRemoveDevice(
  1790.     IN     HDEVINFO         DeviceInfoSet,
  1791.     IN OUT PSP_DEVINFO_DATA DeviceInfoData
  1792.     );
  1793. //
  1794. // Default install handler for DIF_UNREMOVE
  1795. //
  1796. WINSETUPAPI
  1797. BOOL
  1798. WINAPI
  1799. SetupDiUnremoveDevice(
  1800.     IN     HDEVINFO         DeviceInfoSet,
  1801.     IN OUT PSP_DEVINFO_DATA DeviceInfoData
  1802.     );
  1803. //
  1804. // Default install handler for DIF_MOVEDEVICE
  1805. //
  1806. WINSETUPAPI
  1807. BOOL
  1808. WINAPI
  1809. SetupDiMoveDuplicateDevice(
  1810.     IN HDEVINFO         DeviceInfoSet,
  1811.     IN PSP_DEVINFO_DATA DestinationDeviceInfoData
  1812.     );
  1813. //
  1814. // Default install handler for DIF_PROPERTYCHANGE
  1815. //
  1816. WINSETUPAPI
  1817. BOOL
  1818. WINAPI
  1819. SetupDiChangeState(
  1820.     IN     HDEVINFO         DeviceInfoSet,
  1821.     IN OUT PSP_DEVINFO_DATA DeviceInfoData
  1822.     );
  1823. WINSETUPAPI
  1824. BOOL
  1825. WINAPI
  1826. SetupDiInstallClassA(
  1827.     IN HWND     hwndParent,  OPTIONAL
  1828.     IN PCSTR    InfFileName,
  1829.     IN DWORD    Flags,
  1830.     IN HSPFILEQ FileQueue    OPTIONAL
  1831.     );
  1832. WINSETUPAPI
  1833. BOOL
  1834. WINAPI
  1835. SetupDiInstallClassW(
  1836.     IN HWND     hwndParent,  OPTIONAL
  1837.     IN PCWSTR   InfFileName,
  1838.     IN DWORD    Flags,
  1839.     IN HSPFILEQ FileQueue    OPTIONAL
  1840.     );
  1841. #ifdef UNICODE
  1842. #define SetupDiInstallClass SetupDiInstallClassW
  1843. #else
  1844. #define SetupDiInstallClass SetupDiInstallClassA
  1845. #endif
  1846. WINSETUPAPI
  1847. BOOL
  1848. WINAPI
  1849. SetupDiInstallClassExA(
  1850.     IN HWND        hwndParent,         OPTIONAL
  1851.     IN PCSTR       InfFileName,        OPTIONAL
  1852.     IN DWORD       Flags,
  1853.     IN HSPFILEQ    FileQueue,          OPTIONAL
  1854.     IN CONST GUID *InterfaceClassGuid, OPTIONAL
  1855.     IN PVOID       Reserved1,
  1856.     IN PVOID       Reserved2
  1857.     );
  1858. WINSETUPAPI
  1859. BOOL
  1860. WINAPI
  1861. SetupDiInstallClassExW(
  1862.     IN HWND        hwndParent,         OPTIONAL
  1863.     IN PCWSTR      InfFileName,        OPTIONAL
  1864.     IN DWORD       Flags,
  1865.     IN HSPFILEQ    FileQueue,          OPTIONAL
  1866.     IN CONST GUID *InterfaceClassGuid, OPTIONAL
  1867.     IN PVOID       Reserved1,
  1868.     IN PVOID       Reserved2
  1869.     );
  1870. #ifdef UNICODE
  1871. #define SetupDiInstallClassEx SetupDiInstallClassExW
  1872. #else
  1873. #define SetupDiInstallClassEx SetupDiInstallClassExA
  1874. #endif
  1875. WINSETUPAPI
  1876. HKEY
  1877. WINAPI
  1878. SetupDiOpenClassRegKey(
  1879.     IN CONST GUID *ClassGuid, OPTIONAL
  1880.     IN REGSAM      samDesired
  1881.     );
  1882. //
  1883. // Flags for SetupDiOpenClassRegKeyEx
  1884. //
  1885. #define DIOCR_INSTALLER   0x00000001    // class installer registry branch
  1886. #define DIOCR_INTERFACE   0x00000002    // interface class registry branch
  1887. WINSETUPAPI
  1888. HKEY
  1889. WINAPI
  1890. SetupDiOpenClassRegKeyExA(
  1891.     IN CONST GUID *ClassGuid,   OPTIONAL
  1892.     IN REGSAM      samDesired,
  1893.     IN DWORD       Flags,
  1894.     IN PCSTR       MachineName, OPTIONAL
  1895.     IN PVOID       Reserved
  1896.     );
  1897. WINSETUPAPI
  1898. HKEY
  1899. WINAPI
  1900. SetupDiOpenClassRegKeyExW(
  1901.     IN CONST GUID *ClassGuid,   OPTIONAL
  1902.     IN REGSAM      samDesired,
  1903.     IN DWORD       Flags,
  1904.     IN PCWSTR      MachineName, OPTIONAL
  1905.     IN PVOID       Reserved
  1906.     );
  1907. #ifdef UNICODE
  1908. #define SetupDiOpenClassRegKeyEx SetupDiOpenClassRegKeyExW
  1909. #else
  1910. #define SetupDiOpenClassRegKeyEx SetupDiOpenClassRegKeyExA
  1911. #endif
  1912. WINSETUPAPI
  1913. HKEY
  1914. WINAPI
  1915. SetupDiCreateDeviceInterfaceRegKeyA(
  1916.     IN HDEVINFO                  DeviceInfoSet,
  1917.     IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
  1918.     IN DWORD                     Reserved,
  1919.     IN REGSAM                    samDesired,
  1920.     IN HINF                      InfHandle,           OPTIONAL
  1921.     IN PCSTR                     InfSectionName       OPTIONAL
  1922.     );
  1923. WINSETUPAPI
  1924. HKEY
  1925. WINAPI
  1926. SetupDiCreateDeviceInterfaceRegKeyW(
  1927.     IN HDEVINFO                  DeviceInfoSet,
  1928.     IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
  1929.     IN DWORD                     Reserved,
  1930.     IN REGSAM                    samDesired,
  1931.     IN HINF                      InfHandle,           OPTIONAL
  1932.     IN PCWSTR                    InfSectionName       OPTIONAL
  1933.     );
  1934. #ifdef UNICODE
  1935. #define SetupDiCreateDeviceInterfaceRegKey SetupDiCreateDeviceInterfaceRegKeyW
  1936. #else
  1937. #define SetupDiCreateDeviceInterfaceRegKey SetupDiCreateDeviceInterfaceRegKeyA
  1938. #endif
  1939. //
  1940. // Backward compatibility--do not use.
  1941. //
  1942. #define SetupDiCreateInterfaceDeviceRegKeyW SetupDiCreateDeviceInterfaceRegKeyW
  1943. #define SetupDiCreateInterfaceDeviceRegKeyA SetupDiCreateDeviceInterfaceRegKeyA
  1944. #ifdef UNICODE
  1945. #define SetupDiCreateInterfaceDeviceRegKey SetupDiCreateDeviceInterfaceRegKeyW
  1946. #else
  1947. #define SetupDiCreateInterfaceDeviceRegKey SetupDiCreateDeviceInterfaceRegKeyA
  1948. #endif
  1949. WINSETUPAPI
  1950. HKEY
  1951. WINAPI
  1952. SetupDiOpenDeviceInterfaceRegKey(
  1953.     IN HDEVINFO                  DeviceInfoSet,
  1954.     IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
  1955.     IN DWORD                     Reserved,
  1956.     IN REGSAM                    samDesired
  1957.     );
  1958. //
  1959. // Backward compatibility--do not use.
  1960. //
  1961. #define SetupDiOpenInterfaceDeviceRegKey SetupDiOpenDeviceInterfaceRegKey
  1962. WINSETUPAPI
  1963. BOOL
  1964. WINAPI
  1965. SetupDiDeleteDeviceInterfaceRegKey(
  1966.     IN HDEVINFO                  DeviceInfoSet,
  1967.     IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData,
  1968.     IN DWORD                     Reserved
  1969.     );
  1970. //
  1971. // Backward compatibility--do not use.
  1972. //
  1973. #define SetupDiDeleteInterfaceDeviceRegKey SetupDiDeleteDeviceInterfaceRegKey
  1974. //
  1975. // KeyType values for SetupDiCreateDevRegKey, SetupDiOpenDevRegKey, and
  1976. // SetupDiDeleteDevRegKey.
  1977. //
  1978. #define DIREG_DEV       0x00000001          // Open/Create/Delete device key
  1979. #define DIREG_DRV       0x00000002          // Open/Create/Delete driver key
  1980. #define DIREG_BOTH      0x00000004          // Delete both driver and Device key
  1981. WINSETUPAPI
  1982. HKEY
  1983. WINAPI
  1984. SetupDiCreateDevRegKeyA(
  1985.     IN HDEVINFO         DeviceInfoSet,
  1986.     IN PSP_DEVINFO_DATA DeviceInfoData,
  1987.     IN DWORD            Scope,
  1988.     IN DWORD            HwProfile,
  1989.     IN DWORD            KeyType,
  1990.     IN HINF             InfHandle,      OPTIONAL
  1991.     IN PCSTR            InfSectionName  OPTIONAL
  1992.     );
  1993. WINSETUPAPI
  1994. HKEY
  1995. WINAPI
  1996. SetupDiCreateDevRegKeyW(
  1997.     IN HDEVINFO         DeviceInfoSet,
  1998.     IN PSP_DEVINFO_DATA DeviceInfoData,
  1999.     IN DWORD            Scope,
  2000.     IN DWORD            HwProfile,
  2001.     IN DWORD            KeyType,
  2002.     IN HINF             InfHandle,      OPTIONAL
  2003.     IN PCWSTR           InfSectionName  OPTIONAL
  2004.     );
  2005. #ifdef UNICODE
  2006. #define SetupDiCreateDevRegKey SetupDiCreateDevRegKeyW
  2007. #else
  2008. #define SetupDiCreateDevRegKey SetupDiCreateDevRegKeyA
  2009. #endif
  2010. WINSETUPAPI
  2011. HKEY
  2012. WINAPI
  2013. SetupDiOpenDevRegKey(
  2014.     IN HDEVINFO         DeviceInfoSet,
  2015.     IN PSP_DEVINFO_DATA DeviceInfoData,
  2016.     IN DWORD            Scope,
  2017.     IN DWORD            HwProfile,
  2018.     IN DWORD            KeyType,
  2019.     IN REGSAM           samDesired
  2020.     );
  2021. WINSETUPAPI
  2022. BOOL
  2023. WINAPI
  2024. SetupDiDeleteDevRegKey(
  2025.     IN HDEVINFO         DeviceInfoSet,
  2026.     IN PSP_DEVINFO_DATA DeviceInfoData,
  2027.     IN DWORD            Scope,
  2028.     IN DWORD            HwProfile,
  2029.     IN DWORD            KeyType
  2030.     );
  2031. WINSETUPAPI
  2032. BOOL
  2033. WINAPI
  2034. SetupDiGetHwProfileList(
  2035.     OUT PDWORD HwProfileList,
  2036.     IN  DWORD  HwProfileListSize,
  2037.     OUT PDWORD RequiredSize,
  2038.     OUT PDWORD CurrentlyActiveIndex OPTIONAL
  2039.     );
  2040. WINSETUPAPI
  2041. BOOL
  2042. WINAPI
  2043. SetupDiGetHwProfileListExA(
  2044.     OUT PDWORD HwProfileList,
  2045.     IN  DWORD  HwProfileListSize,
  2046.     OUT PDWORD RequiredSize,
  2047.     OUT PDWORD CurrentlyActiveIndex, OPTIONAL
  2048.     IN  PCSTR  MachineName,          OPTIONAL
  2049.     IN  PVOID  Reserved
  2050.     );
  2051. WINSETUPAPI
  2052. BOOL
  2053. WINAPI
  2054. SetupDiGetHwProfileListExW(
  2055.     OUT PDWORD HwProfileList,
  2056.     IN  DWORD  HwProfileListSize,
  2057.     OUT PDWORD RequiredSize,
  2058.     OUT PDWORD CurrentlyActiveIndex, OPTIONAL
  2059.     IN  PCWSTR MachineName,          OPTIONAL
  2060.     IN  PVOID  Reserved
  2061.     );
  2062. #ifdef UNICODE
  2063. #define SetupDiGetHwProfileListEx SetupDiGetHwProfileListExW
  2064. #else
  2065. #define SetupDiGetHwProfileListEx SetupDiGetHwProfileListExA
  2066. #endif
  2067. //
  2068. // Device registry property codes
  2069. // (Codes marked as read-only (R) may only be used for
  2070. // SetupDiGetDeviceRegistryProperty)
  2071. //
  2072. // These values should cover the same set of registry properties
  2073. // as defined by the CM_DRP codes in cfgmgr32.h.
  2074. //
  2075. // Note that SPDRP codes are zero based while CM_DRP codes are one based!
  2076. //
  2077. #define SPDRP_DEVICEDESC                  (0x00000000)  // DeviceDesc (R/W)
  2078. #define SPDRP_HARDWAREID                  (0x00000001)  // HardwareID (R/W)
  2079. #define SPDRP_COMPATIBLEIDS               (0x00000002)  // CompatibleIDs (R/W)
  2080. #define SPDRP_UNUSED0                     (0x00000003)  // unused
  2081. #define SPDRP_SERVICE                     (0x00000004)  // Service (R/W)
  2082. #define SPDRP_UNUSED1                     (0x00000005)  // unused
  2083. #define SPDRP_UNUSED2                     (0x00000006)  // unused
  2084. #define SPDRP_CLASS                       (0x00000007)  // Class (R--tied to ClassGUID)
  2085. #define SPDRP_CLASSGUID                   (0x00000008)  // ClassGUID (R/W)
  2086. #define SPDRP_DRIVER                      (0x00000009)  // Driver (R/W)
  2087. #define SPDRP_CONFIGFLAGS                 (0x0000000A)  // ConfigFlags (R/W)
  2088. #define SPDRP_MFG                         (0x0000000B)  // Mfg (R/W)
  2089. #define SPDRP_FRIENDLYNAME                (0x0000000C)  // FriendlyName (R/W)
  2090. #define SPDRP_LOCATION_INFORMATION        (0x0000000D)  // LocationInformation (R/W)
  2091. #define SPDRP_PHYSICAL_DEVICE_OBJECT_NAME (0x0000000E)  // PhysicalDeviceObjectName (R)
  2092. #define SPDRP_CAPABILITIES                (0x0000000F)  // Capabilities (R)
  2093. #define SPDRP_UI_NUMBER                   (0x00000010)  // UiNumber (R)
  2094. #define SPDRP_UPPERFILTERS                (0x00000011)  // UpperFilters (R/W)
  2095. #define SPDRP_LOWERFILTERS                (0x00000012)  // LowerFilters (R/W)
  2096. #define SPDRP_BUSTYPEGUID                 (0x00000013)  // BusTypeGUID (R)
  2097. #define SPDRP_LEGACYBUSTYPE               (0x00000014)  // LegacyBusType (R)
  2098. #define SPDRP_BUSNUMBER                   (0x00000015)  // BusNumber (R)
  2099. #define SPDRP_ENUMERATOR_NAME             (0x00000016)  // Enumerator Name (R)
  2100. #define SPDRP_SECURITY                    (0x00000017)  // Security (R/W, binary form)
  2101. #define SPDRP_SECURITY_SDS                (0x00000018)  // Security (W, SDS form)
  2102. #define SPDRP_DEVTYPE                     (0x00000019)  // Device Type (R/W)
  2103. #define SPDRP_EXCLUSIVE                   (0x0000001A)  // Device is exclusive-access (R/W)
  2104. #define SPDRP_CHARACTERISTICS             (0x0000001B)  // Device Characteristics (R/W)
  2105. #define SPDRP_ADDRESS                     (0x0000001C)  // Device Address (R)
  2106. #define SPDRP_UI_NUMBER_DESC_FORMAT       (0X0000001D)  // UiNumberDescFormat (R/W)
  2107. #define SPDRP_DEVICE_POWER_DATA           (0x0000001E)  // Device Power Data (R)
  2108. #define SPDRP_REMOVAL_POLICY              (0x0000001F)  // Removal Policy (R)
  2109. #define SPDRP_REMOVAL_POLICY_HW_DEFAULT   (0x00000020)  // Hardware Removal Policy (R)
  2110. #define SPDRP_REMOVAL_POLICY_OVERRIDE     (0x00000021)  // Removal Policy Override (RW)
  2111. #define SPDRP_INSTALL_STATE               (0x00000022)  // Device Install State (R)
  2112. #define SPDRP_MAXIMUM_PROPERTY            (0x00000023)  // Upper bound on ordinals
  2113. //
  2114. // Class registry property codes
  2115. // (Codes marked as read-only (R) may only be used for
  2116. // SetupDiGetClassRegistryProperty)
  2117. //
  2118. // These values should cover the same set of registry properties
  2119. // as defined by the CM_CRP codes in cfgmgr32.h.
  2120. // they should also have a 1:1 correspondence with Device registers, where applicable
  2121. // but no overlap otherwise
  2122. //
  2123. #define SPCRP_SECURITY                    (0x00000017)  // Security (R/W, binary form)
  2124. #define SPCRP_SECURITY_SDS                (0x00000018)  // Security (W, SDS form)
  2125. #define SPCRP_DEVTYPE                     (0x00000019)  // Device Type (R/W)
  2126. #define SPCRP_EXCLUSIVE                   (0x0000001A)  // Device is exclusive-access (R/W)
  2127. #define SPCRP_CHARACTERISTICS             (0x0000001B)  // Device Characteristics (R/W)
  2128. #define SPCRP_MAXIMUM_PROPERTY            (0x0000001C)  // Upper bound on ordinals
  2129. WINSETUPAPI
  2130. BOOL
  2131. WINAPI
  2132. SetupDiGetDeviceRegistryPropertyA(
  2133.     IN  HDEVINFO         DeviceInfoSet,
  2134.     IN  PSP_DEVINFO_DATA DeviceInfoData,
  2135.     IN  DWORD            Property,
  2136.     OUT PDWORD           PropertyRegDataType, OPTIONAL
  2137.     OUT PBYTE            PropertyBuffer,
  2138.     IN  DWORD            PropertyBufferSize,
  2139.     OUT PDWORD           RequiredSize         OPTIONAL
  2140.     );
  2141. WINSETUPAPI
  2142. BOOL
  2143. WINAPI
  2144. SetupDiGetDeviceRegistryPropertyW(
  2145.     IN  HDEVINFO         DeviceInfoSet,
  2146.     IN  PSP_DEVINFO_DATA DeviceInfoData,
  2147.     IN  DWORD            Property,
  2148.     OUT PDWORD           PropertyRegDataType, OPTIONAL
  2149.     OUT PBYTE            PropertyBuffer,
  2150.     IN  DWORD            PropertyBufferSize,
  2151.     OUT PDWORD           RequiredSize         OPTIONAL
  2152.     );
  2153. #ifdef UNICODE
  2154. #define SetupDiGetDeviceRegistryProperty SetupDiGetDeviceRegistryPropertyW
  2155. #else
  2156. #define SetupDiGetDeviceRegistryProperty SetupDiGetDeviceRegistryPropertyA
  2157. #endif
  2158. WINSETUPAPI
  2159. BOOL
  2160. WINAPI
  2161. SetupDiGetClassRegistryPropertyA(
  2162.     IN  CONST GUID      *ClassGuid,
  2163.     IN  DWORD            Property,
  2164.     OUT PDWORD           PropertyRegDataType, OPTIONAL
  2165.     OUT PBYTE            PropertyBuffer,
  2166.     IN  DWORD            PropertyBufferSize,
  2167.     OUT PDWORD           RequiredSize,        OPTIONAL
  2168.     IN  PCSTR            MachineName,         OPTIONAL
  2169.     IN  PVOID            Reserved
  2170.     );
  2171. WINSETUPAPI
  2172. BOOL
  2173. WINAPI
  2174. SetupDiGetClassRegistryPropertyW(
  2175.     IN  CONST GUID      *ClassGuid,
  2176.     IN  DWORD            Property,
  2177.     OUT PDWORD           PropertyRegDataType, OPTIONAL
  2178.     OUT PBYTE            PropertyBuffer,
  2179.     IN  DWORD            PropertyBufferSize,
  2180.     OUT PDWORD           RequiredSize,        OPTIONAL
  2181.     IN  PCWSTR           MachineName,         OPTIONAL
  2182.     IN  PVOID            Reserved
  2183.     );
  2184. #ifdef UNICODE
  2185. #define SetupDiGetClassRegistryProperty SetupDiGetClassRegistryPropertyW
  2186. #else
  2187. #define SetupDiGetClassRegistryProperty SetupDiGetClassRegistryPropertyA
  2188. #endif
  2189. WINSETUPAPI
  2190. BOOL
  2191. WINAPI
  2192. SetupDiSetDeviceRegistryPropertyA(
  2193.     IN     HDEVINFO         DeviceInfoSet,
  2194.     IN OUT PSP_DEVINFO_DATA DeviceInfoData,
  2195.     IN     DWORD            Property,
  2196.     IN     CONST BYTE*      PropertyBuffer,    OPTIONAL
  2197.     IN     DWORD            PropertyBufferSize
  2198.     );
  2199. WINSETUPAPI
  2200. BOOL
  2201. WINAPI
  2202. SetupDiSetDeviceRegistryPropertyW(
  2203.     IN     HDEVINFO         DeviceInfoSet,
  2204.     IN OUT PSP_DEVINFO_DATA DeviceInfoData,
  2205.     IN     DWORD            Property,
  2206.     IN     CONST BYTE*      PropertyBuffer,    OPTIONAL
  2207.     IN     DWORD            PropertyBufferSize
  2208.     );
  2209. #ifdef UNICODE
  2210. #define SetupDiSetDeviceRegistryProperty SetupDiSetDeviceRegistryPropertyW
  2211. #else
  2212. #define SetupDiSetDeviceRegistryProperty SetupDiSetDeviceRegistryPropertyA
  2213. #endif
  2214. WINSETUPAPI
  2215. BOOL
  2216. WINAPI
  2217. SetupDiSetClassRegistryPropertyA(
  2218.     IN     CONST GUID      *ClassGuid,
  2219.     IN     DWORD            Property,
  2220.     IN     CONST BYTE*      PropertyBuffer,    OPTIONAL
  2221.     IN     DWORD            PropertyBufferSize,
  2222.     IN     PCSTR            MachineName,       OPTIONAL
  2223.     IN     PVOID            Reserved
  2224.     );
  2225. WINSETUPAPI
  2226. BOOL
  2227. WINAPI
  2228. SetupDiSetClassRegistryPropertyW(
  2229.     IN     CONST GUID      *ClassGuid,
  2230.     IN     DWORD            Property,
  2231.     IN     CONST BYTE*      PropertyBuffer,    OPTIONAL
  2232.     IN     DWORD            PropertyBufferSize,
  2233.     IN     PCWSTR           MachineName,       OPTIONAL
  2234.     IN     PVOID            Reserved
  2235.     );
  2236. #ifdef UNICODE
  2237. #define SetupDiSetClassRegistryProperty SetupDiSetClassRegistryPropertyW
  2238. #else
  2239. #define SetupDiSetClassRegistryProperty SetupDiSetClassRegistryPropertyA
  2240. #endif
  2241. WINSETUPAPI
  2242. BOOL
  2243. WINAPI
  2244. SetupDiGetDeviceInstallParamsA(
  2245.     IN  HDEVINFO                DeviceInfoSet,
  2246.     IN  PSP_DEVINFO_DATA        DeviceInfoData,          OPTIONAL
  2247.     OUT PSP_DEVINSTALL_PARAMS_A DeviceInstallParams
  2248.     );
  2249. WINSETUPAPI
  2250. BOOL
  2251. WINAPI
  2252. SetupDiGetDeviceInstallParamsW(
  2253.     IN  HDEVINFO                DeviceInfoSet,
  2254.     IN  PSP_DEVINFO_DATA        DeviceInfoData,          OPTIONAL
  2255.     OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams
  2256.     );
  2257. #ifdef UNICODE
  2258. #define SetupDiGetDeviceInstallParams SetupDiGetDeviceInstallParamsW
  2259. #else
  2260. #define SetupDiGetDeviceInstallParams SetupDiGetDeviceInstallParamsA
  2261. #endif
  2262. WINSETUPAPI
  2263. BOOL
  2264. WINAPI
  2265. SetupDiGetClassInstallParamsA(
  2266.     IN  HDEVINFO                DeviceInfoSet,
  2267.     IN  PSP_DEVINFO_DATA        DeviceInfoData,         OPTIONAL
  2268.     OUT PSP_CLASSINSTALL_HEADER ClassInstallParams,     OPTIONAL
  2269.     IN  DWORD                   ClassInstallParamsSize,
  2270.     OUT PDWORD                  RequiredSize            OPTIONAL
  2271.     );
  2272. WINSETUPAPI
  2273. BOOL
  2274. WINAPI
  2275. SetupDiGetClassInstallParamsW(
  2276.     IN  HDEVINFO                DeviceInfoSet,
  2277.     IN  PSP_DEVINFO_DATA        DeviceInfoData,         OPTIONAL
  2278.     OUT PSP_CLASSINSTALL_HEADER ClassInstallParams,     OPTIONAL
  2279.     IN  DWORD                   ClassInstallParamsSize,
  2280.     OUT PDWORD                  RequiredSize            OPTIONAL
  2281.     );
  2282. #ifdef UNICODE
  2283. #define SetupDiGetClassInstallParams SetupDiGetClassInstallParamsW
  2284. #else
  2285. #define SetupDiGetClassInstallParams SetupDiGetClassInstallParamsA
  2286. #endif
  2287. WINSETUPAPI
  2288. BOOL
  2289. WINAPI
  2290. SetupDiSetDeviceInstallParamsA(
  2291.     IN HDEVINFO                DeviceInfoSet,
  2292.     IN PSP_DEVINFO_DATA        DeviceInfoData,     OPTIONAL
  2293.     IN PSP_DEVINSTALL_PARAMS_A DeviceInstallParams
  2294.     );
  2295. WINSETUPAPI
  2296. BOOL
  2297. WINAPI
  2298. SetupDiSetDeviceInstallParamsW(
  2299.     IN HDEVINFO                DeviceInfoSet,
  2300.     IN PSP_DEVINFO_DATA        DeviceInfoData,     OPTIONAL
  2301.     IN PSP_DEVINSTALL_PARAMS_W DeviceInstallParams
  2302.     );
  2303. #ifdef UNICODE
  2304. #define SetupDiSetDeviceInstallParams SetupDiSetDeviceInstallParamsW
  2305. #else
  2306. #define SetupDiSetDeviceInstallParams SetupDiSetDeviceInstallParamsA
  2307. #endif
  2308. WINSETUPAPI
  2309. BOOL
  2310. WINAPI
  2311. SetupDiSetClassInstallParamsA(
  2312.     IN HDEVINFO                DeviceInfoSet,
  2313.     IN PSP_DEVINFO_DATA        DeviceInfoData,        OPTIONAL
  2314.     IN PSP_CLASSINSTALL_HEADER ClassInstallParams,    OPTIONAL
  2315.     IN DWORD                   ClassInstallParamsSize
  2316.     );
  2317. WINSETUPAPI
  2318. BOOL
  2319. WINAPI
  2320. SetupDiSetClassInstallParamsW(
  2321.     IN HDEVINFO                DeviceInfoSet,
  2322.     IN PSP_DEVINFO_DATA        DeviceInfoData,        OPTIONAL
  2323.     IN PSP_CLASSINSTALL_HEADER ClassInstallParams,    OPTIONAL
  2324.     IN DWORD                   ClassInstallParamsSize
  2325.     );
  2326. #ifdef UNICODE
  2327. #define SetupDiSetClassInstallParams SetupDiSetClassInstallParamsW
  2328. #else
  2329. #define SetupDiSetClassInstallParams SetupDiSetClassInstallParamsA
  2330. #endif
  2331. WINSETUPAPI
  2332. BOOL
  2333. WINAPI
  2334. SetupDiGetDriverInstallParamsA(
  2335.     IN  HDEVINFO              DeviceInfoSet,
  2336.     IN  PSP_DEVINFO_DATA      DeviceInfoData,     OPTIONAL
  2337.     IN  PSP_DRVINFO_DATA_A    DriverInfoData,
  2338.     OUT PSP_DRVINSTALL_PARAMS DriverInstallParams
  2339.     );
  2340. WINSETUPAPI
  2341. BOOL
  2342. WINAPI
  2343. SetupDiGetDriverInstallParamsW(
  2344.     IN  HDEVINFO              DeviceInfoSet,
  2345.     IN  PSP_DEVINFO_DATA      DeviceInfoData,     OPTIONAL
  2346.     IN  PSP_DRVINFO_DATA_W    DriverInfoData,
  2347.     OUT PSP_DRVINSTALL_PARAMS DriverInstallParams
  2348.     );
  2349. #ifdef UNICODE
  2350. #define SetupDiGetDriverInstallParams SetupDiGetDriverInstallParamsW
  2351. #else
  2352. #define SetupDiGetDriverInstallParams SetupDiGetDriverInstallParamsA
  2353. #endif
  2354. WINSETUPAPI
  2355. BOOL
  2356. WINAPI
  2357. SetupDiSetDriverInstallParamsA(
  2358.     IN HDEVINFO              DeviceInfoSet,
  2359.     IN PSP_DEVINFO_DATA      DeviceInfoData,     OPTIONAL
  2360.     IN PSP_DRVINFO_DATA_A    DriverInfoData,
  2361.     IN PSP_DRVINSTALL_PARAMS DriverInstallParams
  2362.     );
  2363. WINSETUPAPI
  2364. BOOL
  2365. WINAPI
  2366. SetupDiSetDriverInstallParamsW(
  2367.     IN HDEVINFO              DeviceInfoSet,
  2368.     IN PSP_DEVINFO_DATA      DeviceInfoData,     OPTIONAL
  2369.     IN PSP_DRVINFO_DATA_W    DriverInfoData,
  2370.     IN PSP_DRVINSTALL_PARAMS DriverInstallParams
  2371.     );
  2372. #ifdef UNICODE
  2373. #define SetupDiSetDriverInstallParams SetupDiSetDriverInstallParamsW
  2374. #else
  2375. #define SetupDiSetDriverInstallParams SetupDiSetDriverInstallParamsA
  2376. #endif
  2377. WINSETUPAPI
  2378. BOOL
  2379. WINAPI
  2380. SetupDiLoadClassIcon(
  2381.     IN  CONST GUID *ClassGuid,
  2382.     OUT HICON      *LargeIcon,    OPTIONAL
  2383.     OUT PINT        MiniIconIndex OPTIONAL
  2384.     );
  2385. //
  2386. // Flags controlling the drawing of mini-icons
  2387. //
  2388. #define DMI_MASK      0x00000001
  2389. #define DMI_BKCOLOR   0x00000002
  2390. #define DMI_USERECT   0x00000004
  2391. WINSETUPAPI
  2392. INT
  2393. WINAPI
  2394. SetupDiDrawMiniIcon(
  2395.     IN HDC   hdc,
  2396.     IN RECT  rc,
  2397.     IN INT   MiniIconIndex,
  2398.     IN DWORD Flags
  2399.     );
  2400. WINSETUPAPI
  2401. BOOL
  2402. WINAPI
  2403. SetupDiGetClassBitmapIndex(
  2404.     IN  CONST GUID *ClassGuid,    OPTIONAL
  2405.     OUT PINT        MiniIconIndex
  2406.     );
  2407. WINSETUPAPI
  2408. BOOL
  2409. WINAPI
  2410. SetupDiGetClassImageList(
  2411.     OUT PSP_CLASSIMAGELIST_DATA ClassImageListData
  2412.     );
  2413. WINSETUPAPI
  2414. BOOL
  2415. WINAPI
  2416. SetupDiGetClassImageListExA(
  2417.     OUT PSP_CLASSIMAGELIST_DATA ClassImageListData,
  2418.     IN  PCSTR                   MachineName,        OPTIONAL
  2419.     IN  PVOID                   Reserved
  2420.     );
  2421. WINSETUPAPI
  2422. BOOL
  2423. WINAPI
  2424. SetupDiGetClassImageListExW(
  2425.     OUT PSP_CLASSIMAGELIST_DATA ClassImageListData,
  2426.     IN  PCWSTR                  MachineName,        OPTIONAL
  2427.     IN  PVOID                   Reserved
  2428.     );
  2429. #ifdef UNICODE
  2430. #define SetupDiGetClassImageListEx SetupDiGetClassImageListExW
  2431. #else
  2432. #define SetupDiGetClassImageListEx SetupDiGetClassImageListExA
  2433. #endif
  2434. WINSETUPAPI
  2435. BOOL
  2436. WINAPI
  2437. SetupDiGetClassImageIndex(
  2438.     IN  PSP_CLASSIMAGELIST_DATA  ClassImageListData,
  2439.     IN  CONST GUID              *ClassGuid,
  2440.     OUT PINT                     ImageIndex
  2441.     );
  2442. WINSETUPAPI
  2443. BOOL
  2444. WINAPI
  2445. SetupDiDestroyClassImageList(
  2446.     IN PSP_CLASSIMAGELIST_DATA ClassImageListData
  2447.     );
  2448. //
  2449. // PropertySheetType values for the SetupDiGetClassDevPropertySheets API
  2450. //
  2451. #define DIGCDP_FLAG_BASIC           0x00000001
  2452. #define DIGCDP_FLAG_ADVANCED        0x00000002
  2453. #if _SETUPAPI_VER >= 0x0501
  2454. #define DIGCDP_FLAG_REMOTE_BASIC    0x00000003
  2455. #define DIGCDP_FLAG_REMOTE_ADVANCED 0x00000004
  2456. #endif // _SETUPAPI_VER >= 0x0501
  2457. WINSETUPAPI
  2458. BOOL
  2459. WINAPI
  2460. SetupDiGetClassDevPropertySheetsA(
  2461.     IN  HDEVINFO           DeviceInfoSet,
  2462.     IN  PSP_DEVINFO_DATA   DeviceInfoData,                  OPTIONAL
  2463.     IN  LPPROPSHEETHEADERA PropertySheetHeader,
  2464.     IN  DWORD              PropertySheetHeaderPageListSize,
  2465.     OUT PDWORD             RequiredSize,                    OPTIONAL
  2466.     IN  DWORD              PropertySheetType
  2467.     );
  2468. WINSETUPAPI
  2469. BOOL
  2470. WINAPI
  2471. SetupDiGetClassDevPropertySheetsW(
  2472.     IN  HDEVINFO           DeviceInfoSet,
  2473.     IN  PSP_DEVINFO_DATA   DeviceInfoData,                  OPTIONAL
  2474.     IN  LPPROPSHEETHEADERW PropertySheetHeader,
  2475.     IN  DWORD              PropertySheetHeaderPageListSize,
  2476.     OUT PDWORD             RequiredSize,                    OPTIONAL
  2477.     IN  DWORD              PropertySheetType
  2478.     );
  2479. #ifdef UNICODE
  2480. #define SetupDiGetClassDevPropertySheets SetupDiGetClassDevPropertySheetsW
  2481. #else
  2482. #define SetupDiGetClassDevPropertySheets SetupDiGetClassDevPropertySheetsA
  2483. #endif
  2484. //
  2485. // Define ICON IDs publicly exposed from setupapi.
  2486. //
  2487. #define IDI_RESOURCEFIRST           159
  2488. #define IDI_RESOURCE                159
  2489. #define IDI_RESOURCELAST            161
  2490. #define IDI_RESOURCEOVERLAYFIRST    161
  2491. #define IDI_RESOURCEOVERLAYLAST     161
  2492. #define IDI_CONFLICT                161
  2493. #define IDI_CLASSICON_OVERLAYFIRST  500
  2494. #define IDI_CLASSICON_OVERLAYLAST   502
  2495. #define IDI_PROBLEM_OVL             500
  2496. #define IDI_DISABLED_OVL            501
  2497. #define IDI_FORCED_OVL              502
  2498. WINSETUPAPI
  2499. BOOL
  2500. WINAPI
  2501. SetupDiAskForOEMDisk(
  2502.     IN HDEVINFO         DeviceInfoSet,
  2503.     IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  2504.     );
  2505. WINSETUPAPI
  2506. BOOL
  2507. WINAPI
  2508. SetupDiSelectOEMDrv(
  2509.     IN     HWND             hwndParent,    OPTIONAL
  2510.     IN     HDEVINFO         DeviceInfoSet,
  2511.     IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  2512.     );
  2513. WINSETUPAPI
  2514. BOOL
  2515. WINAPI
  2516. SetupDiClassNameFromGuidA(
  2517.     IN  CONST GUID *ClassGuid,
  2518.     OUT PSTR        ClassName,
  2519.     IN  DWORD       ClassNameSize,
  2520.     OUT PDWORD      RequiredSize   OPTIONAL
  2521.     );
  2522. WINSETUPAPI
  2523. BOOL
  2524. WINAPI
  2525. SetupDiClassNameFromGuidW(
  2526.     IN  CONST GUID *ClassGuid,
  2527.     OUT PWSTR       ClassName,
  2528.     IN  DWORD       ClassNameSize,
  2529.     OUT PDWORD      RequiredSize   OPTIONAL
  2530.     );
  2531. #ifdef UNICODE
  2532. #define SetupDiClassNameFromGuid SetupDiClassNameFromGuidW
  2533. #else
  2534. #define SetupDiClassNameFromGuid SetupDiClassNameFromGuidA
  2535. #endif
  2536. WINSETUPAPI
  2537. BOOL
  2538. WINAPI
  2539. SetupDiClassNameFromGuidExA(
  2540.     IN  CONST GUID *ClassGuid,
  2541.     OUT PSTR        ClassName,
  2542.     IN  DWORD       ClassNameSize,
  2543.     OUT PDWORD      RequiredSize,  OPTIONAL
  2544.     IN  PCSTR       MachineName,   OPTIONAL
  2545.     IN  PVOID       Reserved
  2546.     );
  2547. WINSETUPAPI
  2548. BOOL
  2549. WINAPI
  2550. SetupDiClassNameFromGuidExW(
  2551.     IN  CONST GUID *ClassGuid,
  2552.     OUT PWSTR       ClassName,
  2553.     IN  DWORD       ClassNameSize,
  2554.     OUT PDWORD      RequiredSize,  OPTIONAL
  2555.     IN  PCWSTR      MachineName,   OPTIONAL
  2556.     IN  PVOID       Reserved
  2557.     );
  2558. #ifdef UNICODE
  2559. #define SetupDiClassNameFromGuidEx SetupDiClassNameFromGuidExW
  2560. #else
  2561. #define SetupDiClassNameFromGuidEx SetupDiClassNameFromGuidExA
  2562. #endif
  2563. WINSETUPAPI
  2564. BOOL
  2565. WINAPI
  2566. SetupDiClassGuidsFromNameA(
  2567.     IN  PCSTR  ClassName,
  2568.     OUT LPGUID ClassGuidList,
  2569.     IN  DWORD  ClassGuidListSize,
  2570.     OUT PDWORD RequiredSize
  2571.     );
  2572. WINSETUPAPI
  2573. BOOL
  2574. WINAPI
  2575. SetupDiClassGuidsFromNameW(
  2576.     IN  PCWSTR ClassName,
  2577.     OUT LPGUID ClassGuidList,
  2578.     IN  DWORD  ClassGuidListSize,
  2579.     OUT PDWORD RequiredSize
  2580.     );
  2581. #ifdef UNICODE
  2582. #define SetupDiClassGuidsFromName SetupDiClassGuidsFromNameW
  2583. #else
  2584. #define SetupDiClassGuidsFromName SetupDiClassGuidsFromNameA
  2585. #endif
  2586. WINSETUPAPI
  2587. BOOL
  2588. WINAPI
  2589. SetupDiClassGuidsFromNameExA(
  2590.     IN  PCSTR  ClassName,
  2591.     OUT LPGUID ClassGuidList,
  2592.     IN  DWORD  ClassGuidListSize,
  2593.     OUT PDWORD RequiredSize,
  2594.     IN  PCSTR  MachineName,       OPTIONAL
  2595.     IN  PVOID  Reserved
  2596.     );
  2597. WINSETUPAPI
  2598. BOOL
  2599. WINAPI
  2600. SetupDiClassGuidsFromNameExW(
  2601.     IN  PCWSTR ClassName,
  2602.     OUT LPGUID ClassGuidList,
  2603.     IN  DWORD  ClassGuidListSize,
  2604.     OUT PDWORD RequiredSize,
  2605.     IN  PCWSTR MachineName,       OPTIONAL
  2606.     IN  PVOID  Reserved
  2607.     );
  2608. #ifdef UNICODE
  2609. #define SetupDiClassGuidsFromNameEx SetupDiClassGuidsFromNameExW
  2610. #else
  2611. #define SetupDiClassGuidsFromNameEx SetupDiClassGuidsFromNameExA
  2612. #endif
  2613. WINSETUPAPI
  2614. BOOL
  2615. WINAPI
  2616. SetupDiGetHwProfileFriendlyNameA(
  2617.     IN  DWORD  HwProfile,
  2618.     OUT PSTR   FriendlyName,
  2619.     IN  DWORD  FriendlyNameSize,
  2620.     OUT PDWORD RequiredSize      OPTIONAL
  2621.     );
  2622. WINSETUPAPI
  2623. BOOL
  2624. WINAPI
  2625. SetupDiGetHwProfileFriendlyNameW(
  2626.     IN  DWORD  HwProfile,
  2627.     OUT PWSTR  FriendlyName,
  2628.     IN  DWORD  FriendlyNameSize,
  2629.     OUT PDWORD RequiredSize      OPTIONAL
  2630.     );
  2631. #ifdef UNICODE
  2632. #define SetupDiGetHwProfileFriendlyName SetupDiGetHwProfileFriendlyNameW
  2633. #else
  2634. #define SetupDiGetHwProfileFriendlyName SetupDiGetHwProfileFriendlyNameA
  2635. #endif
  2636. WINSETUPAPI
  2637. BOOL
  2638. WINAPI
  2639. SetupDiGetHwProfileFriendlyNameExA(
  2640.     IN  DWORD  HwProfile,
  2641.     OUT PSTR   FriendlyName,
  2642.     IN  DWORD  FriendlyNameSize,
  2643.     OUT PDWORD RequiredSize,     OPTIONAL
  2644.     IN  PCSTR  MachineName,      OPTIONAL
  2645.     IN  PVOID  Reserved
  2646.     );
  2647. WINSETUPAPI
  2648. BOOL
  2649. WINAPI
  2650. SetupDiGetHwProfileFriendlyNameExW(
  2651.     IN  DWORD  HwProfile,
  2652.     OUT PWSTR  FriendlyName,
  2653.     IN  DWORD  FriendlyNameSize,
  2654.     OUT PDWORD RequiredSize,     OPTIONAL
  2655.     IN  PCWSTR MachineName,      OPTIONAL
  2656.     IN  PVOID  Reserved
  2657.     );
  2658. #ifdef UNICODE
  2659. #define SetupDiGetHwProfileFriendlyNameEx SetupDiGetHwProfileFriendlyNameExW
  2660. #else
  2661. #define SetupDiGetHwProfileFriendlyNameEx SetupDiGetHwProfileFriendlyNameExA
  2662. #endif
  2663. //
  2664. // PageType values for SetupDiGetWizardPage API
  2665. //
  2666. #define SPWPT_SELECTDEVICE      0x00000001
  2667. //
  2668. // Flags for SetupDiGetWizardPage API
  2669. //
  2670. #define SPWP_USE_DEVINFO_DATA   0x00000001
  2671. WINSETUPAPI
  2672. HPROPSHEETPAGE
  2673. WINAPI
  2674. SetupDiGetWizardPage(
  2675.     IN HDEVINFO               DeviceInfoSet,
  2676.     IN PSP_DEVINFO_DATA       DeviceInfoData,    OPTIONAL
  2677.     IN PSP_INSTALLWIZARD_DATA InstallWizardData,
  2678.     IN DWORD                  PageType,
  2679.     IN DWORD                  Flags
  2680.     );
  2681. WINSETUPAPI
  2682. BOOL
  2683. WINAPI
  2684. SetupDiGetSelectedDevice(
  2685.     IN  HDEVINFO         DeviceInfoSet,
  2686.     OUT PSP_DEVINFO_DATA DeviceInfoData
  2687.     );
  2688. WINSETUPAPI
  2689. BOOL
  2690. WINAPI
  2691. SetupDiSetSelectedDevice(
  2692.     IN HDEVINFO         DeviceInfoSet,
  2693.     IN PSP_DEVINFO_DATA DeviceInfoData
  2694.     );
  2695. WINSETUPAPI
  2696. BOOL
  2697. WINAPI
  2698. SetupDiGetActualSectionToInstallA(
  2699.     IN  HINF    InfHandle,
  2700.     IN  PCSTR   InfSectionName,
  2701.     OUT PSTR    InfSectionWithExt,     OPTIONAL
  2702.     IN  DWORD   InfSectionWithExtSize,
  2703.     OUT PDWORD  RequiredSize,          OPTIONAL
  2704.     OUT PSTR   *Extension              OPTIONAL
  2705.     );
  2706. WINSETUPAPI
  2707. BOOL
  2708. WINAPI
  2709. SetupDiGetActualSectionToInstallW(
  2710.     IN  HINF    InfHandle,
  2711.     IN  PCWSTR  InfSectionName,
  2712.     OUT PWSTR   InfSectionWithExt,     OPTIONAL
  2713.     IN  DWORD   InfSectionWithExtSize,
  2714.     OUT PDWORD  RequiredSize,          OPTIONAL
  2715.     OUT PWSTR  *Extension              OPTIONAL
  2716.     );
  2717. #ifdef UNICODE
  2718. #define SetupDiGetActualSectionToInstall SetupDiGetActualSectionToInstallW
  2719. #else
  2720. #define SetupDiGetActualSectionToInstall SetupDiGetActualSectionToInstallA
  2721. #endif
  2722. #if _SETUPAPI_VER >= 0x0501
  2723. WINSETUPAPI
  2724. BOOL
  2725. WINAPI
  2726. SetupDiGetActualSectionToInstallExA(
  2727.     IN  HINF                  InfHandle,
  2728.     IN  PCSTR                 InfSectionName,
  2729.     IN  PSP_ALTPLATFORM_INFO  AlternatePlatformInfo, OPTIONAL
  2730.     OUT PSTR                  InfSectionWithExt,     OPTIONAL
  2731.     IN  DWORD                 InfSectionWithExtSize,
  2732.     OUT PDWORD                RequiredSize,          OPTIONAL
  2733.     OUT PSTR                 *Extension,             OPTIONAL
  2734.     IN  PVOID                 Reserved
  2735.     );
  2736. WINSETUPAPI
  2737. BOOL
  2738. WINAPI
  2739. SetupDiGetActualSectionToInstallExW(
  2740.     IN  HINF                  InfHandle,
  2741.     IN  PCWSTR                InfSectionName,
  2742.     IN  PSP_ALTPLATFORM_INFO  AlternatePlatformInfo, OPTIONAL
  2743.     OUT PWSTR                 InfSectionWithExt,     OPTIONAL
  2744.     IN  DWORD                 InfSectionWithExtSize,
  2745.     OUT PDWORD                RequiredSize,          OPTIONAL
  2746.     OUT PWSTR                *Extension,             OPTIONAL
  2747.     IN  PVOID                 Reserved
  2748.     );
  2749. #ifdef UNICODE
  2750. #define SetupDiGetActualSectionToInstallEx SetupDiGetActualSectionToInstallExW
  2751. #else
  2752. #define SetupDiGetActualSectionToInstallEx SetupDiGetActualSectionToInstallExA
  2753. #endif
  2754. #endif // _SETUPAPI_VER >= 0x0501
  2755. #if _SETUPAPI_VER >= 0x0501
  2756. //
  2757. // SetupEnumInfSections is for low-level parsing of an INF
  2758. //
  2759. WINSETUPAPI
  2760. BOOL
  2761. WINAPI
  2762. SetupEnumInfSectionsA (
  2763.     IN  HINF        InfHandle,
  2764.     IN  UINT        Index,
  2765.     OUT PSTR        Buffer,         OPTIONAL
  2766.     IN  UINT        Size,           OPTIONAL
  2767.     OUT UINT        *SizeNeeded     OPTIONAL
  2768.     );
  2769. WINSETUPAPI
  2770. BOOL
  2771. WINAPI
  2772. SetupEnumInfSectionsW (
  2773.     IN  HINF        InfHandle,
  2774.     IN  UINT        Index,
  2775.     OUT PWSTR       Buffer,         OPTIONAL
  2776.     IN  UINT        Size,           OPTIONAL
  2777.     OUT UINT        *SizeNeeded     OPTIONAL
  2778.     );
  2779. #ifdef UNICODE
  2780. #define SetupEnumInfSections SetupEnumInfSectionsW
  2781. #else
  2782. #define SetupEnumInfSections SetupEnumInfSectionsA
  2783. #endif
  2784. #endif // _SETUPAPI_VER >= 0x0501
  2785. #if _SETUPAPI_VER >= 0x0501
  2786. typedef struct _SP_INF_SIGNER_INFO_A {
  2787.     DWORD  cbSize;
  2788.     CHAR   CatalogFile[MAX_PATH];
  2789.     CHAR   DigitalSigner[MAX_PATH];
  2790.     CHAR   DigitalSignerVersion[MAX_PATH];
  2791. } SP_INF_SIGNER_INFO_A, *PSP_INF_SIGNER_INFO_A;
  2792. typedef struct _SP_INF_SIGNER_INFO_W {
  2793.     DWORD  cbSize;
  2794.     WCHAR  CatalogFile[MAX_PATH];
  2795.     WCHAR  DigitalSigner[MAX_PATH];
  2796.     WCHAR  DigitalSignerVersion[MAX_PATH];
  2797. } SP_INF_SIGNER_INFO_W, *PSP_INF_SIGNER_INFO_W;
  2798. #ifdef UNICODE
  2799. typedef SP_INF_SIGNER_INFO_W SP_INF_SIGNER_INFO;
  2800. typedef PSP_INF_SIGNER_INFO_W PSP_INF_SIGNER_INFO;
  2801. #else
  2802. typedef SP_INF_SIGNER_INFO_A SP_INF_SIGNER_INFO;
  2803. typedef PSP_INF_SIGNER_INFO_A PSP_INF_SIGNER_INFO;
  2804. #endif
  2805. WINSETUPAPI
  2806. BOOL
  2807. WINAPI
  2808. SetupVerifyInfFileA(
  2809.     IN  PCSTR                   InfName,
  2810.     IN  PSP_ALTPLATFORM_INFO    AltPlatformInfo,                OPTIONAL
  2811.     OUT PSP_INF_SIGNER_INFO_A   InfSignerInfo
  2812.     );
  2813. WINSETUPAPI
  2814. BOOL
  2815. WINAPI
  2816. SetupVerifyInfFileW(
  2817.     IN  PCWSTR                  InfName,
  2818.     IN  PSP_ALTPLATFORM_INFO    AltPlatformInfo,                OPTIONAL
  2819.     OUT PSP_INF_SIGNER_INFO_W   InfSignerInfo
  2820.     );
  2821. #ifdef UNICODE
  2822. #define SetupVerifyInfFile SetupVerifyInfFileW
  2823. #else
  2824. #define SetupVerifyInfFile SetupVerifyInfFileA
  2825. #endif
  2826. #endif // _SETUPAPI_VER >= 0x0501
  2827. #if _SETUPAPI_VER >= 0x0501
  2828. //
  2829. // Flags for use by SetupDiGetCustomDeviceProperty
  2830. //
  2831. #define DICUSTOMDEVPROP_MERGE_MULTISZ    0x00000001
  2832. WINSETUPAPI
  2833. BOOL
  2834. WINAPI
  2835. SetupDiGetCustomDevicePropertyA(
  2836.     IN  HDEVINFO         DeviceInfoSet,
  2837.     IN  PSP_DEVINFO_DATA DeviceInfoData,
  2838.     IN  PCSTR            CustomPropertyName,
  2839.     IN  DWORD            Flags,
  2840.     OUT PDWORD           PropertyRegDataType, OPTIONAL
  2841.     OUT PBYTE            PropertyBuffer,
  2842.     IN  DWORD            PropertyBufferSize,
  2843.     OUT PDWORD           RequiredSize         OPTIONAL
  2844.     );
  2845. WINSETUPAPI
  2846. BOOL
  2847. WINAPI
  2848. SetupDiGetCustomDevicePropertyW(
  2849.     IN  HDEVINFO         DeviceInfoSet,
  2850.     IN  PSP_DEVINFO_DATA DeviceInfoData,
  2851.     IN  PCWSTR           CustomPropertyName,
  2852.     IN  DWORD            Flags,
  2853.     OUT PDWORD           PropertyRegDataType, OPTIONAL
  2854.     OUT PBYTE            PropertyBuffer,
  2855.     IN  DWORD            PropertyBufferSize,
  2856.     OUT PDWORD           RequiredSize         OPTIONAL
  2857.     );
  2858. #ifdef UNICODE
  2859. #define SetupDiGetCustomDeviceProperty SetupDiGetCustomDevicePropertyW
  2860. #else
  2861. #define SetupDiGetCustomDeviceProperty SetupDiGetCustomDevicePropertyA
  2862. #endif
  2863. #endif // _SETUPAPI_VER >= 0x0501
  2864. #ifdef __cplusplus
  2865. }
  2866. #endif
  2867. #include <poppack.h>
  2868. #endif // _INC_SETUPAPI