Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3421 lines
100 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. cfgmgr32.h
  5. Abstract:
  6. This module contains the user APIs for the Configuration Manager,
  7. along with any public data structures needed to call these APIs.
  8. --*/
  9. #ifndef _CFGMGR32_H_
  10. #define _CFGMGR32_H_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #include <cfg.h>
  15. #ifndef GUID_DEFINED
  16. #include <guiddef.h>
  17. #endif /* GUID_DEFINED */
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #if !defined (_CFGMGR32_)
  22. #define CMAPI DECLSPEC_IMPORT
  23. #else
  24. #define CMAPI
  25. #endif
  26. typedef CONST VOID *PCVOID;
  27. //--------------------------------------------------------------
  28. // General size definitions
  29. //--------------------------------------------------------------
  30. #define MAX_DEVICE_ID_LEN 200
  31. #define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
  32. #define MAX_GUID_STRING_LEN 39 // 38 chars + terminator null
  33. #define MAX_CLASS_NAME_LEN 32
  34. #define MAX_PROFILE_LEN 80
  35. #define MAX_CONFIG_VALUE 9999
  36. #define MAX_INSTANCE_VALUE 9999
  37. #define MAX_MEM_REGISTERS 9 // Win95 compatibility--not applicable to 32-bit ConfigMgr
  38. #define MAX_IO_PORTS 20 // Win95 compatibility--not applicable to 32-bit ConfigMgr
  39. #define MAX_IRQS 7 // Win95 compatibility--not applicable to 32-bit ConfigMgr
  40. #define MAX_DMA_CHANNELS 7 // Win95 compatibility--not applicable to 32-bit ConfigMgr
  41. #define DWORD_MAX 0xFFFFFFFF
  42. #define DWORDLONG_MAX 0xFFFFFFFFFFFFFFFF
  43. #define CONFIGMG_VERSION 0x0400
  44. //--------------------------------------------------------------
  45. // Data types
  46. //--------------------------------------------------------------
  47. //
  48. // Work around weirdness with Win32 typedef...
  49. //
  50. #ifdef NT_INCLUDED
  51. //
  52. // __int64 is only supported by 2.0 and later midl.
  53. // __midl is set by the 2.0 midl and not by 1.0 midl.
  54. //
  55. #if (!defined(MIDL_PASS) || defined(__midl)) && (!defined(_M_IX86) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64))
  56. typedef unsigned __int64 DWORDLONG;
  57. #else
  58. typedef double DWORDLONG;
  59. #endif
  60. typedef DWORDLONG *PDWORDLONG;
  61. #endif /* NT_INCLUDED */
  62. //
  63. // Standardized Return Value data type
  64. //
  65. typedef DWORD RETURN_TYPE;
  66. typedef RETURN_TYPE CONFIGRET;
  67. //
  68. // Device Instance Handle data type
  69. //
  70. typedef DWORD DEVNODE, DEVINST;
  71. typedef DEVNODE *PDEVNODE, *PDEVINST;
  72. //
  73. // Device Instance Identifier data type
  74. // The device instance ID specifies the registry path, relative to the
  75. // Enum key , for a device instance. For example: \Root\*PNP0500\0000.
  76. //
  77. typedef CHAR *DEVNODEID_A, *DEVINSTID_A; // Device ID ANSI name.
  78. typedef WCHAR *DEVNODEID_W, *DEVINSTID_W; // Device ID Unicode name.
  79. #ifdef UNICODE
  80. typedef DEVNODEID_W DEVNODEID;
  81. typedef DEVINSTID_W DEVINSTID;
  82. #else
  83. typedef DEVNODEID_A DEVNODEID;
  84. typedef DEVINSTID_A DEVINSTID;
  85. #endif
  86. //
  87. // Logical Configuration Handle data type
  88. //
  89. typedef DWORD_PTR LOG_CONF;
  90. typedef LOG_CONF *PLOG_CONF;
  91. //
  92. // Resource Descriptor Handle data type
  93. //
  94. typedef DWORD_PTR RES_DES;
  95. typedef RES_DES *PRES_DES;
  96. //
  97. // Resource ID data type (may take any of the ResType_* values)
  98. //
  99. typedef ULONG RESOURCEID;
  100. typedef RESOURCEID *PRESOURCEID;
  101. //
  102. // Priority data type (may take any of the LCPRI_* values)
  103. //
  104. typedef ULONG PRIORITY;
  105. typedef PRIORITY *PPRIORITY;
  106. //
  107. // Range List Handle data type
  108. //
  109. typedef DWORD_PTR RANGE_LIST;
  110. typedef RANGE_LIST *PRANGE_LIST;
  111. //
  112. // Range Element Handle data type
  113. //
  114. typedef DWORD_PTR RANGE_ELEMENT;
  115. typedef RANGE_ELEMENT *PRANGE_ELEMENT;
  116. //
  117. // Machine Handle data type
  118. //
  119. typedef HANDLE HMACHINE;
  120. typedef HMACHINE *PHMACHINE;
  121. //
  122. // Conflict List data types
  123. //
  124. typedef ULONG_PTR CONFLICT_LIST;
  125. typedef CONFLICT_LIST *PCONFLICT_LIST;
  126. typedef struct _CONFLICT_DETAILS_A {
  127. ULONG CD_ulSize; // size of structure, ie: sizeof(CONFLICT_DETAILS)
  128. ULONG CD_ulMask; // indicates what information is required/valid
  129. DEVINST CD_dnDevInst; // filled with DevInst of conflicting device if CM_CDMASK_DEVINST set
  130. RES_DES CD_rdResDes; // filled with a ResDes of conflict if CM_CDMASK_RESDES set
  131. ULONG CD_ulFlags; // various flags regarding conflict
  132. CHAR CD_szDescription[MAX_PATH]; // description of conflicting device
  133. } CONFLICT_DETAILS_A , *PCONFLICT_DETAILS_A;
  134. typedef struct _CONFLICT_DETAILS_W {
  135. ULONG CD_ulSize; // size of structure, ie: sizeof(CONFLICT_DETAILS)
  136. ULONG CD_ulMask; // indicates what information is required/valid
  137. DEVINST CD_dnDevInst; // filled with DevInst of conflicting device if CM_CDMASK_DEVINST set
  138. RES_DES CD_rdResDes; // filled with a ResDes of conflict if CM_CDMASK_RESDES set
  139. ULONG CD_ulFlags; // various flags regarding conflict
  140. WCHAR CD_szDescription[MAX_PATH]; // description of conflicting device
  141. } CONFLICT_DETAILS_W , *PCONFLICT_DETAILS_W;
  142. #ifdef UNICODE
  143. typedef CONFLICT_DETAILS_W CONFLICT_DETAILS;
  144. typedef PCONFLICT_DETAILS_W PCONFLICT_DETAILS;
  145. #else
  146. typedef CONFLICT_DETAILS_A CONFLICT_DETAILS;
  147. typedef PCONFLICT_DETAILS_A PCONFLICT_DETAILS;
  148. #endif
  149. #define CM_CDMASK_DEVINST (0x00000001) // mask to retrieve CD_dnDevInst attribute for conflict
  150. #define CM_CDMASK_RESDES (0x00000002) // mask to retrieve CD_rdResDes attribute for conflict
  151. #define CM_CDMASK_FLAGS (0x00000004) // mask to retrieve CD_ulFlags attribute for conflict
  152. #define CM_CDMASK_DESCRIPTION (0x00000008) // mask to retrieve CD_szDescription attribute for conflict
  153. #define CM_CDMASK_VALID (0x0000000F) // valid bits
  154. #define CM_CDFLAGS_DRIVER (0x00000001) // CD_ulFlags: CD_szDescription reports back legacy driver name
  155. #define CM_CDFLAGS_ROOT_OWNED (0x00000002) // CD_ulFlags: Root owned device
  156. #define CM_CDFLAGS_RESERVED (0x00000004) // CD_ulFlags: Specified range is not available for use
  157. typedef ULONG REGDISPOSITION;
  158. //
  159. // use 1 byte packing for the data structures
  160. //
  161. #include "pshpack1.h"
  162. //--------------------------------------------------------------
  163. // Memory resource
  164. //--------------------------------------------------------------
  165. //
  166. // Define the attribute flags for memory ranges. Each bit flag is
  167. // identified by a constant bitmask. Following the bitmask definition,
  168. // are the two possible values.
  169. //
  170. #define mMD_MemoryType (0x1) // Bitmask, whether memory is writable
  171. #define fMD_MemoryType mMD_MemoryType // compatibility
  172. #define fMD_ROM (0x0) // Memory range is read-only
  173. #define fMD_RAM (0x1) // Memory range may be written to
  174. #define mMD_32_24 (0x2) // Bitmask, memory is 24 or 32-bit
  175. #define fMD_32_24 mMD_32_24 // compatibility
  176. #define fMD_24 (0x0) // Memory range is 24-bit
  177. #define fMD_32 (0x2) // Memory range is 32-bit
  178. #define mMD_Prefetchable (0x4) // Bitmask,whether memory prefetchable
  179. #define fMD_Prefetchable mMD_Prefetchable // compatibility
  180. #define fMD_Pref mMD_Prefetchable // compatibility
  181. #define fMD_PrefetchDisallowed (0x0) // Memory range is not prefetchable
  182. #define fMD_PrefetchAllowed (0x4) // Memory range is prefetchable
  183. #define mMD_Readable (0x8) // Bitmask,whether memory is readable
  184. #define fMD_Readable mMD_Readable // compatibility
  185. #define fMD_ReadAllowed (0x0) // Memory range is readable
  186. #define fMD_ReadDisallowed (0x8) // Memory range is write-only
  187. #define mMD_CombinedWrite (0x10) // Bitmask,supports write-behind
  188. #define fMD_CombinedWrite mMD_CombinedWrite // compatibility
  189. #define fMD_CombinedWriteDisallowed (0x0) // no combined-write caching
  190. #define fMD_CombinedWriteAllowed (0x10) // supports combined-write caching
  191. #define mMD_Cacheable (0x20) // Bitmask,whether memory is cacheable
  192. #define fMD_NonCacheable (0x0) // Memory range is non-cacheable
  193. #define fMD_Cacheable (0x20) // Memory range is cacheable
  194. //
  195. // MEM_RANGE Structure
  196. //
  197. typedef struct Mem_Range_s {
  198. DWORDLONG MR_Align; // specifies mask for base alignment
  199. ULONG MR_nBytes; // specifies number of bytes required
  200. DWORDLONG MR_Min; // specifies minimum address of the range
  201. DWORDLONG MR_Max; // specifies maximum address of the range
  202. DWORD MR_Flags; // specifies flags describing range (fMD flags)
  203. DWORD MR_Reserved;
  204. } MEM_RANGE, *PMEM_RANGE;
  205. //
  206. // MEM_DES structure
  207. //
  208. typedef struct Mem_Des_s {
  209. DWORD MD_Count; // number of MEM_RANGE structs in MEM_RESOURCE
  210. DWORD MD_Type; // size (in bytes) of MEM_RANGE (MType_Range)
  211. DWORDLONG MD_Alloc_Base; // base memory address of range allocated
  212. DWORDLONG MD_Alloc_End; // end of allocated range
  213. DWORD MD_Flags; // flags describing allocated range (fMD flags)
  214. DWORD MD_Reserved;
  215. } MEM_DES, *PMEM_DES;
  216. //
  217. // MEM_RESOURCE structure
  218. //
  219. typedef struct Mem_Resource_s {
  220. MEM_DES MEM_Header; // info about memory range list
  221. MEM_RANGE MEM_Data[ANYSIZE_ARRAY]; // list of memory ranges
  222. } MEM_RESOURCE, *PMEM_RESOURCE;
  223. //
  224. // Define the size of each range structure
  225. //
  226. #define MType_Range sizeof(struct Mem_Range_s)
  227. //--------------------------------------------------------------
  228. // I/O Port Resource
  229. //--------------------------------------------------------------
  230. //
  231. // Define the attribute flags for port resources. Each bit flag is
  232. // identified by a constant bitmask. Following the bitmask definition,
  233. // are the two possible values.
  234. //
  235. #define fIOD_PortType (0x1) // Bitmask,whether port is IO or memory
  236. #define fIOD_Memory (0x0) // Port resource really uses memory
  237. #define fIOD_IO (0x1) // Port resource uses IO ports
  238. #define fIOD_DECODE (0x00fc) // decode flags
  239. #define fIOD_10_BIT_DECODE (0x0004)
  240. #define fIOD_12_BIT_DECODE (0x0008)
  241. #define fIOD_16_BIT_DECODE (0x0010)
  242. #define fIOD_POSITIVE_DECODE (0x0020)
  243. #define fIOD_PASSIVE_DECODE (0x0040)
  244. #define fIOD_WINDOW_DECODE (0x0080)
  245. //
  246. // these are for compatiblity
  247. //
  248. #define IO_ALIAS_10_BIT_DECODE (0x00000004)
  249. #define IO_ALIAS_12_BIT_DECODE (0x00000010)
  250. #define IO_ALIAS_16_BIT_DECODE (0x00000000)
  251. #define IO_ALIAS_POSITIVE_DECODE (0x000000FF)
  252. //
  253. // IO_RANGE structure
  254. //
  255. typedef struct IO_Range_s {
  256. DWORDLONG IOR_Align; // mask for base alignment
  257. DWORD IOR_nPorts; // number of ports
  258. DWORDLONG IOR_Min; // minimum port address
  259. DWORDLONG IOR_Max; // maximum port address
  260. DWORD IOR_RangeFlags; // flags for this port range
  261. DWORDLONG IOR_Alias; // multiplier that generates aliases for port(s)
  262. } IO_RANGE, *PIO_RANGE;
  263. //
  264. // IO_DES structure
  265. //
  266. typedef struct IO_Des_s {
  267. DWORD IOD_Count; // number of IO_RANGE structs in IO_RESOURCE
  268. DWORD IOD_Type; // size (in bytes) of IO_RANGE (IOType_Range)
  269. DWORDLONG IOD_Alloc_Base; // base of allocated port range
  270. DWORDLONG IOD_Alloc_End; // end of allocated port range
  271. DWORD IOD_DesFlags; // flags relating to allocated port range
  272. } IO_DES, *PIO_DES;
  273. //
  274. // IO_RESOURCE
  275. //
  276. typedef struct IO_Resource_s {
  277. IO_DES IO_Header; // info about I/O port range list
  278. IO_RANGE IO_Data[ANYSIZE_ARRAY]; // list of I/O port ranges
  279. } IO_RESOURCE, *PIO_RESOURCE;
  280. #define IOA_Local 0xff
  281. //
  282. // Define the size of each range structure
  283. //
  284. #define IOType_Range sizeof(struct IO_Range_s)
  285. //--------------------------------------------------------------
  286. // DMA Resource
  287. //--------------------------------------------------------------
  288. //
  289. // Define the attribute flags for a DMA resource range. Each bit flag is
  290. // identified with a constant bitmask. Following the bitmask definition
  291. // are the possible values.
  292. //
  293. #define mDD_Width (0x3) // Bitmask, width of the DMA channel:
  294. #define fDD_BYTE (0x0) // 8-bit DMA channel
  295. #define fDD_WORD (0x1) // 16-bit DMA channel
  296. #define fDD_DWORD (0x2) // 32-bit DMA channel
  297. #define fDD_BYTE_AND_WORD (0x3) // 8-bit and 16-bit DMA channel
  298. #define mDD_BusMaster (0x4) // Bitmask, whether bus mastering is supported
  299. #define fDD_NoBusMaster (0x0) // no bus mastering
  300. #define fDD_BusMaster (0x4) // bus mastering
  301. #define mDD_Type (0x18) // Bitmask, specifies type of DMA
  302. #define fDD_TypeStandard (0x00) // standard DMA
  303. #define fDD_TypeA (0x08) // Type-A DMA
  304. #define fDD_TypeB (0x10) // Type-B DMA
  305. #define fDD_TypeF (0x18) // Type-F DMA
  306. //
  307. // DMA_RANGE structure
  308. //
  309. typedef struct DMA_Range_s {
  310. ULONG DR_Min; // minimum DMA port in the range
  311. ULONG DR_Max; // maximum DMA port in the range
  312. ULONG DR_Flags; // flags describing the range (fDD flags)
  313. } DMA_RANGE, *PDMA_RANGE;
  314. //
  315. // DMA_DES structure
  316. //
  317. typedef struct DMA_Des_s {
  318. DWORD DD_Count; // number of DMA_RANGE structs in DMA_RESOURCE
  319. DWORD DD_Type; // size (in bytes) of DMA_RANGE struct (DType_Range)
  320. DWORD DD_Flags; // Flags describing DMA channel (fDD flags)
  321. ULONG DD_Alloc_Chan; // Specifies the DMA channel that was allocated
  322. } DMA_DES, *PDMA_DES;
  323. //
  324. // DMA_RESOURCE
  325. //
  326. typedef struct DMA_Resource_s {
  327. DMA_DES DMA_Header; // info about DMA channel range list
  328. DMA_RANGE DMA_Data[ANYSIZE_ARRAY]; // list of DMA ranges
  329. } DMA_RESOURCE, *PDMA_RESOURCE;
  330. //
  331. // Define the size of each range structure
  332. //
  333. #define DType_Range sizeof(struct DMA_Range_s)
  334. //--------------------------------------------------------------
  335. // Interrupt Resource
  336. //--------------------------------------------------------------
  337. //
  338. // Define the attribute flags for an interrupt resource range. Each bit flag
  339. // is identified with a constant bitmask. Following the bitmask definition
  340. // are the possible values.
  341. //
  342. #define mIRQD_Share (0x1) // Bitmask,whether the IRQ may be shared:
  343. #define fIRQD_Exclusive (0x0) // The IRQ may not be shared
  344. #define fIRQD_Share (0x1) // The IRQ may be shared
  345. #define fIRQD_Share_Bit 0 // compatibility
  346. #define fIRQD_Level_Bit 1 // compatibility
  347. //
  348. // ** NOTE: 16-bit ConfigMgr uses fIRQD_Level_Bit being set to indicate that the
  349. // ** interrupt is _level-sensitive_. For 32-bit ConfigMgr, if this bit is set,
  350. // ** then the interrupt is _edge-sensitive_.
  351. //
  352. #define mIRQD_Edge_Level (0x2) // Bitmask,whether edge or level triggered:
  353. #define fIRQD_Level (0x0) // The IRQ is level-sensitive
  354. #define fIRQD_Edge (0x2) // The IRQ is edge-sensitive
  355. //
  356. // IRQ_RANGE
  357. //
  358. typedef struct IRQ_Range_s {
  359. ULONG IRQR_Min; // minimum IRQ in the range
  360. ULONG IRQR_Max; // maximum IRQ in the range
  361. ULONG IRQR_Flags; // flags describing the range (fIRQD flags)
  362. } IRQ_RANGE, *PIRQ_RANGE;
  363. //
  364. // IRQ_DES structure
  365. //
  366. typedef struct IRQ_Des_32_s {
  367. DWORD IRQD_Count; // number of IRQ_RANGE structs in IRQ_RESOURCE
  368. DWORD IRQD_Type; // size (in bytes) of IRQ_RANGE (IRQType_Range)
  369. DWORD IRQD_Flags; // flags describing the IRQ (fIRQD flags)
  370. ULONG IRQD_Alloc_Num; // specifies the IRQ that was allocated
  371. ULONG32 IRQD_Affinity;
  372. } IRQ_DES_32, *PIRQ_DES_32;
  373. typedef struct IRQ_Des_64_s {
  374. DWORD IRQD_Count; // number of IRQ_RANGE structs in IRQ_RESOURCE
  375. DWORD IRQD_Type; // size (in bytes) of IRQ_RANGE (IRQType_Range)
  376. DWORD IRQD_Flags; // flags describing the IRQ (fIRQD flags)
  377. ULONG IRQD_Alloc_Num; // specifies the IRQ that was allocated
  378. ULONG64 IRQD_Affinity;
  379. } IRQ_DES_64, *PIRQ_DES_64;
  380. #ifdef _WIN64
  381. typedef IRQ_DES_64 IRQ_DES;
  382. typedef PIRQ_DES_64 PIRQ_DES;
  383. #else
  384. typedef IRQ_DES_32 IRQ_DES;
  385. typedef PIRQ_DES_32 PIRQ_DES;
  386. #endif
  387. //
  388. // IRQ_RESOURCE structure
  389. //
  390. typedef struct IRQ_Resource_32_s {
  391. IRQ_DES_32 IRQ_Header; // info about IRQ range list
  392. IRQ_RANGE IRQ_Data[ANYSIZE_ARRAY]; // list of IRQ ranges
  393. } IRQ_RESOURCE_32, *PIRQ_RESOURCE_32;
  394. typedef struct IRQ_Resource_64_s {
  395. IRQ_DES_64 IRQ_Header; // info about IRQ range list
  396. IRQ_RANGE IRQ_Data[ANYSIZE_ARRAY]; // list of IRQ ranges
  397. } IRQ_RESOURCE_64, *PIRQ_RESOURCE_64;
  398. #ifdef _WIN64
  399. typedef IRQ_RESOURCE_64 IRQ_RESOURCE;
  400. typedef PIRQ_RESOURCE_64 PIRQ_RESOURCE;
  401. #else
  402. typedef IRQ_RESOURCE_32 IRQ_RESOURCE;
  403. typedef PIRQ_RESOURCE_32 PIRQ_RESOURCE;
  404. #endif
  405. //
  406. // Define the size of each range structure
  407. //
  408. #define IRQType_Range sizeof(struct IRQ_Range_s)
  409. //
  410. // Flags for resource descriptor APIs indicating the width of certain
  411. // variable-size resource descriptor structure fields, where applicable.
  412. //
  413. #define CM_RESDES_WIDTH_DEFAULT (0x00000000) // 32 or 64-bit IRQ_RESOURCE / IRQ_DES, based on client
  414. #define CM_RESDES_WIDTH_32 (0x00000001) // 32-bit IRQ_RESOURCE / IRQ_DES
  415. #define CM_RESDES_WIDTH_64 (0x00000002) // 64-bit IRQ_RESOURCE / IRQ_DES
  416. #define CM_RESDES_WIDTH_BITS (0x00000003)
  417. //--------------------------------------------------------------
  418. // Device Private Resource
  419. //--------------------------------------------------------------
  420. //
  421. // DEVICEPRIVATE_RANGE structure
  422. //
  423. typedef struct DevPrivate_Range_s {
  424. DWORD PR_Data1; // mask for base alignment
  425. DWORD PR_Data2; // number of bytes
  426. DWORD PR_Data3; // minimum address
  427. } DEVPRIVATE_RANGE, *PDEVPRIVATE_RANGE;
  428. //
  429. // DEVPRIVATE_DES structure
  430. //
  431. typedef struct DevPrivate_Des_s {
  432. DWORD PD_Count;
  433. DWORD PD_Type;
  434. DWORD PD_Data1;
  435. DWORD PD_Data2;
  436. DWORD PD_Data3;
  437. DWORD PD_Flags;
  438. } DEVPRIVATE_DES, *PDEVPRIVATE_DES;
  439. //
  440. // DEVPRIVATE_RESOURCE
  441. //
  442. typedef struct DevPrivate_Resource_s {
  443. DEVPRIVATE_DES PRV_Header;
  444. DEVPRIVATE_RANGE PRV_Data[ANYSIZE_ARRAY];
  445. } DEVPRIVATE_RESOURCE, *PDEVPRIVATE_RESOURCE;
  446. //
  447. // Define the size of each range structure
  448. //
  449. #define PType_Range sizeof(struct DevPrivate_Range_s)
  450. //--------------------------------------------------------------
  451. // Class-Specific Resource
  452. //--------------------------------------------------------------
  453. typedef struct CS_Des_s {
  454. DWORD CSD_SignatureLength;
  455. DWORD CSD_LegacyDataOffset;
  456. DWORD CSD_LegacyDataSize;
  457. DWORD CSD_Flags;
  458. GUID CSD_ClassGuid;
  459. BYTE CSD_Signature[ANYSIZE_ARRAY];
  460. } CS_DES, *PCS_DES;
  461. typedef struct CS_Resource_s {
  462. CS_DES CS_Header;
  463. } CS_RESOURCE, *PCS_RESOURCE;
  464. //--------------------------------------------------------------
  465. // PC Card Configuration Resource
  466. //--------------------------------------------------------------
  467. //
  468. // Define the attribute flags for a PC Card configuration resource descriptor.
  469. // Each bit flag is identified with a constant bitmask. Following the bitmask
  470. // definition are the possible values.
  471. //
  472. #define mPCD_IO_8_16 (0x1) // Bitmask, whether I/O is 8 or 16 bits
  473. #define fPCD_IO_8 (0x0) // I/O is 8-bit
  474. #define fPCD_IO_16 (0x1) // I/O is 16-bit
  475. #define mPCD_MEM_8_16 (0x2) // Bitmask, whether MEM is 8 or 16 bits
  476. #define fPCD_MEM_8 (0x0) // MEM is 8-bit
  477. #define fPCD_MEM_16 (0x2) // MEM is 16-bit
  478. #define mPCD_MEM_A_C (0xC) // Bitmask, whether MEMx is Attribute or Common
  479. #define fPCD_MEM1_A (0x4) // MEM1 is Attribute
  480. #define fPCD_MEM2_A (0x8) // MEM2 is Attribute
  481. #define fPCD_IO_ZW_8 (0x10) // zero wait on 8 bit I/O
  482. #define fPCD_IO_SRC_16 (0x20) // iosrc 16
  483. #define fPCD_IO_WS_16 (0x40) // wait states on 16 bit io
  484. #define mPCD_MEM_WS (0x300) // Bitmask, for additional wait states on memory windows
  485. #define fPCD_MEM_WS_ONE (0x100) // 1 wait state
  486. #define fPCD_MEM_WS_TWO (0x200) // 2 wait states
  487. #define fPCD_MEM_WS_THREE (0x300) // 3 wait states
  488. #define fPCD_MEM_A (0x4) // MEM is Attribute
  489. #define fPCD_ATTRIBUTES_PER_WINDOW (0x8000)
  490. #define fPCD_IO1_16 (0x00010000) // I/O window 1 is 16-bit
  491. #define fPCD_IO1_ZW_8 (0x00020000) // I/O window 1 zero wait on 8 bit I/O
  492. #define fPCD_IO1_SRC_16 (0x00040000) // I/O window 1 iosrc 16
  493. #define fPCD_IO1_WS_16 (0x00080000) // I/O window 1 wait states on 16 bit io
  494. #define fPCD_IO2_16 (0x00100000) // I/O window 2 is 16-bit
  495. #define fPCD_IO2_ZW_8 (0x00200000) // I/O window 2 zero wait on 8 bit I/O
  496. #define fPCD_IO2_SRC_16 (0x00400000) // I/O window 2 iosrc 16
  497. #define fPCD_IO2_WS_16 (0x00800000) // I/O window 2 wait states on 16 bit io
  498. #define mPCD_MEM1_WS (0x03000000) // MEM window 1 Bitmask, for additional wait states on memory windows
  499. #define fPCD_MEM1_WS_ONE (0x01000000) // MEM window 1, 1 wait state
  500. #define fPCD_MEM1_WS_TWO (0x02000000) // MEM window 1, 2 wait states
  501. #define fPCD_MEM1_WS_THREE (0x03000000) // MEM window 1, 3 wait states
  502. #define fPCD_MEM1_16 (0x04000000) // MEM window 1 is 16-bit
  503. #define mPCD_MEM2_WS (0x30000000) // MEM window 2 Bitmask, for additional wait states on memory windows
  504. #define fPCD_MEM2_WS_ONE (0x10000000) // MEM window 2, 1 wait state
  505. #define fPCD_MEM2_WS_TWO (0x20000000) // MEM window 2, 2 wait states
  506. #define fPCD_MEM2_WS_THREE (0x30000000) // MEM window 2, 3 wait states
  507. #define fPCD_MEM2_16 (0x40000000) // MEM window 2 is 16-bit
  508. #define PCD_MAX_MEMORY 2
  509. #define PCD_MAX_IO 2
  510. typedef struct PcCard_Des_s {
  511. DWORD PCD_Count;
  512. DWORD PCD_Type;
  513. DWORD PCD_Flags;
  514. BYTE PCD_ConfigIndex;
  515. BYTE PCD_Reserved[3];
  516. DWORD PCD_MemoryCardBase1;
  517. DWORD PCD_MemoryCardBase2;
  518. DWORD PCD_MemoryCardBase[PCD_MAX_MEMORY]; // will soon be removed
  519. WORD PCD_MemoryFlags[PCD_MAX_MEMORY]; // will soon be removed
  520. BYTE PCD_IoFlags[PCD_MAX_IO]; // will soon be removed
  521. } PCCARD_DES, *PPCCARD_DES;
  522. typedef struct PcCard_Resource_s {
  523. PCCARD_DES PcCard_Header;
  524. } PCCARD_RESOURCE, *PPCCARD_RESOURCE;
  525. //--------------------------------------------------------------
  526. // MF (multifunction) PCCard Configuration Resource
  527. //--------------------------------------------------------------
  528. #define mPMF_AUDIO_ENABLE (0x8) // Bitmask, whether audio is enabled or not
  529. #define fPMF_AUDIO_ENABLE (0x8) // Audio is enabled
  530. typedef struct MfCard_Des_s {
  531. DWORD PMF_Count;
  532. DWORD PMF_Type;
  533. DWORD PMF_Flags;
  534. BYTE PMF_ConfigOptions;
  535. BYTE PMF_IoResourceIndex;
  536. BYTE PMF_Reserved[2];
  537. DWORD PMF_ConfigRegisterBase;
  538. } MFCARD_DES, *PMFCARD_DES;
  539. typedef struct MfCard_Resource_s {
  540. MFCARD_DES MfCard_Header;
  541. } MFCARD_RESOURCE, *PMFCARD_RESOURCE;
  542. //--------------------------------------------------------------
  543. // Bus Number Resource
  544. //--------------------------------------------------------------
  545. //
  546. // Define the attribute flags for a Bus Number resource descriptor.
  547. // Each bit flag is identified with a constant bitmask. Following the bitmask
  548. // definition are the possible values.
  549. //
  550. // Currently unused.
  551. //
  552. //
  553. // BUSNUMBER_RANGE
  554. //
  555. typedef struct BusNumber_Range_s {
  556. ULONG BUSR_Min; // minimum Bus Number in the range
  557. ULONG BUSR_Max; // maximum Bus Number in the range
  558. ULONG BUSR_nBusNumbers; // specifies number of buses required
  559. ULONG BUSR_Flags; // flags describing the range (currently unused)
  560. } BUSNUMBER_RANGE, *PBUSNUMBER_RANGE;
  561. //
  562. // BUSNUMBER_DES structure
  563. //
  564. typedef struct BusNumber_Des_s {
  565. DWORD BUSD_Count; // number of BUSNUMBER_RANGE structs in BUSNUMBER_RESOURCE
  566. DWORD BUSD_Type; // size (in bytes) of BUSNUMBER_RANGE (BusNumberType_Range)
  567. DWORD BUSD_Flags; // flags describing the range (currently unused)
  568. ULONG BUSD_Alloc_Base; // specifies the first Bus that was allocated
  569. ULONG BUSD_Alloc_End; // specifies the last Bus number that was allocated
  570. } BUSNUMBER_DES, *PBUSNUMBER_DES;
  571. //
  572. // BUSNUMBER_RESOURCE structure
  573. //
  574. typedef struct BusNumber_Resource_s {
  575. BUSNUMBER_DES BusNumber_Header; // info about Bus Number range list
  576. BUSNUMBER_RANGE BusNumber_Data[ANYSIZE_ARRAY]; // list of Bus Number ranges
  577. } BUSNUMBER_RESOURCE, *PBUSNUMBER_RESOURCE;
  578. //
  579. // Define the size of each range structure
  580. //
  581. #define BusNumberType_Range sizeof(struct BusNumber_Range_s)
  582. //--------------------------------------------------------------
  583. // Hardware Profile Information
  584. //--------------------------------------------------------------
  585. //
  586. // Define flags relating to hardware profiles
  587. //
  588. #define CM_HWPI_NOT_DOCKABLE (0x00000000) // machine is not dockable
  589. #define CM_HWPI_UNDOCKED (0x00000001) // hw profile for docked config
  590. #define CM_HWPI_DOCKED (0x00000002) // hw profile for undocked config
  591. //
  592. // HWPROFILEINFO structure
  593. //
  594. typedef struct HWProfileInfo_sA {
  595. ULONG HWPI_ulHWProfile; // handle of hw profile
  596. CHAR HWPI_szFriendlyName[MAX_PROFILE_LEN]; // friendly name of hw profile
  597. DWORD HWPI_dwFlags; // profile flags (CM_HWPI_*)
  598. } HWPROFILEINFO_A, *PHWPROFILEINFO_A;
  599. typedef struct HWProfileInfo_sW {
  600. ULONG HWPI_ulHWProfile; // handle of hw profile
  601. WCHAR HWPI_szFriendlyName[MAX_PROFILE_LEN]; // friendly name of hw profile
  602. DWORD HWPI_dwFlags; // profile flags (CM_HWPI_*)
  603. } HWPROFILEINFO_W, *PHWPROFILEINFO_W;
  604. #ifdef UNICODE
  605. typedef HWPROFILEINFO_W HWPROFILEINFO;
  606. typedef PHWPROFILEINFO_W PHWPROFILEINFO;
  607. #else
  608. typedef HWPROFILEINFO_A HWPROFILEINFO;
  609. typedef PHWPROFILEINFO_A PHWPROFILEINFO;
  610. #endif
  611. //
  612. // revert back to normal default packing
  613. //
  614. #include "poppack.h"
  615. //--------------------------------------------------------------
  616. // Miscellaneous
  617. //--------------------------------------------------------------
  618. //
  619. // Resource types
  620. //
  621. #define ResType_All (0x00000000) // Return all resource types
  622. #define ResType_None (0x00000000) // Arbitration always succeeded
  623. #define ResType_Mem (0x00000001) // Physical address resource
  624. #define ResType_IO (0x00000002) // Physical I/O address resource
  625. #define ResType_DMA (0x00000003) // DMA channels resource
  626. #define ResType_IRQ (0x00000004) // IRQ resource
  627. #define ResType_DoNotUse (0x00000005) // Used as spacer to sync subsequent ResTypes w/NT
  628. #define ResType_BusNumber (0x00000006) // bus number resource
  629. #define ResType_MAX (0x00000006) // Maximum known (arbitrated) ResType
  630. #define ResType_Ignored_Bit (0x00008000) // Ignore this resource
  631. #define ResType_ClassSpecific (0x0000FFFF) // class-specific resource
  632. #define ResType_Reserved (0x00008000) // reserved for internal use
  633. #define ResType_DevicePrivate (0x00008001) // device private data
  634. #define ResType_PcCardConfig (0x00008002) // PC Card configuration data
  635. #define ResType_MfCardConfig (0x00008003) // MF Card configuration data
  636. //
  637. // Flags specifying options for ranges that conflict with ranges already in
  638. // the range list (CM_Add_Range)
  639. //
  640. #define CM_ADD_RANGE_ADDIFCONFLICT (0x00000000) // merg with conflicting range
  641. #define CM_ADD_RANGE_DONOTADDIFCONFLICT (0x00000001) // error if range conflicts
  642. #define CM_ADD_RANGE_BITS (0x00000001)
  643. //
  644. // Logical Config Flags (specified in call to CM_Get_First_Log_Conf
  645. //
  646. #define BASIC_LOG_CONF 0x00000000 // Specifies the req list.
  647. #define FILTERED_LOG_CONF 0x00000001 // Specifies the filtered req list.
  648. #define ALLOC_LOG_CONF 0x00000002 // Specifies the Alloc Element.
  649. #define BOOT_LOG_CONF 0x00000003 // Specifies the RM Alloc Element.
  650. #define FORCED_LOG_CONF 0x00000004 // Specifies the Forced Log Conf
  651. #define OVERRIDE_LOG_CONF 0x00000005 // Specifies the Override req list.
  652. #define NUM_LOG_CONF 0x00000006 // Number of Log Conf type
  653. #define LOG_CONF_BITS 0x00000007 // The bits of the log conf type.
  654. #define PRIORITY_EQUAL_FIRST (0x00000008) // Same priority, new one first
  655. #define PRIORITY_EQUAL_LAST (0x00000000) // Same priority, new one last
  656. #define PRIORITY_BIT (0x00000008)
  657. //
  658. // Registry disposition values
  659. // (specified in call to CM_Open_DevNode_Key and CM_Open_Class_Key)
  660. //
  661. #define RegDisposition_OpenAlways (0x00000000) // open if exists else create
  662. #define RegDisposition_OpenExisting (0x00000001) // open key only if exists
  663. #define RegDisposition_Bits (0x00000001)
  664. //
  665. // ulFlags values for CM API routines
  666. //
  667. //
  668. // Flags for CM_Add_ID
  669. //
  670. #define CM_ADD_ID_HARDWARE (0x00000000)
  671. #define CM_ADD_ID_COMPATIBLE (0x00000001)
  672. #define CM_ADD_ID_BITS (0x00000001)
  673. //
  674. // Device Node creation flags
  675. //
  676. #define CM_CREATE_DEVNODE_NORMAL (0x00000000) // install later
  677. #define CM_CREATE_DEVNODE_NO_WAIT_INSTALL (0x00000001) // NOT SUPPORTED ON NT
  678. #define CM_CREATE_DEVNODE_PHANTOM (0x00000002)
  679. #define CM_CREATE_DEVNODE_GENERATE_ID (0x00000004)
  680. #define CM_CREATE_DEVNODE_DO_NOT_INSTALL (0x00000008)
  681. #define CM_CREATE_DEVNODE_BITS (0x0000000F)
  682. #define CM_CREATE_DEVINST_NORMAL CM_CREATE_DEVNODE_NORMAL
  683. #define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
  684. #define CM_CREATE_DEVINST_PHANTOM CM_CREATE_DEVNODE_PHANTOM
  685. #define CM_CREATE_DEVINST_GENERATE_ID CM_CREATE_DEVNODE_GENERATE_ID
  686. #define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
  687. #define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
  688. //
  689. // Flags for CM_Delete_Class_Key
  690. //
  691. #define CM_DELETE_CLASS_ONLY (0x00000000)
  692. #define CM_DELETE_CLASS_SUBKEYS (0x00000001)
  693. #define CM_DELETE_CLASS_BITS (0x00000001)
  694. //
  695. // Detection reason flags (specified in call to CM_Run_Detection)
  696. //
  697. #define CM_DETECT_NEW_PROFILE (0x00000001) // detection for new hw profile
  698. #define CM_DETECT_CRASHED (0x00000002) // Previous detection crashed
  699. #define CM_DETECT_HWPROF_FIRST_BOOT (0x00000004)
  700. #define CM_DETECT_RUN (0x80000000)
  701. #define CM_DETECT_BITS (0x80000007)
  702. #define CM_DISABLE_POLITE (0x00000000) // Ask the driver
  703. #define CM_DISABLE_ABSOLUTE (0x00000001) // Don't ask the driver
  704. #define CM_DISABLE_HARDWARE (0x00000002) // Don't ask the driver, and won't be restarteable
  705. #define CM_DISABLE_UI_NOT_OK (0x00000004) // Don't popup any veto API
  706. #define CM_DISABLE_BITS (0x00000007) // The bits for the disable function
  707. //
  708. // Flags for CM_Get_Device_ID_List, CM_Get_Device_ID_List_Size
  709. //
  710. #define CM_GETIDLIST_FILTER_NONE (0x00000000)
  711. #define CM_GETIDLIST_FILTER_ENUMERATOR (0x00000001)
  712. #define CM_GETIDLIST_FILTER_SERVICE (0x00000002)
  713. #define CM_GETIDLIST_FILTER_EJECTRELATIONS (0x00000004)
  714. #define CM_GETIDLIST_FILTER_REMOVALRELATIONS (0x00000008)
  715. #define CM_GETIDLIST_FILTER_POWERRELATIONS (0x00000010)
  716. #define CM_GETIDLIST_FILTER_BUSRELATIONS (0x00000020)
  717. #define CM_GETIDLIST_DONOTGENERATE (0x10000040)
  718. #define CM_GETIDLIST_FILTER_BITS (0x1000007F)
  719. //
  720. // Flags for CM_Get_Device_Interface_List, CM_Get_Device_Interface_List_Size
  721. //
  722. #define CM_GET_DEVICE_INTERFACE_LIST_PRESENT (0x00000000) // only currently 'live' device interfaces
  723. #define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES (0x00000001) // all registered device interfaces, live or not
  724. #define CM_GET_DEVICE_INTERFACE_LIST_BITS (0x00000001)
  725. //
  726. // Registry properties (specified in call to CM_Get_DevInst_Registry_Property or CM_Get_Class_Registry_Property,
  727. // some are allowed in calls to CM_Set_DevInst_Registry_Property and CM_Set_Class_Registry_Property)
  728. // CM_DRP_xxxx values should be used for CM_Get_DevInst_Registry_Property / CM_Set_DevInst_Registry_Property
  729. // CM_CRP_xxxx values should be used for CM_Get_Class_Registry_Property / CM_Set_Class_Registry_Property
  730. // DRP/CRP values that overlap must have a 1:1 correspondence with each other
  731. //
  732. #define CM_DRP_DEVICEDESC (0x00000001) // DeviceDesc REG_SZ property (RW)
  733. #define CM_DRP_HARDWAREID (0x00000002) // HardwareID REG_MULTI_SZ property (RW)
  734. #define CM_DRP_COMPATIBLEIDS (0x00000003) // CompatibleIDs REG_MULTI_SZ property (RW)
  735. #define CM_DRP_UNUSED0 (0x00000004) // unused
  736. #define CM_DRP_SERVICE (0x00000005) // Service REG_SZ property (RW)
  737. #define CM_DRP_UNUSED1 (0x00000006) // unused
  738. #define CM_DRP_UNUSED2 (0x00000007) // unused
  739. #define CM_DRP_CLASS (0x00000008) // Class REG_SZ property (RW)
  740. #define CM_DRP_CLASSGUID (0x00000009) // ClassGUID REG_SZ property (RW)
  741. #define CM_DRP_DRIVER (0x0000000A) // Driver REG_SZ property (RW)
  742. #define CM_DRP_CONFIGFLAGS (0x0000000B) // ConfigFlags REG_DWORD property (RW)
  743. #define CM_DRP_MFG (0x0000000C) // Mfg REG_SZ property (RW)
  744. #define CM_DRP_FRIENDLYNAME (0x0000000D) // FriendlyName REG_SZ property (RW)
  745. #define CM_DRP_LOCATION_INFORMATION (0x0000000E) // LocationInformation REG_SZ property (RW)
  746. #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME (0x0000000F) // PhysicalDeviceObjectName REG_SZ property (R)
  747. #define CM_DRP_CAPABILITIES (0x00000010) // Capabilities REG_DWORD property (R)
  748. #define CM_DRP_UI_NUMBER (0x00000011) // UiNumber REG_DWORD property (R)
  749. #define CM_DRP_UPPERFILTERS (0x00000012) // UpperFilters REG_MULTI_SZ property (RW)
  750. #define CM_DRP_LOWERFILTERS (0x00000013) // LowerFilters REG_MULTI_SZ property (RW)
  751. #define CM_DRP_BUSTYPEGUID (0x00000014) // Bus Type Guid, GUID, (R)
  752. #define CM_DRP_LEGACYBUSTYPE (0x00000015) // Legacy bus type, INTERFACE_TYPE, (R)
  753. #define CM_DRP_BUSNUMBER (0x00000016) // Bus Number, DWORD, (R)
  754. #define CM_DRP_ENUMERATOR_NAME (0x00000017) // Enumerator Name REG_SZ property (R)
  755. #define CM_DRP_SECURITY (0x00000018) // Security - Device override (RW)
  756. #define CM_CRP_SECURITY CM_DRP_SECURITY // Class default security (RW)
  757. #define CM_DRP_SECURITY_SDS (0x00000019) // Security - Device override (RW)
  758. #define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS // Class default security (RW)
  759. #define CM_DRP_DEVTYPE (0x0000001A) // Device Type - Device override (RW)
  760. #define CM_CRP_DEVTYPE CM_DRP_DEVTYPE // Class default Device-type (RW)
  761. #define CM_DRP_EXCLUSIVE (0x0000001B) // Exclusivity - Device override (RW)
  762. #define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE // Class default (RW)
  763. #define CM_DRP_CHARACTERISTICS (0x0000001C) // Characteristics - Device Override (RW)
  764. #define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS // Class default (RW)
  765. #define CM_DRP_ADDRESS (0x0000001D) // Device Address (R)
  766. #define CM_DRP_UI_NUMBER_DESC_FORMAT (0x0000001E) // UINumberDescFormat REG_SZ property (RW)
  767. #define CM_DRP_DEVICE_POWER_DATA (0x0000001F) // CM_POWER_DATA REG_BINARY property (R)
  768. #define CM_DRP_REMOVAL_POLICY (0x00000020) // CM_DEVICE_REMOVAL_POLICY REG_DWORD (R)
  769. #define CM_DRP_REMOVAL_POLICY_HW_DEFAULT (0x00000021) // CM_DRP_REMOVAL_POLICY_HW_DEFAULT REG_DWORD (R)
  770. #define CM_DRP_REMOVAL_POLICY_OVERRIDE (0x00000022) // CM_DRP_REMOVAL_POLICY_OVERRIDE REG_DWORD (RW)
  771. #define CM_DRP_INSTALL_STATE (0x00000023) // CM_DRP_INSTALL_STATE REG_DWORD (R)
  772. #define CM_DRP_MIN (0x00000001) // First device register
  773. #define CM_CRP_MIN CM_DRP_MIN // First class register
  774. #define CM_DRP_MAX (0x00000023) // Last device register
  775. #define CM_CRP_MAX CM_DRP_MAX // Last class register
  776. //
  777. // Capabilities bits (the capability value is returned from calling
  778. // CM_Get_DevInst_Registry_Property with CM_DRP_CAPABILITIES property)
  779. //
  780. #define CM_DEVCAP_LOCKSUPPORTED (0x00000001)
  781. #define CM_DEVCAP_EJECTSUPPORTED (0x00000002)
  782. #define CM_DEVCAP_REMOVABLE (0x00000004)
  783. #define CM_DEVCAP_DOCKDEVICE (0x00000008)
  784. #define CM_DEVCAP_UNIQUEID (0x00000010)
  785. #define CM_DEVCAP_SILENTINSTALL (0x00000020)
  786. #define CM_DEVCAP_RAWDEVICEOK (0x00000040)
  787. #define CM_DEVCAP_SURPRISEREMOVALOK (0x00000080)
  788. #define CM_DEVCAP_HARDWAREDISABLED (0x00000100)
  789. #define CM_DEVCAP_NONDYNAMIC (0x00000200)
  790. //
  791. // Removal policies (retrievable via CM_Get_DevInst_Registry_Property with
  792. // the CM_DRP_REMOVAL_POLICY, CM_DRP_REMOVAL_POLICY_OVERRIDE, or
  793. // CM_DRP_REMOVAL_POLICY_HW_DEFAULT properties)
  794. //
  795. #define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
  796. #define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
  797. #define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
  798. //
  799. // Device install states (retrievable via CM_Get_DevInst_Registry_Property with
  800. // the CM_DRP_INSTALL_STATE properties)
  801. //
  802. #define CM_INSTALL_STATE_INSTALLED 0
  803. #define CM_INSTALL_STATE_NEEDS_REINSTALL 1
  804. #define CM_INSTALL_STATE_FAILED_INSTALL 2
  805. #define CM_INSTALL_STATE_FINISH_INSTALL 3
  806. //
  807. // Flags for CM_Locate_DevNode
  808. //
  809. #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
  810. #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
  811. #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
  812. #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
  813. #define CM_LOCATE_DEVNODE_BITS 0x00000007
  814. #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
  815. #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
  816. #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
  817. #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
  818. #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
  819. //
  820. // Flags for CM_Open_Class_Key
  821. //
  822. #define CM_OPEN_CLASS_KEY_INSTALLER (0x00000000)
  823. #define CM_OPEN_CLASS_KEY_INTERFACE (0x00000001)
  824. #define CM_OPEN_CLASS_KEY_BITS (0x00000001)
  825. //
  826. // Flags for CM_Query_And_Remove_SubTree
  827. //
  828. #define CM_REMOVE_UI_OK 0x00000000
  829. #define CM_REMOVE_UI_NOT_OK 0x00000001
  830. #define CM_REMOVE_NO_RESTART 0x00000002
  831. #define CM_REMOVE_BITS 0x00000003
  832. //
  833. // Backward compatibility--do not use
  834. // (use above CM_REMOVE_* flags instead)
  835. //
  836. #define CM_QUERY_REMOVE_UI_OK (CM_REMOVE_UI_OK)
  837. #define CM_QUERY_REMOVE_UI_NOT_OK (CM_REMOVE_UI_NOT_OK)
  838. #define CM_QUERY_REMOVE_BITS (CM_QUERY_REMOVE_UI_OK|CM_QUERY_REMOVE_UI_NOT_OK)
  839. //
  840. // Flags for CM_Reenumerate_DevNode
  841. //
  842. #define CM_REENUMERATE_NORMAL 0x00000000
  843. #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
  844. #define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
  845. #define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
  846. #define CM_REENUMERATE_BITS 0x00000007
  847. //
  848. // Flags for CM_Register_Device_Driver
  849. //
  850. #define CM_REGISTER_DEVICE_DRIVER_STATIC (0x00000000)
  851. #define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE (0x00000001)
  852. #define CM_REGISTER_DEVICE_DRIVER_REMOVABLE (0x00000002)
  853. #define CM_REGISTER_DEVICE_DRIVER_BITS (0x00000003)
  854. //
  855. // Registry Branch Locations (for CM_Open_DevNode_Key)
  856. //
  857. #define CM_REGISTRY_HARDWARE (0x00000000)
  858. #define CM_REGISTRY_SOFTWARE (0x00000001)
  859. #define CM_REGISTRY_USER (0x00000100)
  860. #define CM_REGISTRY_CONFIG (0x00000200)
  861. #define CM_REGISTRY_BITS (0x00000301)
  862. //
  863. // Flags for CM_Set_DevNode_Problem
  864. //
  865. #define CM_SET_DEVNODE_PROBLEM_NORMAL (0x00000000) // only set problem if currently no problem
  866. #define CM_SET_DEVNODE_PROBLEM_OVERRIDE (0x00000001) // override current problem with new problem
  867. #define CM_SET_DEVNODE_PROBLEM_BITS (0x00000001)
  868. #define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
  869. #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
  870. #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
  871. //
  872. // Flags for CM_Set_HW_Prof_Flags
  873. //
  874. #define CM_SET_HW_PROF_FLAGS_UI_NOT_OK (0x00000001) // Don't popup any veto UI
  875. #define CM_SET_HW_PROF_FLAGS_BITS (0x00000001)
  876. //
  877. // Re-enable and configuration actions (specified in call to CM_Setup_DevInst)
  878. //
  879. #define CM_SETUP_DEVNODE_READY (0x00000000) // Reenable problem devinst
  880. #define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
  881. #define CM_SETUP_DOWNLOAD (0x00000001) // Get info about devinst
  882. #define CM_SETUP_WRITE_LOG_CONFS (0x00000002)
  883. #define CM_SETUP_PROP_CHANGE (0x00000003)
  884. #define CM_SETUP_DEVNODE_RESET (0x00000004) // Reset problem devinst without starting
  885. #define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
  886. #define CM_SETUP_BITS (0x00000007)
  887. //
  888. // Flags for CM_Query_Arbitrator_Free_Data and
  889. // CM_Query_Arbitrator_Free_Data_Size.
  890. //
  891. #define CM_QUERY_ARBITRATOR_RAW (0x00000000)
  892. #define CM_QUERY_ARBITRATOR_TRANSLATED (0x00000001)
  893. #define CM_QUERY_ARBITRATOR_BITS (0x00000001)
  894. //
  895. // Flags for CM_Get_DevNode_Custom_Property
  896. //
  897. #define CM_CUSTOMDEVPROP_MERGE_MULTISZ (0x00000001)
  898. #define CM_CUSTOMDEVPROP_BITS (0x00000001)
  899. //--------------------------------------------------------------
  900. // Function prototypes
  901. //--------------------------------------------------------------
  902. CMAPI
  903. CONFIGRET
  904. WINAPI
  905. CM_Add_Empty_Log_Conf(
  906. OUT PLOG_CONF plcLogConf,
  907. IN DEVINST dnDevInst,
  908. IN PRIORITY Priority,
  909. IN ULONG ulFlags
  910. );
  911. CMAPI
  912. CONFIGRET
  913. WINAPI
  914. CM_Add_Empty_Log_Conf_Ex(
  915. OUT PLOG_CONF plcLogConf,
  916. IN DEVINST dnDevInst,
  917. IN PRIORITY Priority,
  918. IN ULONG ulFlags,
  919. IN HMACHINE hMachine
  920. );
  921. CMAPI
  922. CONFIGRET
  923. WINAPI
  924. CM_Add_IDA(
  925. IN DEVINST dnDevInst,
  926. IN PSTR pszID,
  927. IN ULONG ulFlags
  928. );
  929. CMAPI
  930. CONFIGRET
  931. WINAPI
  932. CM_Add_IDW(
  933. IN DEVINST dnDevInst,
  934. IN PWSTR pszID,
  935. IN ULONG ulFlags
  936. );
  937. CMAPI
  938. CONFIGRET
  939. WINAPI
  940. CM_Add_ID_ExA(
  941. IN DEVINST dnDevInst,
  942. IN PSTR pszID,
  943. IN ULONG ulFlags,
  944. IN HMACHINE hMachine
  945. );
  946. CMAPI
  947. CONFIGRET
  948. WINAPI
  949. CM_Add_ID_ExW(
  950. IN DEVINST dnDevInst,
  951. IN PWSTR pszID,
  952. IN ULONG ulFlags,
  953. IN HMACHINE hMachine
  954. );
  955. #ifdef UNICODE
  956. #define CM_Add_ID CM_Add_IDW
  957. #define CM_Add_ID_Ex CM_Add_ID_ExW
  958. #else
  959. #define CM_Add_ID CM_Add_IDA
  960. #define CM_Add_ID_Ex CM_Add_ID_ExA
  961. #endif // UNICODE
  962. CMAPI
  963. CONFIGRET
  964. WINAPI
  965. CM_Add_Range(
  966. IN DWORDLONG ullStartValue,
  967. IN DWORDLONG ullEndValue,
  968. IN RANGE_LIST rlh,
  969. IN ULONG ulFlags
  970. );
  971. CMAPI
  972. CONFIGRET
  973. WINAPI
  974. CM_Add_Res_Des(
  975. OUT PRES_DES prdResDes,
  976. IN LOG_CONF lcLogConf,
  977. IN RESOURCEID ResourceID,
  978. IN PCVOID ResourceData,
  979. IN ULONG ResourceLen,
  980. IN ULONG ulFlags
  981. );
  982. CMAPI
  983. CONFIGRET
  984. WINAPI
  985. CM_Add_Res_Des_Ex(
  986. OUT PRES_DES prdResDes,
  987. IN LOG_CONF lcLogConf,
  988. IN RESOURCEID ResourceID,
  989. IN PCVOID ResourceData,
  990. IN ULONG ResourceLen,
  991. IN ULONG ulFlags,
  992. IN HMACHINE hMachine
  993. );
  994. CMAPI
  995. CONFIGRET
  996. WINAPI
  997. CM_Connect_MachineA(
  998. IN PCSTR UNCServerName,
  999. OUT PHMACHINE phMachine
  1000. );
  1001. CMAPI
  1002. CONFIGRET
  1003. WINAPI
  1004. CM_Connect_MachineW(
  1005. IN PCWSTR UNCServerName,
  1006. OUT PHMACHINE phMachine
  1007. );
  1008. #ifdef UNICODE
  1009. #define CM_Connect_Machine CM_Connect_MachineW
  1010. #else
  1011. #define CM_Connect_Machine CM_Connect_MachineA
  1012. #endif // UNICODE
  1013. CMAPI
  1014. CONFIGRET
  1015. WINAPI
  1016. CM_Create_DevNodeA(
  1017. OUT PDEVINST pdnDevInst,
  1018. IN DEVINSTID_A pDeviceID,
  1019. IN DEVINST dnParent,
  1020. IN ULONG ulFlags
  1021. );
  1022. CMAPI
  1023. CONFIGRET
  1024. WINAPI
  1025. CM_Create_DevNodeW(
  1026. OUT PDEVINST pdnDevInst,
  1027. IN DEVINSTID_W pDeviceID,
  1028. IN DEVINST dnParent,
  1029. IN ULONG ulFlags
  1030. );
  1031. CMAPI
  1032. CONFIGRET
  1033. WINAPI
  1034. CM_Create_DevNode_ExA(
  1035. OUT PDEVINST pdnDevInst,
  1036. IN DEVINSTID_A pDeviceID,
  1037. IN DEVINST dnParent,
  1038. IN ULONG ulFlags,
  1039. IN HANDLE hMachine
  1040. );
  1041. CMAPI
  1042. CONFIGRET
  1043. WINAPI
  1044. CM_Create_DevNode_ExW(
  1045. OUT PDEVINST pdnDevInst,
  1046. IN DEVINSTID_W pDeviceID,
  1047. IN DEVINST dnParent,
  1048. IN ULONG ulFlags,
  1049. IN HANDLE hMachine
  1050. );
  1051. #define CM_Create_DevInstW CM_Create_DevNodeW
  1052. #define CM_Create_DevInstA CM_Create_DevNodeA
  1053. #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
  1054. #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
  1055. #ifdef UNICODE
  1056. #define CM_Create_DevNode CM_Create_DevNodeW
  1057. #define CM_Create_DevInst CM_Create_DevNodeW
  1058. #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
  1059. #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
  1060. #else
  1061. #define CM_Create_DevNode CM_Create_DevNodeA
  1062. #define CM_Create_DevInst CM_Create_DevNodeA
  1063. #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
  1064. #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
  1065. #endif // UNICODE
  1066. CMAPI
  1067. CONFIGRET
  1068. WINAPI
  1069. CM_Create_Range_List(
  1070. OUT PRANGE_LIST prlh,
  1071. IN ULONG ulFlags
  1072. );
  1073. CMAPI
  1074. CONFIGRET
  1075. WINAPI
  1076. CM_Delete_Class_Key(
  1077. IN LPGUID ClassGuid,
  1078. IN ULONG ulFlags
  1079. );
  1080. CMAPI
  1081. CONFIGRET
  1082. WINAPI
  1083. CM_Delete_Class_Key_Ex(
  1084. IN LPGUID ClassGuid,
  1085. IN ULONG ulFlags,
  1086. IN HANDLE hMachine
  1087. );
  1088. CMAPI
  1089. CONFIGRET
  1090. WINAPI
  1091. CM_Delete_DevNode_Key(
  1092. IN DEVNODE dnDevNode,
  1093. IN ULONG ulHardwareProfile,
  1094. IN ULONG ulFlags
  1095. );
  1096. CMAPI
  1097. CONFIGRET
  1098. WINAPI
  1099. CM_Delete_DevNode_Key_Ex(
  1100. IN DEVNODE dnDevNode,
  1101. IN ULONG ulHardwareProfile,
  1102. IN ULONG ulFlags,
  1103. IN HANDLE hMachine
  1104. );
  1105. #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
  1106. #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
  1107. CMAPI
  1108. CONFIGRET
  1109. WINAPI
  1110. CM_Delete_Range(
  1111. IN DWORDLONG ullStartValue,
  1112. IN DWORDLONG ullEndValue,
  1113. IN RANGE_LIST rlh,
  1114. IN ULONG ulFlags
  1115. );
  1116. CMAPI
  1117. CONFIGRET
  1118. WINAPI
  1119. CM_Detect_Resource_Conflict(
  1120. IN DEVINST dnDevInst,
  1121. IN RESOURCEID ResourceID,
  1122. IN PCVOID ResourceData,
  1123. IN ULONG ResourceLen,
  1124. OUT PBOOL pbConflictDetected,
  1125. IN ULONG ulFlags
  1126. );
  1127. CMAPI
  1128. CONFIGRET
  1129. WINAPI
  1130. CM_Detect_Resource_Conflict_Ex(
  1131. IN DEVINST dnDevInst,
  1132. IN RESOURCEID ResourceID,
  1133. IN PCVOID ResourceData,
  1134. IN ULONG ResourceLen,
  1135. OUT PBOOL pbConflictDetected,
  1136. IN ULONG ulFlags,
  1137. IN HMACHINE hMachine
  1138. );
  1139. CMAPI
  1140. CONFIGRET
  1141. WINAPI
  1142. CM_Disable_DevNode(
  1143. IN DEVINST dnDevInst,
  1144. IN ULONG ulFlags
  1145. );
  1146. CMAPI
  1147. CONFIGRET
  1148. WINAPI
  1149. CM_Disable_DevNode_Ex(
  1150. IN DEVINST dnDevInst,
  1151. IN ULONG ulFlags,
  1152. IN HMACHINE hMachine
  1153. );
  1154. #define CM_Disable_DevInst CM_Disable_DevNode
  1155. #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
  1156. CMAPI
  1157. CONFIGRET
  1158. WINAPI
  1159. CM_Disconnect_Machine(
  1160. IN HMACHINE hMachine
  1161. );
  1162. CMAPI
  1163. CONFIGRET
  1164. WINAPI
  1165. CM_Dup_Range_List(
  1166. IN RANGE_LIST rlhOld,
  1167. IN RANGE_LIST rlhNew,
  1168. IN ULONG ulFlags
  1169. );
  1170. CMAPI
  1171. CONFIGRET
  1172. WINAPI
  1173. CM_Enable_DevNode(
  1174. IN DEVINST dnDevInst,
  1175. IN ULONG ulFlags
  1176. );
  1177. CMAPI
  1178. CONFIGRET
  1179. WINAPI
  1180. CM_Enable_DevNode_Ex(
  1181. IN DEVINST dnDevInst,
  1182. IN ULONG ulFlags,
  1183. IN HMACHINE hMachine
  1184. );
  1185. #define CM_Enable_DevInst CM_Enable_DevNode
  1186. #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
  1187. CMAPI
  1188. CONFIGRET
  1189. WINAPI
  1190. CM_Enumerate_Classes(
  1191. IN ULONG ulClassIndex,
  1192. OUT LPGUID ClassGuid,
  1193. IN ULONG ulFlags
  1194. );
  1195. CMAPI
  1196. CONFIGRET
  1197. WINAPI
  1198. CM_Enumerate_Classes_Ex(
  1199. IN ULONG ulClassIndex,
  1200. OUT LPGUID ClassGuid,
  1201. IN ULONG ulFlags,
  1202. IN HMACHINE hMachine
  1203. );
  1204. CMAPI
  1205. CONFIGRET
  1206. WINAPI
  1207. CM_Enumerate_EnumeratorsA(
  1208. IN ULONG ulEnumIndex,
  1209. OUT PCHAR Buffer,
  1210. IN OUT PULONG pulLength,
  1211. IN ULONG ulFlags
  1212. );
  1213. CMAPI
  1214. CONFIGRET
  1215. WINAPI
  1216. CM_Enumerate_EnumeratorsW(
  1217. IN ULONG ulEnumIndex,
  1218. OUT PWCHAR Buffer,
  1219. IN OUT PULONG pulLength,
  1220. IN ULONG ulFlags
  1221. );
  1222. CMAPI
  1223. CONFIGRET
  1224. WINAPI
  1225. CM_Enumerate_Enumerators_ExA(
  1226. IN ULONG ulEnumIndex,
  1227. OUT PCHAR Buffer,
  1228. IN OUT PULONG pulLength,
  1229. IN ULONG ulFlags,
  1230. IN HMACHINE hMachine
  1231. );
  1232. CMAPI
  1233. CONFIGRET
  1234. WINAPI
  1235. CM_Enumerate_Enumerators_ExW(
  1236. IN ULONG ulEnumIndex,
  1237. OUT PWCHAR Buffer,
  1238. IN OUT PULONG pulLength,
  1239. IN ULONG ulFlags,
  1240. IN HMACHINE hMachine
  1241. );
  1242. #ifdef UNICODE
  1243. #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
  1244. #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
  1245. #else
  1246. #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
  1247. #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
  1248. #endif // UNICODE
  1249. CMAPI
  1250. CONFIGRET
  1251. WINAPI
  1252. CM_Find_Range(
  1253. OUT PDWORDLONG pullStart,
  1254. IN DWORDLONG ullStart,
  1255. IN ULONG ulLength,
  1256. IN DWORDLONG ullAlignment,
  1257. IN DWORDLONG ullEnd,
  1258. IN RANGE_LIST rlh,
  1259. IN ULONG ulFlags
  1260. );
  1261. CMAPI
  1262. CONFIGRET
  1263. WINAPI
  1264. CM_First_Range(
  1265. IN RANGE_LIST rlh,
  1266. OUT PDWORDLONG pullStart,
  1267. OUT PDWORDLONG pullEnd,
  1268. OUT PRANGE_ELEMENT preElement,
  1269. IN ULONG ulFlags
  1270. );
  1271. CMAPI
  1272. CONFIGRET
  1273. WINAPI
  1274. CM_Free_Log_Conf(
  1275. IN LOG_CONF lcLogConfToBeFreed,
  1276. IN ULONG ulFlags
  1277. );
  1278. CMAPI
  1279. CONFIGRET
  1280. WINAPI
  1281. CM_Free_Log_Conf_Ex(
  1282. IN LOG_CONF lcLogConfToBeFreed,
  1283. IN ULONG ulFlags,
  1284. IN HMACHINE hMachine
  1285. );
  1286. CMAPI
  1287. CONFIGRET
  1288. WINAPI
  1289. CM_Free_Log_Conf_Handle(
  1290. IN LOG_CONF lcLogConf
  1291. );
  1292. CMAPI
  1293. CONFIGRET
  1294. WINAPI
  1295. CM_Free_Range_List(
  1296. IN RANGE_LIST rlh,
  1297. IN ULONG ulFlags
  1298. );
  1299. CMAPI
  1300. CONFIGRET
  1301. WINAPI
  1302. CM_Free_Res_Des(
  1303. OUT PRES_DES prdResDes,
  1304. IN RES_DES rdResDes,
  1305. IN ULONG ulFlags
  1306. );
  1307. CMAPI
  1308. CONFIGRET
  1309. WINAPI
  1310. CM_Free_Res_Des_Ex(
  1311. OUT PRES_DES prdResDes,
  1312. IN RES_DES rdResDes,
  1313. IN ULONG ulFlags,
  1314. IN HMACHINE hMachine
  1315. );
  1316. CMAPI
  1317. CONFIGRET
  1318. WINAPI
  1319. CM_Free_Res_Des_Handle(
  1320. IN RES_DES rdResDes
  1321. );
  1322. CMAPI
  1323. CONFIGRET
  1324. WINAPI
  1325. CM_Get_Child(
  1326. OUT PDEVINST pdnDevInst,
  1327. IN DEVINST dnDevInst,
  1328. IN ULONG ulFlags
  1329. );
  1330. CMAPI
  1331. CONFIGRET
  1332. WINAPI
  1333. CM_Get_Child_Ex(
  1334. OUT PDEVINST pdnDevInst,
  1335. IN DEVINST dnDevInst,
  1336. IN ULONG ulFlags,
  1337. IN HMACHINE hMachine
  1338. );
  1339. CMAPI
  1340. CONFIGRET
  1341. WINAPI
  1342. CM_Get_Class_NameA(
  1343. IN LPGUID ClassGuid,
  1344. OUT PCHAR Buffer,
  1345. IN OUT PULONG pulLength,
  1346. IN ULONG ulFlags
  1347. );
  1348. CMAPI
  1349. CONFIGRET
  1350. WINAPI
  1351. CM_Get_Class_NameW(
  1352. IN LPGUID ClassGuid,
  1353. OUT PWCHAR Buffer,
  1354. IN OUT PULONG pulLength,
  1355. IN ULONG ulFlags
  1356. );
  1357. CMAPI
  1358. CONFIGRET
  1359. WINAPI
  1360. CM_Get_Class_Name_ExA(
  1361. IN LPGUID ClassGuid,
  1362. OUT PCHAR Buffer,
  1363. IN OUT PULONG pulLength,
  1364. IN ULONG ulFlags,
  1365. IN HMACHINE hMachine
  1366. );
  1367. CMAPI
  1368. CONFIGRET
  1369. WINAPI
  1370. CM_Get_Class_Name_ExW(
  1371. IN LPGUID ClassGuid,
  1372. OUT PWCHAR Buffer,
  1373. IN OUT PULONG pulLength,
  1374. IN ULONG ulFlags,
  1375. IN HMACHINE hMachine
  1376. );
  1377. #ifdef UNICODE
  1378. #define CM_Get_Class_Name CM_Get_Class_NameW
  1379. #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
  1380. #else
  1381. #define CM_Get_Class_Name CM_Get_Class_NameA
  1382. #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
  1383. #endif // UNICODE
  1384. CMAPI
  1385. CONFIGRET
  1386. WINAPI
  1387. CM_Get_Class_Key_NameA(
  1388. IN LPGUID ClassGuid,
  1389. OUT LPSTR pszKeyName,
  1390. IN OUT PULONG pulLength,
  1391. IN ULONG ulFlags
  1392. );
  1393. CMAPI
  1394. CONFIGRET
  1395. WINAPI
  1396. CM_Get_Class_Key_NameW(
  1397. IN LPGUID ClassGuid,
  1398. OUT LPWSTR pszKeyName,
  1399. IN OUT PULONG pulLength,
  1400. IN ULONG ulFlags
  1401. );
  1402. CMAPI
  1403. CONFIGRET
  1404. WINAPI
  1405. CM_Get_Class_Key_Name_ExA(
  1406. IN LPGUID ClassGuid,
  1407. OUT LPSTR pszKeyName,
  1408. IN OUT PULONG pulLength,
  1409. IN ULONG ulFlags,
  1410. IN HMACHINE hMachine
  1411. );
  1412. CMAPI
  1413. CONFIGRET
  1414. WINAPI
  1415. CM_Get_Class_Key_Name_ExW(
  1416. IN LPGUID ClassGuid,
  1417. OUT LPWSTR pszKeyName,
  1418. IN OUT PULONG pulLength,
  1419. IN ULONG ulFlags,
  1420. IN HMACHINE hMachine
  1421. );
  1422. #ifdef UNICODE
  1423. #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
  1424. #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
  1425. #else
  1426. #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
  1427. #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
  1428. #endif // UNICODE
  1429. CMAPI
  1430. CONFIGRET
  1431. WINAPI
  1432. CM_Get_Depth(
  1433. OUT PULONG pulDepth,
  1434. IN DEVINST dnDevInst,
  1435. IN ULONG ulFlags
  1436. );
  1437. CMAPI
  1438. CONFIGRET
  1439. WINAPI
  1440. CM_Get_Depth_Ex(
  1441. OUT PULONG pulDepth,
  1442. IN DEVINST dnDevInst,
  1443. IN ULONG ulFlags,
  1444. IN HMACHINE hMachine
  1445. );
  1446. CMAPI
  1447. CONFIGRET
  1448. WINAPI
  1449. CM_Get_Device_IDA(
  1450. IN DEVINST dnDevInst,
  1451. OUT PCHAR Buffer,
  1452. IN ULONG BufferLen,
  1453. IN ULONG ulFlags
  1454. );
  1455. CMAPI
  1456. CONFIGRET
  1457. WINAPI
  1458. CM_Get_Device_IDW(
  1459. IN DEVINST dnDevInst,
  1460. OUT PWCHAR Buffer,
  1461. IN ULONG BufferLen,
  1462. IN ULONG ulFlags
  1463. );
  1464. CMAPI
  1465. CONFIGRET
  1466. WINAPI
  1467. CM_Get_Device_ID_ExA(
  1468. IN DEVINST dnDevInst,
  1469. OUT PCHAR Buffer,
  1470. IN ULONG BufferLen,
  1471. IN ULONG ulFlags,
  1472. IN HMACHINE hMachine
  1473. );
  1474. CMAPI
  1475. CONFIGRET
  1476. WINAPI
  1477. CM_Get_Device_ID_ExW(
  1478. IN DEVINST dnDevInst,
  1479. OUT PWCHAR Buffer,
  1480. IN ULONG BufferLen,
  1481. IN ULONG ulFlags,
  1482. IN HMACHINE hMachine
  1483. );
  1484. #ifdef UNICODE
  1485. #define CM_Get_Device_ID CM_Get_Device_IDW
  1486. #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
  1487. #else
  1488. #define CM_Get_Device_ID CM_Get_Device_IDA
  1489. #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
  1490. #endif // UNICODE
  1491. CMAPI
  1492. CONFIGRET
  1493. WINAPI
  1494. CM_Get_Device_ID_ListA(
  1495. IN PCSTR pszFilter, OPTIONAL
  1496. OUT PCHAR Buffer,
  1497. IN ULONG BufferLen,
  1498. IN ULONG ulFlags
  1499. );
  1500. CMAPI
  1501. CONFIGRET
  1502. WINAPI
  1503. CM_Get_Device_ID_ListW(
  1504. IN PCWSTR pszFilter, OPTIONAL
  1505. OUT PWCHAR Buffer,
  1506. IN ULONG BufferLen,
  1507. IN ULONG ulFlags
  1508. );
  1509. CMAPI
  1510. CONFIGRET
  1511. WINAPI
  1512. CM_Get_Device_ID_List_ExA(
  1513. IN PCSTR pszFilter, OPTIONAL
  1514. OUT PCHAR Buffer,
  1515. IN ULONG BufferLen,
  1516. IN ULONG ulFlags,
  1517. IN HMACHINE hMachine
  1518. );
  1519. CMAPI
  1520. CONFIGRET
  1521. WINAPI
  1522. CM_Get_Device_ID_List_ExW(
  1523. IN PCWSTR pszFilter, OPTIONAL
  1524. OUT PWCHAR Buffer,
  1525. IN ULONG BufferLen,
  1526. IN ULONG ulFlags,
  1527. IN HMACHINE hMachine
  1528. );
  1529. #ifdef UNICODE
  1530. #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
  1531. #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
  1532. #else
  1533. #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
  1534. #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
  1535. #endif // UNICODE
  1536. CMAPI
  1537. CONFIGRET
  1538. WINAPI
  1539. CM_Get_Device_ID_List_SizeA(
  1540. OUT PULONG pulLen,
  1541. IN PCSTR pszFilter, OPTIONAL
  1542. IN ULONG ulFlags
  1543. );
  1544. CMAPI
  1545. CONFIGRET
  1546. WINAPI
  1547. CM_Get_Device_ID_List_SizeW(
  1548. OUT PULONG pulLen,
  1549. IN PCWSTR pszFilter, OPTIONAL
  1550. IN ULONG ulFlags
  1551. );
  1552. CMAPI
  1553. CONFIGRET
  1554. WINAPI
  1555. CM_Get_Device_ID_List_Size_ExA(
  1556. OUT PULONG pulLen,
  1557. IN PCSTR pszFilter, OPTIONAL
  1558. IN ULONG ulFlags,
  1559. IN HMACHINE hMachine
  1560. );
  1561. CMAPI
  1562. CONFIGRET
  1563. WINAPI
  1564. CM_Get_Device_ID_List_Size_ExW(
  1565. OUT PULONG pulLen,
  1566. IN PCWSTR pszFilter, OPTIONAL
  1567. IN ULONG ulFlags,
  1568. IN HMACHINE hMachine
  1569. );
  1570. #ifdef UNICODE
  1571. #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
  1572. #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
  1573. #else
  1574. #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
  1575. #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
  1576. #endif // UNICODE
  1577. CMAPI
  1578. CONFIGRET
  1579. WINAPI
  1580. CM_Get_Device_ID_Size(
  1581. OUT PULONG pulLen,
  1582. IN DEVINST dnDevInst,
  1583. IN ULONG ulFlags
  1584. );
  1585. CMAPI
  1586. CONFIGRET
  1587. WINAPI
  1588. CM_Get_Device_ID_Size_Ex(
  1589. OUT PULONG pulLen,
  1590. IN DEVINST dnDevInst,
  1591. IN ULONG ulFlags,
  1592. IN HMACHINE hMachine
  1593. );
  1594. CMAPI
  1595. CONFIGRET
  1596. WINAPI
  1597. CM_Get_DevNode_Registry_PropertyA(
  1598. IN DEVINST dnDevInst,
  1599. IN ULONG ulProperty,
  1600. OUT PULONG pulRegDataType, OPTIONAL
  1601. OUT PVOID Buffer, OPTIONAL
  1602. IN OUT PULONG pulLength,
  1603. IN ULONG ulFlags
  1604. );
  1605. CMAPI
  1606. CONFIGRET
  1607. WINAPI
  1608. CM_Get_DevNode_Registry_PropertyW(
  1609. IN DEVINST dnDevInst,
  1610. IN ULONG ulProperty,
  1611. OUT PULONG pulRegDataType, OPTIONAL
  1612. OUT PVOID Buffer, OPTIONAL
  1613. IN OUT PULONG pulLength,
  1614. IN ULONG ulFlags
  1615. );
  1616. CMAPI
  1617. CONFIGRET
  1618. WINAPI
  1619. CM_Get_DevNode_Registry_Property_ExA(
  1620. IN DEVINST dnDevInst,
  1621. IN ULONG ulProperty,
  1622. OUT PULONG pulRegDataType, OPTIONAL
  1623. OUT PVOID Buffer, OPTIONAL
  1624. IN OUT PULONG pulLength,
  1625. IN ULONG ulFlags,
  1626. IN HMACHINE hMachine
  1627. );
  1628. CMAPI
  1629. CONFIGRET
  1630. WINAPI
  1631. CM_Get_DevNode_Registry_Property_ExW(
  1632. IN DEVINST dnDevInst,
  1633. IN ULONG ulProperty,
  1634. OUT PULONG pulRegDataType, OPTIONAL
  1635. OUT PVOID Buffer, OPTIONAL
  1636. IN OUT PULONG pulLength,
  1637. IN ULONG ulFlags,
  1638. IN HMACHINE hMachine
  1639. );
  1640. #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
  1641. #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
  1642. #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
  1643. #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
  1644. #ifdef UNICODE
  1645. #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
  1646. #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
  1647. #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
  1648. #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
  1649. #else
  1650. #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
  1651. #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
  1652. #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
  1653. #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
  1654. #endif // UNICODE
  1655. CMAPI
  1656. CONFIGRET
  1657. WINAPI
  1658. CM_Get_DevNode_Custom_PropertyA(
  1659. IN DEVINST dnDevInst,
  1660. IN PCSTR pszCustomPropertyName,
  1661. OUT PULONG pulRegDataType, OPTIONAL
  1662. OUT PVOID Buffer, OPTIONAL
  1663. IN OUT PULONG pulLength,
  1664. IN ULONG ulFlags
  1665. );
  1666. CMAPI
  1667. CONFIGRET
  1668. WINAPI
  1669. CM_Get_DevNode_Custom_PropertyW(
  1670. IN DEVINST dnDevInst,
  1671. IN PCWSTR pszCustomPropertyName,
  1672. OUT PULONG pulRegDataType, OPTIONAL
  1673. OUT PVOID Buffer, OPTIONAL
  1674. IN OUT PULONG pulLength,
  1675. IN ULONG ulFlags
  1676. );
  1677. CMAPI
  1678. CONFIGRET
  1679. WINAPI
  1680. CM_Get_DevNode_Custom_Property_ExA(
  1681. IN DEVINST dnDevInst,
  1682. IN PCSTR pszCustomPropertyName,
  1683. OUT PULONG pulRegDataType, OPTIONAL
  1684. OUT PVOID Buffer, OPTIONAL
  1685. IN OUT PULONG pulLength,
  1686. IN ULONG ulFlags,
  1687. IN HMACHINE hMachine
  1688. );
  1689. CMAPI
  1690. CONFIGRET
  1691. WINAPI
  1692. CM_Get_DevNode_Custom_Property_ExW(
  1693. IN DEVINST dnDevInst,
  1694. IN PCWSTR pszCustomPropertyName,
  1695. OUT PULONG pulRegDataType, OPTIONAL
  1696. OUT PVOID Buffer, OPTIONAL
  1697. IN OUT PULONG pulLength,
  1698. IN ULONG ulFlags,
  1699. IN HMACHINE hMachine
  1700. );
  1701. #define CM_Get_DevInst_Custom_PropertyW CM_Get_DevNode_Custom_PropertyW
  1702. #define CM_Get_DevInst_Custom_PropertyA CM_Get_DevNode_Custom_PropertyA
  1703. #define CM_Get_DevInst_Custom_Property_ExW CM_Get_DevNode_Custom_Property_ExW
  1704. #define CM_Get_DevInst_Custom_Property_ExA CM_Get_DevNode_Custom_Property_ExA
  1705. #ifdef UNICODE
  1706. #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyW
  1707. #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
  1708. #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyW
  1709. #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
  1710. #else
  1711. #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyA
  1712. #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
  1713. #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyA
  1714. #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
  1715. #endif // UNICODE
  1716. CMAPI
  1717. CONFIGRET
  1718. WINAPI
  1719. CM_Get_DevNode_Status(
  1720. OUT PULONG pulStatus,
  1721. OUT PULONG pulProblemNumber,
  1722. IN DEVINST dnDevInst,
  1723. IN ULONG ulFlags
  1724. );
  1725. CMAPI
  1726. CONFIGRET
  1727. WINAPI
  1728. CM_Get_DevNode_Status_Ex(
  1729. OUT PULONG pulStatus,
  1730. OUT PULONG pulProblemNumber,
  1731. IN DEVINST dnDevInst,
  1732. IN ULONG ulFlags,
  1733. IN HMACHINE hMachine
  1734. );
  1735. #define CM_Get_DevInst_Status CM_Get_DevNode_Status
  1736. #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
  1737. CMAPI
  1738. CONFIGRET
  1739. WINAPI
  1740. CM_Get_First_Log_Conf(
  1741. OUT PLOG_CONF plcLogConf, OPTIONAL
  1742. IN DEVINST dnDevInst,
  1743. IN ULONG ulFlags
  1744. );
  1745. CMAPI
  1746. CONFIGRET
  1747. WINAPI
  1748. CM_Get_First_Log_Conf_Ex(
  1749. OUT PLOG_CONF plcLogConf, OPTIONAL
  1750. IN DEVINST dnDevInst,
  1751. IN ULONG ulFlags,
  1752. IN HMACHINE hMachine
  1753. );
  1754. CMAPI
  1755. CONFIGRET
  1756. WINAPI
  1757. CM_Get_Global_State(
  1758. OUT PULONG pulState,
  1759. IN ULONG ulFlags
  1760. );
  1761. CMAPI
  1762. CONFIGRET
  1763. WINAPI
  1764. CM_Get_Global_State_Ex(
  1765. OUT PULONG pulState,
  1766. IN ULONG ulFlags,
  1767. IN HMACHINE hMachine
  1768. );
  1769. CMAPI
  1770. CONFIGRET
  1771. WINAPI
  1772. CM_Get_Hardware_Profile_InfoA(
  1773. IN ULONG ulIndex,
  1774. OUT PHWPROFILEINFO_A pHWProfileInfo,
  1775. IN ULONG ulFlags
  1776. );
  1777. CMAPI
  1778. CONFIGRET
  1779. WINAPI
  1780. CM_Get_Hardware_Profile_Info_ExA(
  1781. IN ULONG ulIndex,
  1782. OUT PHWPROFILEINFO_A pHWProfileInfo,
  1783. IN ULONG ulFlags,
  1784. IN HMACHINE hMachine
  1785. );
  1786. CMAPI
  1787. CONFIGRET
  1788. WINAPI
  1789. CM_Get_Hardware_Profile_InfoW(
  1790. IN ULONG ulIndex,
  1791. OUT PHWPROFILEINFO_W pHWProfileInfo,
  1792. IN ULONG ulFlags
  1793. );
  1794. CMAPI
  1795. CONFIGRET
  1796. WINAPI
  1797. CM_Get_Hardware_Profile_Info_ExW(
  1798. IN ULONG ulIndex,
  1799. OUT PHWPROFILEINFO_W pHWProfileInfo,
  1800. IN ULONG ulFlags,
  1801. IN HMACHINE hMachine
  1802. );
  1803. #ifdef UNICODE
  1804. #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoW
  1805. #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExW
  1806. #else
  1807. #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoA
  1808. #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExA
  1809. #endif // UNICODE
  1810. CMAPI
  1811. CONFIGRET
  1812. WINAPI
  1813. CM_Get_HW_Prof_FlagsA(
  1814. IN DEVINSTID_A szDevInstName,
  1815. IN ULONG ulHardwareProfile,
  1816. OUT PULONG pulValue,
  1817. IN ULONG ulFlags
  1818. );
  1819. CMAPI
  1820. CONFIGRET
  1821. WINAPI
  1822. CM_Get_HW_Prof_FlagsW(
  1823. IN DEVINSTID_W szDevInstName,
  1824. IN ULONG ulHardwareProfile,
  1825. OUT PULONG pulValue,
  1826. IN ULONG ulFlags
  1827. );
  1828. CMAPI
  1829. CONFIGRET
  1830. WINAPI
  1831. CM_Get_HW_Prof_Flags_ExA(
  1832. IN DEVINSTID_A szDevInstName,
  1833. IN ULONG ulHardwareProfile,
  1834. OUT PULONG pulValue,
  1835. IN ULONG ulFlags,
  1836. IN HMACHINE hMachine
  1837. );
  1838. CMAPI
  1839. CONFIGRET
  1840. WINAPI
  1841. CM_Get_HW_Prof_Flags_ExW(
  1842. IN DEVINSTID_W szDevInstName,
  1843. IN ULONG ulHardwareProfile,
  1844. OUT PULONG pulValue,
  1845. IN ULONG ulFlags,
  1846. IN HMACHINE hMachine
  1847. );
  1848. #ifdef UNICODE
  1849. #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
  1850. #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
  1851. #else
  1852. #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
  1853. #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
  1854. #endif // UNICODE
  1855. CMAPI
  1856. CONFIGRET
  1857. WINAPI
  1858. CM_Get_Device_Interface_AliasA(
  1859. IN LPCSTR pszDeviceInterface,
  1860. IN LPGUID AliasInterfaceGuid,
  1861. OUT LPSTR pszAliasDeviceInterface,
  1862. IN OUT PULONG pulLength,
  1863. IN ULONG ulFlags
  1864. );
  1865. CMAPI
  1866. CONFIGRET
  1867. WINAPI
  1868. CM_Get_Device_Interface_AliasW(
  1869. IN LPCWSTR pszDeviceInterface,
  1870. IN LPGUID AliasInterfaceGuid,
  1871. OUT LPWSTR pszAliasDeviceInterface,
  1872. IN OUT PULONG pulLength,
  1873. IN ULONG ulFlags
  1874. );
  1875. CMAPI
  1876. CONFIGRET
  1877. WINAPI
  1878. CM_Get_Device_Interface_Alias_ExA(
  1879. IN LPCSTR pszDeviceInterface,
  1880. IN LPGUID AliasInterfaceGuid,
  1881. OUT LPSTR pszAliasDeviceInterface,
  1882. IN OUT PULONG pulLength,
  1883. IN ULONG ulFlags,
  1884. IN HMACHINE hMachine
  1885. );
  1886. CMAPI
  1887. CONFIGRET
  1888. WINAPI
  1889. CM_Get_Device_Interface_Alias_ExW(
  1890. IN LPCWSTR pszDeviceInterface,
  1891. IN LPGUID AliasInterfaceGuid,
  1892. OUT LPWSTR pszAliasDeviceInterface,
  1893. IN OUT PULONG pulLength,
  1894. IN ULONG ulFlags,
  1895. IN HMACHINE hMachine
  1896. );
  1897. #ifdef UNICODE
  1898. #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasW
  1899. #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExW
  1900. #else
  1901. #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasA
  1902. #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExA
  1903. #endif // UNICODE
  1904. CMAPI
  1905. CONFIGRET
  1906. WINAPI
  1907. CM_Get_Device_Interface_ListA(
  1908. IN LPGUID InterfaceClassGuid,
  1909. IN DEVINSTID_A pDeviceID, OPTIONAL
  1910. OUT PCHAR Buffer,
  1911. IN ULONG BufferLen,
  1912. IN ULONG ulFlags
  1913. );
  1914. CMAPI
  1915. CONFIGRET
  1916. WINAPI
  1917. CM_Get_Device_Interface_ListW(
  1918. IN LPGUID InterfaceClassGuid,
  1919. IN DEVINSTID_W pDeviceID, OPTIONAL
  1920. OUT PWCHAR Buffer,
  1921. IN ULONG BufferLen,
  1922. IN ULONG ulFlags
  1923. );
  1924. CMAPI
  1925. CONFIGRET
  1926. WINAPI
  1927. CM_Get_Device_Interface_List_ExA(
  1928. IN LPGUID InterfaceClassGuid,
  1929. IN DEVINSTID_A pDeviceID, OPTIONAL
  1930. OUT PCHAR Buffer,
  1931. IN ULONG BufferLen,
  1932. IN ULONG ulFlags,
  1933. IN HMACHINE hMachine
  1934. );
  1935. CMAPI
  1936. CONFIGRET
  1937. WINAPI
  1938. CM_Get_Device_Interface_List_ExW(
  1939. IN LPGUID InterfaceClassGuid,
  1940. IN DEVINSTID_W pDeviceID, OPTIONAL
  1941. OUT PWCHAR Buffer,
  1942. IN ULONG BufferLen,
  1943. IN ULONG ulFlags,
  1944. IN HMACHINE hMachine
  1945. );
  1946. #ifdef UNICODE
  1947. #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListW
  1948. #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExW
  1949. #else
  1950. #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListA
  1951. #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExA
  1952. #endif // UNICODE
  1953. CMAPI
  1954. CONFIGRET
  1955. WINAPI
  1956. CM_Get_Device_Interface_List_SizeA(
  1957. IN PULONG pulLen,
  1958. IN LPGUID InterfaceClassGuid,
  1959. IN DEVINSTID_A pDeviceID, OPTIONAL
  1960. IN ULONG ulFlags
  1961. );
  1962. CMAPI
  1963. CONFIGRET
  1964. WINAPI
  1965. CM_Get_Device_Interface_List_SizeW(
  1966. IN PULONG pulLen,
  1967. IN LPGUID InterfaceClassGuid,
  1968. IN DEVINSTID_W pDeviceID, OPTIONAL
  1969. IN ULONG ulFlags
  1970. );
  1971. CMAPI
  1972. CONFIGRET
  1973. WINAPI
  1974. CM_Get_Device_Interface_List_Size_ExA(
  1975. IN PULONG pulLen,
  1976. IN LPGUID InterfaceClassGuid,
  1977. IN DEVINSTID_A pDeviceID, OPTIONAL
  1978. IN ULONG ulFlags,
  1979. IN HMACHINE hMachine
  1980. );
  1981. CMAPI
  1982. CONFIGRET
  1983. WINAPI
  1984. CM_Get_Device_Interface_List_Size_ExW(
  1985. IN PULONG pulLen,
  1986. IN LPGUID InterfaceClassGuid,
  1987. IN DEVINSTID_W pDeviceID, OPTIONAL
  1988. IN ULONG ulFlags,
  1989. IN HMACHINE hMachine
  1990. );
  1991. #ifdef UNICODE
  1992. #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeW
  1993. #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExW
  1994. #else
  1995. #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeA
  1996. #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExA
  1997. #endif // UNICODE
  1998. CMAPI
  1999. CONFIGRET
  2000. WINAPI
  2001. CM_Get_Log_Conf_Priority(
  2002. IN LOG_CONF lcLogConf,
  2003. OUT PPRIORITY pPriority,
  2004. IN ULONG ulFlags
  2005. );
  2006. CMAPI
  2007. CONFIGRET
  2008. WINAPI
  2009. CM_Get_Log_Conf_Priority_Ex(
  2010. IN LOG_CONF lcLogConf,
  2011. OUT PPRIORITY pPriority,
  2012. IN ULONG ulFlags,
  2013. IN HMACHINE hMachine
  2014. );
  2015. CMAPI
  2016. CONFIGRET
  2017. WINAPI
  2018. CM_Get_Next_Log_Conf(
  2019. OUT PLOG_CONF plcLogConf, OPTIONAL
  2020. IN LOG_CONF lcLogConf,
  2021. IN ULONG ulFlags
  2022. );
  2023. CMAPI
  2024. CONFIGRET
  2025. WINAPI
  2026. CM_Get_Next_Log_Conf_Ex(
  2027. OUT PLOG_CONF plcLogConf, OPTIONAL
  2028. IN LOG_CONF lcLogConf,
  2029. IN ULONG ulFlags,
  2030. IN HMACHINE hMachine
  2031. );
  2032. CMAPI
  2033. CONFIGRET
  2034. WINAPI
  2035. CM_Get_Parent(
  2036. OUT PDEVINST pdnDevInst,
  2037. IN DEVINST dnDevInst,
  2038. IN ULONG ulFlags
  2039. );
  2040. CMAPI
  2041. CONFIGRET
  2042. WINAPI
  2043. CM_Get_Parent_Ex(
  2044. OUT PDEVINST pdnDevInst,
  2045. IN DEVINST dnDevInst,
  2046. IN ULONG ulFlags,
  2047. IN HMACHINE hMachine
  2048. );
  2049. CMAPI
  2050. CONFIGRET
  2051. WINAPI
  2052. CM_Get_Res_Des_Data(
  2053. IN RES_DES rdResDes,
  2054. OUT PVOID Buffer,
  2055. IN ULONG BufferLen,
  2056. IN ULONG ulFlags
  2057. );
  2058. CMAPI
  2059. CONFIGRET
  2060. WINAPI
  2061. CM_Get_Res_Des_Data_Ex(
  2062. IN RES_DES rdResDes,
  2063. OUT PVOID Buffer,
  2064. IN ULONG BufferLen,
  2065. IN ULONG ulFlags,
  2066. IN HMACHINE hMachine
  2067. );
  2068. CMAPI
  2069. CONFIGRET
  2070. WINAPI
  2071. CM_Get_Res_Des_Data_Size(
  2072. OUT PULONG pulSize,
  2073. IN RES_DES rdResDes,
  2074. IN ULONG ulFlags
  2075. );
  2076. CMAPI
  2077. CONFIGRET
  2078. WINAPI
  2079. CM_Get_Res_Des_Data_Size_Ex(
  2080. OUT PULONG pulSize,
  2081. IN RES_DES rdResDes,
  2082. IN ULONG ulFlags,
  2083. IN HMACHINE hMachine
  2084. );
  2085. CMAPI
  2086. CONFIGRET
  2087. WINAPI
  2088. CM_Get_Sibling(
  2089. OUT PDEVINST pdnDevInst,
  2090. IN DEVINST DevInst,
  2091. IN ULONG ulFlags
  2092. );
  2093. CMAPI
  2094. CONFIGRET
  2095. WINAPI
  2096. CM_Get_Sibling_Ex(
  2097. OUT PDEVINST pdnDevInst,
  2098. IN DEVINST DevInst,
  2099. IN ULONG ulFlags,
  2100. IN HMACHINE hMachine
  2101. );
  2102. CMAPI
  2103. WORD
  2104. WINAPI
  2105. CM_Get_Version(
  2106. VOID
  2107. );
  2108. CMAPI
  2109. WORD
  2110. WINAPI
  2111. CM_Get_Version_Ex(
  2112. IN HMACHINE hMachine
  2113. );
  2114. CMAPI
  2115. BOOL
  2116. WINAPI
  2117. CM_Is_Version_Available(
  2118. IN WORD wVersion
  2119. );
  2120. CMAPI
  2121. BOOL
  2122. WINAPI
  2123. CM_Is_Version_Available_Ex(
  2124. IN WORD wVersion,
  2125. IN HMACHINE hMachine
  2126. );
  2127. CMAPI
  2128. CONFIGRET
  2129. WINAPI
  2130. CM_Intersect_Range_List(
  2131. IN RANGE_LIST rlhOld1,
  2132. IN RANGE_LIST rlhOld2,
  2133. IN RANGE_LIST rlhNew,
  2134. IN ULONG ulFlags
  2135. );
  2136. CMAPI
  2137. CONFIGRET
  2138. WINAPI
  2139. CM_Invert_Range_List(
  2140. IN RANGE_LIST rlhOld,
  2141. IN RANGE_LIST rlhNew,
  2142. IN DWORDLONG ullMaxValue,
  2143. IN ULONG ulFlags
  2144. );
  2145. CMAPI
  2146. CONFIGRET
  2147. WINAPI
  2148. CM_Locate_DevNodeA(
  2149. OUT PDEVINST pdnDevInst,
  2150. IN DEVINSTID_A pDeviceID, OPTIONAL
  2151. IN ULONG ulFlags
  2152. );
  2153. CMAPI
  2154. CONFIGRET
  2155. WINAPI
  2156. CM_Locate_DevNodeW(
  2157. OUT PDEVINST pdnDevInst,
  2158. IN DEVINSTID_W pDeviceID, OPTIONAL
  2159. IN ULONG ulFlags
  2160. );
  2161. CMAPI
  2162. CONFIGRET
  2163. WINAPI
  2164. CM_Locate_DevNode_ExA(
  2165. OUT PDEVINST pdnDevInst,
  2166. IN DEVINSTID_A pDeviceID, OPTIONAL
  2167. IN ULONG ulFlags,
  2168. IN HMACHINE hMachine
  2169. );
  2170. CMAPI
  2171. CONFIGRET
  2172. WINAPI
  2173. CM_Locate_DevNode_ExW(
  2174. OUT PDEVINST pdnDevInst,
  2175. IN DEVINSTID_W pDeviceID, OPTIONAL
  2176. IN ULONG ulFlags,
  2177. IN HMACHINE hMachine
  2178. );
  2179. #define CM_Locate_DevInstA CM_Locate_DevNodeA
  2180. #define CM_Locate_DevInstW CM_Locate_DevNodeW
  2181. #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
  2182. #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
  2183. #ifdef UNICODE
  2184. #define CM_Locate_DevNode CM_Locate_DevNodeW
  2185. #define CM_Locate_DevInst CM_Locate_DevNodeW
  2186. #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
  2187. #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
  2188. #else
  2189. #define CM_Locate_DevNode CM_Locate_DevNodeA
  2190. #define CM_Locate_DevInst CM_Locate_DevNodeA
  2191. #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
  2192. #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
  2193. #endif // UNICODE
  2194. CMAPI
  2195. CONFIGRET
  2196. WINAPI
  2197. CM_Merge_Range_List(
  2198. IN RANGE_LIST rlhOld1,
  2199. IN RANGE_LIST rlhOld2,
  2200. IN RANGE_LIST rlhNew,
  2201. IN ULONG ulFlags
  2202. );
  2203. CMAPI
  2204. CONFIGRET
  2205. WINAPI
  2206. CM_Modify_Res_Des(
  2207. OUT PRES_DES prdResDes,
  2208. IN RES_DES rdResDes,
  2209. IN RESOURCEID ResourceID,
  2210. IN PCVOID ResourceData,
  2211. IN ULONG ResourceLen,
  2212. IN ULONG ulFlags
  2213. );
  2214. CMAPI
  2215. CONFIGRET
  2216. WINAPI
  2217. CM_Modify_Res_Des_Ex(
  2218. OUT PRES_DES prdResDes,
  2219. IN RES_DES rdResDes,
  2220. IN RESOURCEID ResourceID,
  2221. IN PCVOID ResourceData,
  2222. IN ULONG ResourceLen,
  2223. IN ULONG ulFlags,
  2224. IN HMACHINE hMachine
  2225. );
  2226. CMAPI
  2227. CONFIGRET
  2228. WINAPI
  2229. CM_Move_DevNode(
  2230. IN DEVINST dnFromDevInst,
  2231. IN DEVINST dnToDevInst,
  2232. IN ULONG ulFlags
  2233. );
  2234. CMAPI
  2235. CONFIGRET
  2236. WINAPI
  2237. CM_Move_DevNode_Ex(
  2238. IN DEVINST dnFromDevInst,
  2239. IN DEVINST dnToDevInst,
  2240. IN ULONG ulFlags,
  2241. IN HMACHINE hMachine
  2242. );
  2243. #define CM_Move_DevInst CM_Move_DevNode
  2244. #define CM_Move_DevInst_Ex CM_Move_DevNode_Ex
  2245. CMAPI
  2246. CONFIGRET
  2247. WINAPI
  2248. CM_Next_Range(
  2249. IN OUT PRANGE_ELEMENT preElement,
  2250. OUT PDWORDLONG pullStart,
  2251. OUT PDWORDLONG pullEnd,
  2252. IN ULONG ulFlags
  2253. );
  2254. CMAPI
  2255. CONFIGRET
  2256. WINAPI
  2257. CM_Get_Next_Res_Des(
  2258. OUT PRES_DES prdResDes,
  2259. IN RES_DES rdResDes,
  2260. IN RESOURCEID ForResource,
  2261. OUT PRESOURCEID pResourceID,
  2262. IN ULONG ulFlags
  2263. );
  2264. CMAPI
  2265. CONFIGRET
  2266. WINAPI
  2267. CM_Get_Next_Res_Des_Ex(
  2268. OUT PRES_DES prdResDes,
  2269. IN RES_DES rdResDes,
  2270. IN RESOURCEID ForResource,
  2271. OUT PRESOURCEID pResourceID,
  2272. IN ULONG ulFlags,
  2273. IN HMACHINE hMachine
  2274. );
  2275. CMAPI
  2276. CONFIGRET
  2277. WINAPI
  2278. CM_Open_Class_KeyA(
  2279. IN LPGUID ClassGuid, OPTIONAL
  2280. IN LPCSTR pszClassName, OPTIONAL
  2281. IN REGSAM samDesired,
  2282. IN REGDISPOSITION Disposition,
  2283. OUT PHKEY phkClass,
  2284. IN ULONG ulFlags
  2285. );
  2286. CMAPI
  2287. CONFIGRET
  2288. WINAPI
  2289. CM_Open_Class_KeyW(
  2290. IN LPGUID ClassGuid, OPTIONAL
  2291. IN LPCWSTR pszClassName, OPTIONAL
  2292. IN REGSAM samDesired,
  2293. IN REGDISPOSITION Disposition,
  2294. OUT PHKEY phkClass,
  2295. IN ULONG ulFlags
  2296. );
  2297. CMAPI
  2298. CONFIGRET
  2299. WINAPI
  2300. CM_Open_Class_Key_ExA(
  2301. IN LPGUID pszClassGuid, OPTIONAL
  2302. IN LPCSTR pszClassName, OPTIONAL
  2303. IN REGSAM samDesired,
  2304. IN REGDISPOSITION Disposition,
  2305. OUT PHKEY phkClass,
  2306. IN ULONG ulFlags,
  2307. IN HMACHINE hMachine
  2308. );
  2309. CMAPI
  2310. CONFIGRET
  2311. WINAPI
  2312. CM_Open_Class_Key_ExW(
  2313. IN LPGUID pszClassGuid, OPTIONAL
  2314. IN LPCWSTR pszClassName, OPTIONAL
  2315. IN REGSAM samDesired,
  2316. IN REGDISPOSITION Disposition,
  2317. OUT PHKEY phkClass,
  2318. IN ULONG ulFlags,
  2319. IN HMACHINE hMachine
  2320. );
  2321. #ifdef UNICODE
  2322. #define CM_Open_Class_Key CM_Open_Class_KeyW
  2323. #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
  2324. #else
  2325. #define CM_Open_Class_Key CM_Open_Class_KeyA
  2326. #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
  2327. #endif // UNICODE
  2328. CMAPI
  2329. CONFIGRET
  2330. WINAPI
  2331. CM_Open_DevNode_Key(
  2332. IN DEVINST dnDevNode,
  2333. IN REGSAM samDesired,
  2334. IN ULONG ulHardwareProfile,
  2335. IN REGDISPOSITION Disposition,
  2336. OUT PHKEY phkDevice,
  2337. IN ULONG ulFlags
  2338. );
  2339. CMAPI
  2340. CONFIGRET
  2341. WINAPI
  2342. CM_Open_DevNode_Key_Ex(
  2343. IN DEVINST dnDevNode,
  2344. IN REGSAM samDesired,
  2345. IN ULONG ulHardwareProfile,
  2346. IN REGDISPOSITION Disposition,
  2347. OUT PHKEY phkDevice,
  2348. IN ULONG ulFlags,
  2349. IN HMACHINE hMachine
  2350. );
  2351. #define CM_Open_DevInst_Key CM_Open_DevNode_Key
  2352. #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
  2353. CMAPI
  2354. CONFIGRET
  2355. WINAPI
  2356. CM_Query_Arbitrator_Free_Data(
  2357. OUT PVOID pData,
  2358. IN ULONG DataLen,
  2359. IN DEVINST dnDevInst,
  2360. IN RESOURCEID ResourceID,
  2361. IN ULONG ulFlags
  2362. );
  2363. CMAPI
  2364. CONFIGRET
  2365. WINAPI
  2366. CM_Query_Arbitrator_Free_Data_Ex(
  2367. OUT PVOID pData,
  2368. IN ULONG DataLen,
  2369. IN DEVINST dnDevInst,
  2370. IN RESOURCEID ResourceID,
  2371. IN ULONG ulFlags,
  2372. IN HMACHINE hMachine
  2373. );
  2374. CMAPI
  2375. CONFIGRET
  2376. WINAPI
  2377. CM_Query_Arbitrator_Free_Size(
  2378. OUT PULONG pulSize,
  2379. IN DEVINST dnDevInst,
  2380. IN RESOURCEID ResourceID,
  2381. IN ULONG ulFlags
  2382. );
  2383. CMAPI
  2384. CONFIGRET
  2385. WINAPI
  2386. CM_Query_Arbitrator_Free_Size_Ex(
  2387. OUT PULONG pulSize,
  2388. IN DEVINST dnDevInst,
  2389. IN RESOURCEID ResourceID,
  2390. IN ULONG ulFlags,
  2391. IN HMACHINE hMachine
  2392. );
  2393. CMAPI
  2394. CONFIGRET
  2395. WINAPI
  2396. CM_Query_Remove_SubTree(
  2397. IN DEVINST dnAncestor,
  2398. IN ULONG ulFlags
  2399. );
  2400. CMAPI
  2401. CONFIGRET
  2402. WINAPI
  2403. CM_Query_Remove_SubTree_Ex(
  2404. IN DEVINST dnAncestor,
  2405. IN ULONG ulFlags,
  2406. IN HMACHINE hMachine
  2407. );
  2408. CMAPI
  2409. CONFIGRET
  2410. WINAPI
  2411. CM_Query_And_Remove_SubTreeA(
  2412. IN DEVINST dnAncestor,
  2413. OUT PPNP_VETO_TYPE pVetoType,
  2414. OUT LPSTR pszVetoName,
  2415. IN ULONG ulNameLength,
  2416. IN ULONG ulFlags
  2417. );
  2418. CMAPI
  2419. CONFIGRET
  2420. WINAPI
  2421. CM_Query_And_Remove_SubTree_ExA(
  2422. IN DEVINST dnAncestor,
  2423. OUT PPNP_VETO_TYPE pVetoType,
  2424. OUT LPSTR pszVetoName,
  2425. IN ULONG ulNameLength,
  2426. IN ULONG ulFlags,
  2427. IN HMACHINE hMachine
  2428. );
  2429. CMAPI
  2430. CONFIGRET
  2431. WINAPI
  2432. CM_Query_And_Remove_SubTreeW(
  2433. IN DEVINST dnAncestor,
  2434. OUT PPNP_VETO_TYPE pVetoType,
  2435. OUT LPWSTR pszVetoName,
  2436. IN ULONG ulNameLength,
  2437. IN ULONG ulFlags
  2438. );
  2439. CMAPI
  2440. CONFIGRET
  2441. WINAPI
  2442. CM_Query_And_Remove_SubTree_ExW(
  2443. IN DEVINST dnAncestor,
  2444. OUT PPNP_VETO_TYPE pVetoType,
  2445. OUT LPWSTR pszVetoName,
  2446. IN ULONG ulNameLength,
  2447. IN ULONG ulFlags,
  2448. IN HMACHINE hMachine
  2449. );
  2450. #ifdef UNICODE
  2451. #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeW
  2452. #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExW
  2453. #else
  2454. #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeA
  2455. #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExA
  2456. #endif // UNICODE
  2457. CMAPI
  2458. CONFIGRET
  2459. WINAPI
  2460. CM_Request_Device_EjectA(
  2461. IN DEVINST dnDevInst,
  2462. OUT PPNP_VETO_TYPE pVetoType,
  2463. OUT LPSTR pszVetoName,
  2464. IN ULONG ulNameLength,
  2465. IN ULONG ulFlags
  2466. );
  2467. CMAPI
  2468. CONFIGRET
  2469. WINAPI
  2470. CM_Request_Device_Eject_ExA(
  2471. IN DEVINST dnDevInst,
  2472. OUT PPNP_VETO_TYPE pVetoType,
  2473. OUT LPSTR pszVetoName,
  2474. IN ULONG ulNameLength,
  2475. IN ULONG ulFlags,
  2476. IN HMACHINE hMachine
  2477. );
  2478. CMAPI
  2479. CONFIGRET
  2480. WINAPI
  2481. CM_Request_Device_EjectW(
  2482. IN DEVINST dnDevInst,
  2483. OUT PPNP_VETO_TYPE pVetoType,
  2484. OUT LPWSTR pszVetoName,
  2485. IN ULONG ulNameLength,
  2486. IN ULONG ulFlags
  2487. );
  2488. CMAPI
  2489. CONFIGRET
  2490. WINAPI
  2491. CM_Request_Device_Eject_ExW(
  2492. IN DEVINST dnDevInst,
  2493. OUT PPNP_VETO_TYPE pVetoType,
  2494. OUT LPWSTR pszVetoName,
  2495. IN ULONG ulNameLength,
  2496. IN ULONG ulFlags,
  2497. IN HMACHINE hMachine
  2498. );
  2499. #ifdef UNICODE
  2500. #define CM_Request_Device_Eject CM_Request_Device_EjectW
  2501. #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
  2502. #else
  2503. #define CM_Request_Device_Eject CM_Request_Device_EjectA
  2504. #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
  2505. #endif // UNICODE
  2506. CMAPI
  2507. CONFIGRET
  2508. WINAPI
  2509. CM_Reenumerate_DevNode(
  2510. IN DEVINST dnDevInst,
  2511. IN ULONG ulFlags
  2512. );
  2513. CMAPI
  2514. CONFIGRET
  2515. WINAPI
  2516. CM_Reenumerate_DevNode_Ex(
  2517. IN DEVINST dnDevInst,
  2518. IN ULONG ulFlags,
  2519. IN HMACHINE hMachine
  2520. );
  2521. #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
  2522. #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
  2523. CMAPI
  2524. CONFIGRET
  2525. WINAPI
  2526. CM_Register_Device_InterfaceA(
  2527. IN DEVINST dnDevInst,
  2528. IN LPGUID InterfaceClassGuid,
  2529. IN LPCSTR pszReference, OPTIONAL
  2530. OUT LPSTR pszDeviceInterface,
  2531. IN OUT PULONG pulLength,
  2532. IN ULONG ulFlags
  2533. );
  2534. CMAPI
  2535. CONFIGRET
  2536. WINAPI
  2537. CM_Register_Device_InterfaceW(
  2538. IN DEVINST dnDevInst,
  2539. IN LPGUID InterfaceClassGuid,
  2540. IN LPCWSTR pszReference, OPTIONAL
  2541. OUT LPWSTR pszDeviceInterface,
  2542. IN OUT PULONG pulLength,
  2543. IN ULONG ulFlags
  2544. );
  2545. CMAPI
  2546. CONFIGRET
  2547. WINAPI
  2548. CM_Register_Device_Interface_ExA(
  2549. IN DEVINST dnDevInst,
  2550. IN LPGUID InterfaceClassGuid,
  2551. IN LPCSTR pszReference, OPTIONAL
  2552. OUT LPSTR pszDeviceInterface,
  2553. IN OUT PULONG pulLength,
  2554. IN ULONG ulFlags,
  2555. IN HMACHINE hMachine
  2556. );
  2557. CMAPI
  2558. CONFIGRET
  2559. WINAPI
  2560. CM_Register_Device_Interface_ExW(
  2561. IN DEVINST dnDevInst,
  2562. IN LPGUID InterfaceClassGuid,
  2563. IN LPCWSTR pszReference, OPTIONAL
  2564. OUT LPWSTR pszDeviceInterface,
  2565. IN OUT PULONG pulLength,
  2566. IN ULONG ulFlags,
  2567. IN HMACHINE hMachine
  2568. );
  2569. #ifdef UNICODE
  2570. #define CM_Register_Device_Interface CM_Register_Device_InterfaceW
  2571. #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExW
  2572. #else
  2573. #define CM_Register_Device_Interface CM_Register_Device_InterfaceA
  2574. #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExA
  2575. #endif // UNICODE
  2576. CMAPI
  2577. CONFIGRET
  2578. WINAPI
  2579. CM_Set_DevNode_Problem_Ex(
  2580. IN DEVINST dnDevInst,
  2581. IN ULONG ulProblem,
  2582. IN ULONG ulFlags,
  2583. IN HMACHINE hMachine
  2584. );
  2585. CMAPI
  2586. CONFIGRET
  2587. WINAPI
  2588. CM_Set_DevNode_Problem(
  2589. IN DEVINST dnDevInst,
  2590. IN ULONG ulProblem,
  2591. IN ULONG ulFlags
  2592. );
  2593. #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
  2594. #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
  2595. CMAPI
  2596. CONFIGRET
  2597. WINAPI
  2598. CM_Unregister_Device_InterfaceA(
  2599. IN LPCSTR pszDeviceInterface,
  2600. IN ULONG ulFlags
  2601. );
  2602. CMAPI
  2603. CONFIGRET
  2604. WINAPI
  2605. CM_Unregister_Device_InterfaceW(
  2606. IN LPCWSTR pszDeviceInterface,
  2607. IN ULONG ulFlags
  2608. );
  2609. CMAPI
  2610. CONFIGRET
  2611. WINAPI
  2612. CM_Unregister_Device_Interface_ExA(
  2613. IN LPCSTR pszDeviceInterface,
  2614. IN ULONG ulFlags,
  2615. IN HMACHINE hMachine
  2616. );
  2617. CMAPI
  2618. CONFIGRET
  2619. WINAPI
  2620. CM_Unregister_Device_Interface_ExW(
  2621. IN LPCWSTR pszDeviceInterface,
  2622. IN ULONG ulFlags,
  2623. IN HMACHINE hMachine
  2624. );
  2625. #ifdef UNICODE
  2626. #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceW
  2627. #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExW
  2628. #else
  2629. #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceA
  2630. #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExA
  2631. #endif // UNICODE
  2632. CMAPI
  2633. CONFIGRET
  2634. WINAPI
  2635. CM_Register_Device_Driver(
  2636. IN DEVINST dnDevInst,
  2637. IN ULONG ulFlags
  2638. );
  2639. CMAPI
  2640. CONFIGRET
  2641. WINAPI
  2642. CM_Register_Device_Driver_Ex(
  2643. IN DEVINST dnDevInst,
  2644. IN ULONG ulFlags,
  2645. IN HMACHINE hMachine
  2646. );
  2647. CMAPI
  2648. CONFIGRET
  2649. WINAPI
  2650. CM_Remove_SubTree(
  2651. IN DEVINST dnAncestor,
  2652. IN ULONG ulFlags
  2653. );
  2654. CMAPI
  2655. CONFIGRET
  2656. WINAPI
  2657. CM_Remove_SubTree_Ex(
  2658. IN DEVINST dnAncestor,
  2659. IN ULONG ulFlags,
  2660. IN HMACHINE hMachine
  2661. );
  2662. CMAPI
  2663. CONFIGRET
  2664. WINAPI
  2665. CM_Set_DevNode_Registry_PropertyA(
  2666. IN DEVINST dnDevInst,
  2667. IN ULONG ulProperty,
  2668. IN PCVOID Buffer, OPTIONAL
  2669. IN ULONG ulLength,
  2670. IN ULONG ulFlags
  2671. );
  2672. CMAPI
  2673. CONFIGRET
  2674. WINAPI
  2675. CM_Set_DevNode_Registry_PropertyW(
  2676. IN DEVINST dnDevInst,
  2677. IN ULONG ulProperty,
  2678. IN PCVOID Buffer, OPTIONAL
  2679. IN ULONG ulLength,
  2680. IN ULONG ulFlags
  2681. );
  2682. CMAPI
  2683. CONFIGRET
  2684. WINAPI
  2685. CM_Set_DevNode_Registry_Property_ExA(
  2686. IN DEVINST dnDevInst,
  2687. IN ULONG ulProperty,
  2688. IN PCVOID Buffer, OPTIONAL
  2689. IN ULONG ulLength,
  2690. IN ULONG ulFlags,
  2691. IN HMACHINE hMachine
  2692. );
  2693. CMAPI
  2694. CONFIGRET
  2695. WINAPI
  2696. CM_Set_DevNode_Registry_Property_ExW(
  2697. IN DEVINST dnDevInst,
  2698. IN ULONG ulProperty,
  2699. IN PCVOID Buffer, OPTIONAL
  2700. IN ULONG ulLength,
  2701. IN ULONG ulFlags,
  2702. IN HMACHINE hMachine
  2703. );
  2704. #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
  2705. #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
  2706. #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
  2707. #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
  2708. #ifdef UNICODE
  2709. #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
  2710. #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
  2711. #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
  2712. #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
  2713. #else
  2714. #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
  2715. #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
  2716. #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
  2717. #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
  2718. #endif // UNICODE
  2719. CMAPI
  2720. CONFIGRET
  2721. WINAPI
  2722. CM_Is_Dock_Station_Present(
  2723. OUT PBOOL pbPresent
  2724. );
  2725. CMAPI
  2726. CONFIGRET
  2727. WINAPI
  2728. CM_Is_Dock_Station_Present_Ex(
  2729. OUT PBOOL pbPresent,
  2730. IN HMACHINE hMachine
  2731. );
  2732. CMAPI
  2733. CONFIGRET
  2734. WINAPI
  2735. CM_Request_Eject_PC(
  2736. VOID
  2737. );
  2738. CMAPI
  2739. CONFIGRET
  2740. WINAPI
  2741. CM_Request_Eject_PC_Ex(
  2742. IN HMACHINE hMachine
  2743. );
  2744. CMAPI
  2745. CONFIGRET
  2746. WINAPI
  2747. CM_Set_HW_Prof_FlagsA(
  2748. IN DEVINSTID_A szDevInstName,
  2749. IN ULONG ulConfig,
  2750. IN ULONG ulValue,
  2751. IN ULONG ulFlags
  2752. );
  2753. CMAPI
  2754. CONFIGRET
  2755. WINAPI
  2756. CM_Set_HW_Prof_FlagsW(
  2757. IN DEVINSTID_W szDevInstName,
  2758. IN ULONG ulConfig,
  2759. IN ULONG ulValue,
  2760. IN ULONG ulFlags
  2761. );
  2762. CMAPI
  2763. CONFIGRET
  2764. WINAPI
  2765. CM_Set_HW_Prof_Flags_ExA(
  2766. IN DEVINSTID_A szDevInstName,
  2767. IN ULONG ulConfig,
  2768. IN ULONG ulValue,
  2769. IN ULONG ulFlags,
  2770. IN HMACHINE hMachine
  2771. );
  2772. CMAPI
  2773. CONFIGRET
  2774. WINAPI
  2775. CM_Set_HW_Prof_Flags_ExW(
  2776. IN DEVINSTID_W szDevInstName,
  2777. IN ULONG ulConfig,
  2778. IN ULONG ulValue,
  2779. IN ULONG ulFlags,
  2780. IN HMACHINE hMachine
  2781. );
  2782. #ifdef UNICODE
  2783. #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
  2784. #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
  2785. #else
  2786. #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
  2787. #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
  2788. #endif // UNICODE
  2789. CMAPI
  2790. CONFIGRET
  2791. WINAPI
  2792. CM_Setup_DevNode(
  2793. IN DEVINST dnDevInst,
  2794. IN ULONG ulFlags
  2795. );
  2796. CMAPI
  2797. CONFIGRET
  2798. WINAPI
  2799. CM_Setup_DevNode_Ex(
  2800. IN DEVINST dnDevInst,
  2801. IN ULONG ulFlags,
  2802. IN HMACHINE hMachine
  2803. );
  2804. #define CM_Setup_DevInst CM_Setup_DevNode
  2805. #define CM_Setup_DevInst_Ex CM_Setup_DevNode_Ex
  2806. CMAPI
  2807. CONFIGRET
  2808. WINAPI
  2809. CM_Test_Range_Available(
  2810. IN DWORDLONG ullStartValue,
  2811. IN DWORDLONG ullEndValue,
  2812. IN RANGE_LIST rlh,
  2813. IN ULONG ulFlags
  2814. );
  2815. CMAPI
  2816. CONFIGRET
  2817. WINAPI
  2818. CM_Uninstall_DevNode(
  2819. IN DEVNODE dnPhantom,
  2820. IN ULONG ulFlags
  2821. );
  2822. CMAPI
  2823. CONFIGRET
  2824. WINAPI
  2825. CM_Uninstall_DevNode_Ex(
  2826. IN DEVNODE dnPhantom,
  2827. IN ULONG ulFlags,
  2828. IN HANDLE hMachine
  2829. );
  2830. #define CM_Uninstall_DevInst CM_Uninstall_DevNode
  2831. #define CM_Uninstall_DevInst_Ex CM_Uninstall_DevNode_Ex
  2832. CMAPI
  2833. CONFIGRET
  2834. WINAPI
  2835. CM_Run_Detection(
  2836. IN ULONG ulFlags
  2837. );
  2838. CMAPI
  2839. CONFIGRET
  2840. WINAPI
  2841. CM_Run_Detection_Ex(
  2842. IN ULONG ulFlags,
  2843. IN HMACHINE hMachine
  2844. );
  2845. CMAPI
  2846. CONFIGRET
  2847. WINAPI
  2848. CM_Set_HW_Prof(
  2849. IN ULONG ulHardwareProfile,
  2850. IN ULONG ulFlags
  2851. );
  2852. CMAPI
  2853. CONFIGRET
  2854. WINAPI
  2855. CM_Set_HW_Prof_Ex(
  2856. IN ULONG ulHardwareProfile,
  2857. IN ULONG ulFlags,
  2858. IN HMACHINE hMachine
  2859. );
  2860. CMAPI
  2861. CONFIGRET
  2862. WINAPI
  2863. CM_Query_Resource_Conflict_List(
  2864. OUT PCONFLICT_LIST pclConflictList,
  2865. IN DEVINST dnDevInst,
  2866. IN RESOURCEID ResourceID,
  2867. IN PCVOID ResourceData,
  2868. IN ULONG ResourceLen,
  2869. IN ULONG ulFlags,
  2870. IN HMACHINE hMachine
  2871. );
  2872. CMAPI
  2873. CONFIGRET
  2874. WINAPI
  2875. CM_Free_Resource_Conflict_Handle(
  2876. IN CONFLICT_LIST clConflictList
  2877. );
  2878. CMAPI
  2879. CONFIGRET
  2880. WINAPI
  2881. CM_Get_Resource_Conflict_Count(
  2882. IN CONFLICT_LIST clConflictList,
  2883. OUT PULONG pulCount
  2884. );
  2885. CMAPI
  2886. CONFIGRET
  2887. WINAPI
  2888. CM_Get_Resource_Conflict_DetailsA(
  2889. IN CONFLICT_LIST clConflictList,
  2890. IN ULONG ulIndex,
  2891. IN OUT PCONFLICT_DETAILS_A pConflictDetails
  2892. );
  2893. CMAPI
  2894. CONFIGRET
  2895. WINAPI
  2896. CM_Get_Resource_Conflict_DetailsW(
  2897. IN CONFLICT_LIST clConflictList,
  2898. IN ULONG ulIndex,
  2899. IN OUT PCONFLICT_DETAILS_W pConflictDetails
  2900. );
  2901. #ifdef UNICODE
  2902. #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
  2903. #else
  2904. #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
  2905. #endif // UNICODE
  2906. CMAPI
  2907. CONFIGRET
  2908. WINAPI
  2909. CM_Get_Class_Registry_PropertyW(
  2910. IN LPGUID ClassGUID,
  2911. IN ULONG ulProperty,
  2912. OUT PULONG pulRegDataType, OPTIONAL
  2913. OUT PVOID Buffer, OPTIONAL
  2914. IN OUT PULONG pulLength,
  2915. IN ULONG ulFlags,
  2916. IN HMACHINE hMachine
  2917. );
  2918. CMAPI
  2919. CONFIGRET
  2920. WINAPI
  2921. CM_Set_Class_Registry_PropertyW(
  2922. IN LPGUID ClassGUID,
  2923. IN ULONG ulProperty,
  2924. IN PCVOID Buffer, OPTIONAL
  2925. IN ULONG ulLength,
  2926. IN ULONG ulFlags,
  2927. IN HMACHINE hMachine
  2928. );
  2929. CMAPI
  2930. CONFIGRET
  2931. WINAPI
  2932. CM_Get_Class_Registry_PropertyA(
  2933. IN LPGUID ClassGUID,
  2934. IN ULONG ulProperty,
  2935. OUT PULONG pulRegDataType, OPTIONAL
  2936. OUT PVOID Buffer, OPTIONAL
  2937. IN OUT PULONG pulLength,
  2938. IN ULONG ulFlags,
  2939. IN HMACHINE hMachine
  2940. );
  2941. CMAPI
  2942. CONFIGRET
  2943. WINAPI
  2944. CM_Set_Class_Registry_PropertyA(
  2945. IN LPGUID ClassGUID,
  2946. IN ULONG ulProperty,
  2947. IN PCVOID Buffer, OPTIONAL
  2948. IN ULONG ulLength,
  2949. IN ULONG ulFlags,
  2950. IN HMACHINE hMachine
  2951. );
  2952. #ifdef UNICODE
  2953. #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyW
  2954. #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyW
  2955. #else
  2956. #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyA
  2957. #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyA
  2958. #endif // UNICODE
  2959. #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
  2960. DWORD
  2961. WINAPI
  2962. CM_WaitNoPendingInstallEvents(
  2963. IN DWORD dwTimeout
  2964. );
  2965. //--------------------------------------------------------------
  2966. // Configuration Manager return status codes
  2967. //--------------------------------------------------------------
  2968. #define CR_SUCCESS (0x00000000)
  2969. #define CR_DEFAULT (0x00000001)
  2970. #define CR_OUT_OF_MEMORY (0x00000002)
  2971. #define CR_INVALID_POINTER (0x00000003)
  2972. #define CR_INVALID_FLAG (0x00000004)
  2973. #define CR_INVALID_DEVNODE (0x00000005)
  2974. #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
  2975. #define CR_INVALID_RES_DES (0x00000006)
  2976. #define CR_INVALID_LOG_CONF (0x00000007)
  2977. #define CR_INVALID_ARBITRATOR (0x00000008)
  2978. #define CR_INVALID_NODELIST (0x00000009)
  2979. #define CR_DEVNODE_HAS_REQS (0x0000000A)
  2980. #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
  2981. #define CR_INVALID_RESOURCEID (0x0000000B)
  2982. #define CR_DLVXD_NOT_FOUND (0x0000000C) // WIN 95 ONLY
  2983. #define CR_NO_SUCH_DEVNODE (0x0000000D)
  2984. #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
  2985. #define CR_NO_MORE_LOG_CONF (0x0000000E)
  2986. #define CR_NO_MORE_RES_DES (0x0000000F)
  2987. #define CR_ALREADY_SUCH_DEVNODE (0x00000010)
  2988. #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
  2989. #define CR_INVALID_RANGE_LIST (0x00000011)
  2990. #define CR_INVALID_RANGE (0x00000012)
  2991. #define CR_FAILURE (0x00000013)
  2992. #define CR_NO_SUCH_LOGICAL_DEV (0x00000014)
  2993. #define CR_CREATE_BLOCKED (0x00000015)
  2994. #define CR_NOT_SYSTEM_VM (0x00000016) // WIN 95 ONLY
  2995. #define CR_REMOVE_VETOED (0x00000017)
  2996. #define CR_APM_VETOED (0x00000018)
  2997. #define CR_INVALID_LOAD_TYPE (0x00000019)
  2998. #define CR_BUFFER_SMALL (0x0000001A)
  2999. #define CR_NO_ARBITRATOR (0x0000001B)
  3000. #define CR_NO_REGISTRY_HANDLE (0x0000001C)
  3001. #define CR_REGISTRY_ERROR (0x0000001D)
  3002. #define CR_INVALID_DEVICE_ID (0x0000001E)
  3003. #define CR_INVALID_DATA (0x0000001F)
  3004. #define CR_INVALID_API (0x00000020)
  3005. #define CR_DEVLOADER_NOT_READY (0x00000021)
  3006. #define CR_NEED_RESTART (0x00000022)
  3007. #define CR_NO_MORE_HW_PROFILES (0x00000023)
  3008. #define CR_DEVICE_NOT_THERE (0x00000024)
  3009. #define CR_NO_SUCH_VALUE (0x00000025)
  3010. #define CR_WRONG_TYPE (0x00000026)
  3011. #define CR_INVALID_PRIORITY (0x00000027)
  3012. #define CR_NOT_DISABLEABLE (0x00000028)
  3013. #define CR_FREE_RESOURCES (0x00000029)
  3014. #define CR_QUERY_VETOED (0x0000002A)
  3015. #define CR_CANT_SHARE_IRQ (0x0000002B)
  3016. #define CR_NO_DEPENDENT (0x0000002C)
  3017. #define CR_SAME_RESOURCES (0x0000002D)
  3018. #define CR_NO_SUCH_REGISTRY_KEY (0x0000002E)
  3019. #define CR_INVALID_MACHINENAME (0x0000002F) // NT ONLY
  3020. #define CR_REMOTE_COMM_FAILURE (0x00000030) // NT ONLY
  3021. #define CR_MACHINE_UNAVAILABLE (0x00000031) // NT ONLY
  3022. #define CR_NO_CM_SERVICES (0x00000032) // NT ONLY
  3023. #define CR_ACCESS_DENIED (0x00000033) // NT ONLY
  3024. #define CR_CALL_NOT_IMPLEMENTED (0x00000034)
  3025. #define CR_INVALID_PROPERTY (0x00000035)
  3026. #define CR_DEVICE_INTERFACE_ACTIVE (0x00000036)
  3027. #define CR_NO_SUCH_DEVICE_INTERFACE (0x00000037)
  3028. #define CR_INVALID_REFERENCE_STRING (0x00000038)
  3029. #define CR_INVALID_CONFLICT_LIST (0x00000039)
  3030. #define CR_INVALID_INDEX (0x0000003A)
  3031. #define CR_INVALID_STRUCTURE_SIZE (0x0000003B)
  3032. #define NUM_CR_RESULTS (0x0000003C)
  3033. #ifdef __cplusplus
  3034. }
  3035. #endif
  3036. #endif // _CFGMGR32_