Leaked source code of windows server 2003
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.

3422 lines
103 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_LOCATION_PATHS (0x00000024) // CM_DRP_LOCATION_PATHS REG_MULTI_SZ (R)
  773. #define CM_DRP_MIN (0x00000001) // First device register
  774. #define CM_CRP_MIN CM_DRP_MIN // First class register
  775. #define CM_DRP_MAX (0x00000024) // Last device register
  776. #define CM_CRP_MAX CM_DRP_MAX // Last class register
  777. //
  778. // Capabilities bits (the capability value is returned from calling
  779. // CM_Get_DevInst_Registry_Property with CM_DRP_CAPABILITIES property)
  780. //
  781. #define CM_DEVCAP_LOCKSUPPORTED (0x00000001)
  782. #define CM_DEVCAP_EJECTSUPPORTED (0x00000002)
  783. #define CM_DEVCAP_REMOVABLE (0x00000004)
  784. #define CM_DEVCAP_DOCKDEVICE (0x00000008)
  785. #define CM_DEVCAP_UNIQUEID (0x00000010)
  786. #define CM_DEVCAP_SILENTINSTALL (0x00000020)
  787. #define CM_DEVCAP_RAWDEVICEOK (0x00000040)
  788. #define CM_DEVCAP_SURPRISEREMOVALOK (0x00000080)
  789. #define CM_DEVCAP_HARDWAREDISABLED (0x00000100)
  790. #define CM_DEVCAP_NONDYNAMIC (0x00000200)
  791. //
  792. // Removal policies (retrievable via CM_Get_DevInst_Registry_Property with
  793. // the CM_DRP_REMOVAL_POLICY, CM_DRP_REMOVAL_POLICY_OVERRIDE, or
  794. // CM_DRP_REMOVAL_POLICY_HW_DEFAULT properties)
  795. //
  796. #define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
  797. #define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
  798. #define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
  799. //
  800. // Device install states (retrievable via CM_Get_DevInst_Registry_Property with
  801. // the CM_DRP_INSTALL_STATE properties)
  802. //
  803. #define CM_INSTALL_STATE_INSTALLED 0
  804. #define CM_INSTALL_STATE_NEEDS_REINSTALL 1
  805. #define CM_INSTALL_STATE_FAILED_INSTALL 2
  806. #define CM_INSTALL_STATE_FINISH_INSTALL 3
  807. //
  808. // Flags for CM_Locate_DevNode
  809. //
  810. #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
  811. #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
  812. #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
  813. #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
  814. #define CM_LOCATE_DEVNODE_BITS 0x00000007
  815. #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
  816. #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
  817. #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
  818. #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
  819. #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
  820. //
  821. // Flags for CM_Open_Class_Key
  822. //
  823. #define CM_OPEN_CLASS_KEY_INSTALLER (0x00000000)
  824. #define CM_OPEN_CLASS_KEY_INTERFACE (0x00000001)
  825. #define CM_OPEN_CLASS_KEY_BITS (0x00000001)
  826. //
  827. // Flags for CM_Query_And_Remove_SubTree
  828. //
  829. #define CM_REMOVE_UI_OK 0x00000000
  830. #define CM_REMOVE_UI_NOT_OK 0x00000001
  831. #define CM_REMOVE_NO_RESTART 0x00000002
  832. #define CM_REMOVE_BITS 0x00000003
  833. //
  834. // Backward compatibility--do not use
  835. // (use above CM_REMOVE_* flags instead)
  836. //
  837. #define CM_QUERY_REMOVE_UI_OK (CM_REMOVE_UI_OK)
  838. #define CM_QUERY_REMOVE_UI_NOT_OK (CM_REMOVE_UI_NOT_OK)
  839. #define CM_QUERY_REMOVE_BITS (CM_QUERY_REMOVE_UI_OK|CM_QUERY_REMOVE_UI_NOT_OK)
  840. //
  841. // Flags for CM_Reenumerate_DevNode
  842. //
  843. #define CM_REENUMERATE_NORMAL 0x00000000
  844. #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
  845. #define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
  846. #define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
  847. #define CM_REENUMERATE_BITS 0x00000007
  848. //
  849. // Flags for CM_Register_Device_Driver
  850. //
  851. #define CM_REGISTER_DEVICE_DRIVER_STATIC (0x00000000)
  852. #define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE (0x00000001)
  853. #define CM_REGISTER_DEVICE_DRIVER_REMOVABLE (0x00000002)
  854. #define CM_REGISTER_DEVICE_DRIVER_BITS (0x00000003)
  855. //
  856. // Registry Branch Locations (for CM_Open_DevNode_Key)
  857. //
  858. #define CM_REGISTRY_HARDWARE (0x00000000)
  859. #define CM_REGISTRY_SOFTWARE (0x00000001)
  860. #define CM_REGISTRY_USER (0x00000100)
  861. #define CM_REGISTRY_CONFIG (0x00000200)
  862. #define CM_REGISTRY_BITS (0x00000301)
  863. //
  864. // Flags for CM_Set_DevNode_Problem
  865. //
  866. #define CM_SET_DEVNODE_PROBLEM_NORMAL (0x00000000) // only set problem if currently no problem
  867. #define CM_SET_DEVNODE_PROBLEM_OVERRIDE (0x00000001) // override current problem with new problem
  868. #define CM_SET_DEVNODE_PROBLEM_BITS (0x00000001)
  869. #define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
  870. #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
  871. #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
  872. //
  873. // Flags for CM_Set_HW_Prof_Flags
  874. //
  875. #define CM_SET_HW_PROF_FLAGS_UI_NOT_OK (0x00000001) // Don't popup any veto UI
  876. #define CM_SET_HW_PROF_FLAGS_BITS (0x00000001)
  877. //
  878. // Re-enable and configuration actions (specified in call to CM_Setup_DevInst)
  879. //
  880. #define CM_SETUP_DEVNODE_READY (0x00000000) // Reenable problem devinst
  881. #define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
  882. #define CM_SETUP_DOWNLOAD (0x00000001) // Get info about devinst
  883. #define CM_SETUP_WRITE_LOG_CONFS (0x00000002)
  884. #define CM_SETUP_PROP_CHANGE (0x00000003)
  885. #define CM_SETUP_DEVNODE_RESET (0x00000004) // Reset problem devinst without starting
  886. #define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
  887. #define CM_SETUP_BITS (0x00000007)
  888. //
  889. // Flags for CM_Query_Arbitrator_Free_Data and
  890. // CM_Query_Arbitrator_Free_Data_Size.
  891. //
  892. #define CM_QUERY_ARBITRATOR_RAW (0x00000000)
  893. #define CM_QUERY_ARBITRATOR_TRANSLATED (0x00000001)
  894. #define CM_QUERY_ARBITRATOR_BITS (0x00000001)
  895. //
  896. // Flags for CM_Get_DevNode_Custom_Property
  897. //
  898. #define CM_CUSTOMDEVPROP_MERGE_MULTISZ (0x00000001)
  899. #define CM_CUSTOMDEVPROP_BITS (0x00000001)
  900. //--------------------------------------------------------------
  901. // Function prototypes
  902. //--------------------------------------------------------------
  903. CMAPI
  904. CONFIGRET
  905. WINAPI
  906. CM_Add_Empty_Log_Conf(
  907. OUT PLOG_CONF plcLogConf,
  908. IN DEVINST dnDevInst,
  909. IN PRIORITY Priority,
  910. IN ULONG ulFlags
  911. );
  912. CMAPI
  913. CONFIGRET
  914. WINAPI
  915. CM_Add_Empty_Log_Conf_Ex(
  916. OUT PLOG_CONF plcLogConf,
  917. IN DEVINST dnDevInst,
  918. IN PRIORITY Priority,
  919. IN ULONG ulFlags,
  920. IN HMACHINE hMachine
  921. );
  922. CMAPI
  923. CONFIGRET
  924. WINAPI
  925. CM_Add_IDA(
  926. IN DEVINST dnDevInst,
  927. IN PSTR pszID,
  928. IN ULONG ulFlags
  929. );
  930. CMAPI
  931. CONFIGRET
  932. WINAPI
  933. CM_Add_IDW(
  934. IN DEVINST dnDevInst,
  935. IN PWSTR pszID,
  936. IN ULONG ulFlags
  937. );
  938. CMAPI
  939. CONFIGRET
  940. WINAPI
  941. CM_Add_ID_ExA(
  942. IN DEVINST dnDevInst,
  943. IN PSTR pszID,
  944. IN ULONG ulFlags,
  945. IN HMACHINE hMachine
  946. );
  947. CMAPI
  948. CONFIGRET
  949. WINAPI
  950. CM_Add_ID_ExW(
  951. IN DEVINST dnDevInst,
  952. IN PWSTR pszID,
  953. IN ULONG ulFlags,
  954. IN HMACHINE hMachine
  955. );
  956. #ifdef UNICODE
  957. #define CM_Add_ID CM_Add_IDW
  958. #define CM_Add_ID_Ex CM_Add_ID_ExW
  959. #else
  960. #define CM_Add_ID CM_Add_IDA
  961. #define CM_Add_ID_Ex CM_Add_ID_ExA
  962. #endif // UNICODE
  963. CMAPI
  964. CONFIGRET
  965. WINAPI
  966. CM_Add_Range(
  967. IN DWORDLONG ullStartValue,
  968. IN DWORDLONG ullEndValue,
  969. IN RANGE_LIST rlh,
  970. IN ULONG ulFlags
  971. );
  972. CMAPI
  973. CONFIGRET
  974. WINAPI
  975. CM_Add_Res_Des(
  976. OUT PRES_DES prdResDes,
  977. IN LOG_CONF lcLogConf,
  978. IN RESOURCEID ResourceID,
  979. IN PCVOID ResourceData,
  980. IN ULONG ResourceLen,
  981. IN ULONG ulFlags
  982. );
  983. CMAPI
  984. CONFIGRET
  985. WINAPI
  986. CM_Add_Res_Des_Ex(
  987. OUT PRES_DES prdResDes,
  988. IN LOG_CONF lcLogConf,
  989. IN RESOURCEID ResourceID,
  990. IN PCVOID ResourceData,
  991. IN ULONG ResourceLen,
  992. IN ULONG ulFlags,
  993. IN HMACHINE hMachine
  994. );
  995. CMAPI
  996. CONFIGRET
  997. WINAPI
  998. CM_Connect_MachineA(
  999. IN PCSTR UNCServerName,
  1000. OUT PHMACHINE phMachine
  1001. );
  1002. CMAPI
  1003. CONFIGRET
  1004. WINAPI
  1005. CM_Connect_MachineW(
  1006. IN PCWSTR UNCServerName,
  1007. OUT PHMACHINE phMachine
  1008. );
  1009. #ifdef UNICODE
  1010. #define CM_Connect_Machine CM_Connect_MachineW
  1011. #else
  1012. #define CM_Connect_Machine CM_Connect_MachineA
  1013. #endif // UNICODE
  1014. CMAPI
  1015. CONFIGRET
  1016. WINAPI
  1017. CM_Create_DevNodeA(
  1018. OUT PDEVINST pdnDevInst,
  1019. IN DEVINSTID_A pDeviceID,
  1020. IN DEVINST dnParent,
  1021. IN ULONG ulFlags
  1022. );
  1023. CMAPI
  1024. CONFIGRET
  1025. WINAPI
  1026. CM_Create_DevNodeW(
  1027. OUT PDEVINST pdnDevInst,
  1028. IN DEVINSTID_W pDeviceID,
  1029. IN DEVINST dnParent,
  1030. IN ULONG ulFlags
  1031. );
  1032. CMAPI
  1033. CONFIGRET
  1034. WINAPI
  1035. CM_Create_DevNode_ExA(
  1036. OUT PDEVINST pdnDevInst,
  1037. IN DEVINSTID_A pDeviceID,
  1038. IN DEVINST dnParent,
  1039. IN ULONG ulFlags,
  1040. IN HANDLE hMachine
  1041. );
  1042. CMAPI
  1043. CONFIGRET
  1044. WINAPI
  1045. CM_Create_DevNode_ExW(
  1046. OUT PDEVINST pdnDevInst,
  1047. IN DEVINSTID_W pDeviceID,
  1048. IN DEVINST dnParent,
  1049. IN ULONG ulFlags,
  1050. IN HANDLE hMachine
  1051. );
  1052. #define CM_Create_DevInstW CM_Create_DevNodeW
  1053. #define CM_Create_DevInstA CM_Create_DevNodeA
  1054. #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
  1055. #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
  1056. #ifdef UNICODE
  1057. #define CM_Create_DevNode CM_Create_DevNodeW
  1058. #define CM_Create_DevInst CM_Create_DevNodeW
  1059. #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
  1060. #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
  1061. #else
  1062. #define CM_Create_DevNode CM_Create_DevNodeA
  1063. #define CM_Create_DevInst CM_Create_DevNodeA
  1064. #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
  1065. #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
  1066. #endif // UNICODE
  1067. CMAPI
  1068. CONFIGRET
  1069. WINAPI
  1070. CM_Create_Range_List(
  1071. OUT PRANGE_LIST prlh,
  1072. IN ULONG ulFlags
  1073. );
  1074. CMAPI
  1075. CONFIGRET
  1076. WINAPI
  1077. CM_Delete_Class_Key(
  1078. IN LPGUID ClassGuid,
  1079. IN ULONG ulFlags
  1080. );
  1081. CMAPI
  1082. CONFIGRET
  1083. WINAPI
  1084. CM_Delete_Class_Key_Ex(
  1085. IN LPGUID ClassGuid,
  1086. IN ULONG ulFlags,
  1087. IN HANDLE hMachine
  1088. );
  1089. CMAPI
  1090. CONFIGRET
  1091. WINAPI
  1092. CM_Delete_DevNode_Key(
  1093. IN DEVNODE dnDevNode,
  1094. IN ULONG ulHardwareProfile,
  1095. IN ULONG ulFlags
  1096. );
  1097. CMAPI
  1098. CONFIGRET
  1099. WINAPI
  1100. CM_Delete_DevNode_Key_Ex(
  1101. IN DEVNODE dnDevNode,
  1102. IN ULONG ulHardwareProfile,
  1103. IN ULONG ulFlags,
  1104. IN HANDLE hMachine
  1105. );
  1106. #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
  1107. #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
  1108. CMAPI
  1109. CONFIGRET
  1110. WINAPI
  1111. CM_Delete_Range(
  1112. IN DWORDLONG ullStartValue,
  1113. IN DWORDLONG ullEndValue,
  1114. IN RANGE_LIST rlh,
  1115. IN ULONG ulFlags
  1116. );
  1117. CMAPI
  1118. CONFIGRET
  1119. WINAPI
  1120. CM_Detect_Resource_Conflict(
  1121. IN DEVINST dnDevInst,
  1122. IN RESOURCEID ResourceID,
  1123. IN PCVOID ResourceData,
  1124. IN ULONG ResourceLen,
  1125. OUT PBOOL pbConflictDetected,
  1126. IN ULONG ulFlags
  1127. );
  1128. CMAPI
  1129. CONFIGRET
  1130. WINAPI
  1131. CM_Detect_Resource_Conflict_Ex(
  1132. IN DEVINST dnDevInst,
  1133. IN RESOURCEID ResourceID,
  1134. IN PCVOID ResourceData,
  1135. IN ULONG ResourceLen,
  1136. OUT PBOOL pbConflictDetected,
  1137. IN ULONG ulFlags,
  1138. IN HMACHINE hMachine
  1139. );
  1140. CMAPI
  1141. CONFIGRET
  1142. WINAPI
  1143. CM_Disable_DevNode(
  1144. IN DEVINST dnDevInst,
  1145. IN ULONG ulFlags
  1146. );
  1147. CMAPI
  1148. CONFIGRET
  1149. WINAPI
  1150. CM_Disable_DevNode_Ex(
  1151. IN DEVINST dnDevInst,
  1152. IN ULONG ulFlags,
  1153. IN HMACHINE hMachine
  1154. );
  1155. #define CM_Disable_DevInst CM_Disable_DevNode
  1156. #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
  1157. CMAPI
  1158. CONFIGRET
  1159. WINAPI
  1160. CM_Disconnect_Machine(
  1161. IN HMACHINE hMachine
  1162. );
  1163. CMAPI
  1164. CONFIGRET
  1165. WINAPI
  1166. CM_Dup_Range_List(
  1167. IN RANGE_LIST rlhOld,
  1168. IN RANGE_LIST rlhNew,
  1169. IN ULONG ulFlags
  1170. );
  1171. CMAPI
  1172. CONFIGRET
  1173. WINAPI
  1174. CM_Enable_DevNode(
  1175. IN DEVINST dnDevInst,
  1176. IN ULONG ulFlags
  1177. );
  1178. CMAPI
  1179. CONFIGRET
  1180. WINAPI
  1181. CM_Enable_DevNode_Ex(
  1182. IN DEVINST dnDevInst,
  1183. IN ULONG ulFlags,
  1184. IN HMACHINE hMachine
  1185. );
  1186. #define CM_Enable_DevInst CM_Enable_DevNode
  1187. #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
  1188. CMAPI
  1189. CONFIGRET
  1190. WINAPI
  1191. CM_Enumerate_Classes(
  1192. IN ULONG ulClassIndex,
  1193. OUT LPGUID ClassGuid,
  1194. IN ULONG ulFlags
  1195. );
  1196. CMAPI
  1197. CONFIGRET
  1198. WINAPI
  1199. CM_Enumerate_Classes_Ex(
  1200. IN ULONG ulClassIndex,
  1201. OUT LPGUID ClassGuid,
  1202. IN ULONG ulFlags,
  1203. IN HMACHINE hMachine
  1204. );
  1205. CMAPI
  1206. CONFIGRET
  1207. WINAPI
  1208. CM_Enumerate_EnumeratorsA(
  1209. IN ULONG ulEnumIndex,
  1210. OUT PCHAR Buffer,
  1211. IN OUT PULONG pulLength,
  1212. IN ULONG ulFlags
  1213. );
  1214. CMAPI
  1215. CONFIGRET
  1216. WINAPI
  1217. CM_Enumerate_EnumeratorsW(
  1218. IN ULONG ulEnumIndex,
  1219. OUT PWCHAR Buffer,
  1220. IN OUT PULONG pulLength,
  1221. IN ULONG ulFlags
  1222. );
  1223. CMAPI
  1224. CONFIGRET
  1225. WINAPI
  1226. CM_Enumerate_Enumerators_ExA(
  1227. IN ULONG ulEnumIndex,
  1228. OUT PCHAR Buffer,
  1229. IN OUT PULONG pulLength,
  1230. IN ULONG ulFlags,
  1231. IN HMACHINE hMachine
  1232. );
  1233. CMAPI
  1234. CONFIGRET
  1235. WINAPI
  1236. CM_Enumerate_Enumerators_ExW(
  1237. IN ULONG ulEnumIndex,
  1238. OUT PWCHAR Buffer,
  1239. IN OUT PULONG pulLength,
  1240. IN ULONG ulFlags,
  1241. IN HMACHINE hMachine
  1242. );
  1243. #ifdef UNICODE
  1244. #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
  1245. #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
  1246. #else
  1247. #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
  1248. #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
  1249. #endif // UNICODE
  1250. CMAPI
  1251. CONFIGRET
  1252. WINAPI
  1253. CM_Find_Range(
  1254. OUT PDWORDLONG pullStart,
  1255. IN DWORDLONG ullStart,
  1256. IN ULONG ulLength,
  1257. IN DWORDLONG ullAlignment,
  1258. IN DWORDLONG ullEnd,
  1259. IN RANGE_LIST rlh,
  1260. IN ULONG ulFlags
  1261. );
  1262. CMAPI
  1263. CONFIGRET
  1264. WINAPI
  1265. CM_First_Range(
  1266. IN RANGE_LIST rlh,
  1267. OUT PDWORDLONG pullStart,
  1268. OUT PDWORDLONG pullEnd,
  1269. OUT PRANGE_ELEMENT preElement,
  1270. IN ULONG ulFlags
  1271. );
  1272. CMAPI
  1273. CONFIGRET
  1274. WINAPI
  1275. CM_Free_Log_Conf(
  1276. IN LOG_CONF lcLogConfToBeFreed,
  1277. IN ULONG ulFlags
  1278. );
  1279. CMAPI
  1280. CONFIGRET
  1281. WINAPI
  1282. CM_Free_Log_Conf_Ex(
  1283. IN LOG_CONF lcLogConfToBeFreed,
  1284. IN ULONG ulFlags,
  1285. IN HMACHINE hMachine
  1286. );
  1287. CMAPI
  1288. CONFIGRET
  1289. WINAPI
  1290. CM_Free_Log_Conf_Handle(
  1291. IN LOG_CONF lcLogConf
  1292. );
  1293. CMAPI
  1294. CONFIGRET
  1295. WINAPI
  1296. CM_Free_Range_List(
  1297. IN RANGE_LIST rlh,
  1298. IN ULONG ulFlags
  1299. );
  1300. CMAPI
  1301. CONFIGRET
  1302. WINAPI
  1303. CM_Free_Res_Des(
  1304. OUT PRES_DES prdResDes,
  1305. IN RES_DES rdResDes,
  1306. IN ULONG ulFlags
  1307. );
  1308. CMAPI
  1309. CONFIGRET
  1310. WINAPI
  1311. CM_Free_Res_Des_Ex(
  1312. OUT PRES_DES prdResDes,
  1313. IN RES_DES rdResDes,
  1314. IN ULONG ulFlags,
  1315. IN HMACHINE hMachine
  1316. );
  1317. CMAPI
  1318. CONFIGRET
  1319. WINAPI
  1320. CM_Free_Res_Des_Handle(
  1321. IN RES_DES rdResDes
  1322. );
  1323. CMAPI
  1324. CONFIGRET
  1325. WINAPI
  1326. CM_Get_Child(
  1327. OUT PDEVINST pdnDevInst,
  1328. IN DEVINST dnDevInst,
  1329. IN ULONG ulFlags
  1330. );
  1331. CMAPI
  1332. CONFIGRET
  1333. WINAPI
  1334. CM_Get_Child_Ex(
  1335. OUT PDEVINST pdnDevInst,
  1336. IN DEVINST dnDevInst,
  1337. IN ULONG ulFlags,
  1338. IN HMACHINE hMachine
  1339. );
  1340. CMAPI
  1341. CONFIGRET
  1342. WINAPI
  1343. CM_Get_Class_NameA(
  1344. IN LPGUID ClassGuid,
  1345. OUT PCHAR Buffer,
  1346. IN OUT PULONG pulLength,
  1347. IN ULONG ulFlags
  1348. );
  1349. CMAPI
  1350. CONFIGRET
  1351. WINAPI
  1352. CM_Get_Class_NameW(
  1353. IN LPGUID ClassGuid,
  1354. OUT PWCHAR Buffer,
  1355. IN OUT PULONG pulLength,
  1356. IN ULONG ulFlags
  1357. );
  1358. CMAPI
  1359. CONFIGRET
  1360. WINAPI
  1361. CM_Get_Class_Name_ExA(
  1362. IN LPGUID ClassGuid,
  1363. OUT PCHAR Buffer,
  1364. IN OUT PULONG pulLength,
  1365. IN ULONG ulFlags,
  1366. IN HMACHINE hMachine
  1367. );
  1368. CMAPI
  1369. CONFIGRET
  1370. WINAPI
  1371. CM_Get_Class_Name_ExW(
  1372. IN LPGUID ClassGuid,
  1373. OUT PWCHAR Buffer,
  1374. IN OUT PULONG pulLength,
  1375. IN ULONG ulFlags,
  1376. IN HMACHINE hMachine
  1377. );
  1378. #ifdef UNICODE
  1379. #define CM_Get_Class_Name CM_Get_Class_NameW
  1380. #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
  1381. #else
  1382. #define CM_Get_Class_Name CM_Get_Class_NameA
  1383. #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
  1384. #endif // UNICODE
  1385. CMAPI
  1386. CONFIGRET
  1387. WINAPI
  1388. CM_Get_Class_Key_NameA(
  1389. IN LPGUID ClassGuid,
  1390. OUT LPSTR pszKeyName,
  1391. IN OUT PULONG pulLength,
  1392. IN ULONG ulFlags
  1393. );
  1394. CMAPI
  1395. CONFIGRET
  1396. WINAPI
  1397. CM_Get_Class_Key_NameW(
  1398. IN LPGUID ClassGuid,
  1399. OUT LPWSTR pszKeyName,
  1400. IN OUT PULONG pulLength,
  1401. IN ULONG ulFlags
  1402. );
  1403. CMAPI
  1404. CONFIGRET
  1405. WINAPI
  1406. CM_Get_Class_Key_Name_ExA(
  1407. IN LPGUID ClassGuid,
  1408. OUT LPSTR pszKeyName,
  1409. IN OUT PULONG pulLength,
  1410. IN ULONG ulFlags,
  1411. IN HMACHINE hMachine
  1412. );
  1413. CMAPI
  1414. CONFIGRET
  1415. WINAPI
  1416. CM_Get_Class_Key_Name_ExW(
  1417. IN LPGUID ClassGuid,
  1418. OUT LPWSTR pszKeyName,
  1419. IN OUT PULONG pulLength,
  1420. IN ULONG ulFlags,
  1421. IN HMACHINE hMachine
  1422. );
  1423. #ifdef UNICODE
  1424. #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
  1425. #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
  1426. #else
  1427. #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
  1428. #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
  1429. #endif // UNICODE
  1430. CMAPI
  1431. CONFIGRET
  1432. WINAPI
  1433. CM_Get_Depth(
  1434. OUT PULONG pulDepth,
  1435. IN DEVINST dnDevInst,
  1436. IN ULONG ulFlags
  1437. );
  1438. CMAPI
  1439. CONFIGRET
  1440. WINAPI
  1441. CM_Get_Depth_Ex(
  1442. OUT PULONG pulDepth,
  1443. IN DEVINST dnDevInst,
  1444. IN ULONG ulFlags,
  1445. IN HMACHINE hMachine
  1446. );
  1447. CMAPI
  1448. CONFIGRET
  1449. WINAPI
  1450. CM_Get_Device_IDA(
  1451. IN DEVINST dnDevInst,
  1452. OUT PCHAR Buffer,
  1453. IN ULONG BufferLen,
  1454. IN ULONG ulFlags
  1455. );
  1456. CMAPI
  1457. CONFIGRET
  1458. WINAPI
  1459. CM_Get_Device_IDW(
  1460. IN DEVINST dnDevInst,
  1461. OUT PWCHAR Buffer,
  1462. IN ULONG BufferLen,
  1463. IN ULONG ulFlags
  1464. );
  1465. CMAPI
  1466. CONFIGRET
  1467. WINAPI
  1468. CM_Get_Device_ID_ExA(
  1469. IN DEVINST dnDevInst,
  1470. OUT PCHAR Buffer,
  1471. IN ULONG BufferLen,
  1472. IN ULONG ulFlags,
  1473. IN HMACHINE hMachine
  1474. );
  1475. CMAPI
  1476. CONFIGRET
  1477. WINAPI
  1478. CM_Get_Device_ID_ExW(
  1479. IN DEVINST dnDevInst,
  1480. OUT PWCHAR Buffer,
  1481. IN ULONG BufferLen,
  1482. IN ULONG ulFlags,
  1483. IN HMACHINE hMachine
  1484. );
  1485. #ifdef UNICODE
  1486. #define CM_Get_Device_ID CM_Get_Device_IDW
  1487. #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
  1488. #else
  1489. #define CM_Get_Device_ID CM_Get_Device_IDA
  1490. #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
  1491. #endif // UNICODE
  1492. CMAPI
  1493. CONFIGRET
  1494. WINAPI
  1495. CM_Get_Device_ID_ListA(
  1496. IN PCSTR pszFilter, OPTIONAL
  1497. OUT PCHAR Buffer,
  1498. IN ULONG BufferLen,
  1499. IN ULONG ulFlags
  1500. );
  1501. CMAPI
  1502. CONFIGRET
  1503. WINAPI
  1504. CM_Get_Device_ID_ListW(
  1505. IN PCWSTR pszFilter, OPTIONAL
  1506. OUT PWCHAR Buffer,
  1507. IN ULONG BufferLen,
  1508. IN ULONG ulFlags
  1509. );
  1510. CMAPI
  1511. CONFIGRET
  1512. WINAPI
  1513. CM_Get_Device_ID_List_ExA(
  1514. IN PCSTR pszFilter, OPTIONAL
  1515. OUT PCHAR Buffer,
  1516. IN ULONG BufferLen,
  1517. IN ULONG ulFlags,
  1518. IN HMACHINE hMachine
  1519. );
  1520. CMAPI
  1521. CONFIGRET
  1522. WINAPI
  1523. CM_Get_Device_ID_List_ExW(
  1524. IN PCWSTR pszFilter, OPTIONAL
  1525. OUT PWCHAR Buffer,
  1526. IN ULONG BufferLen,
  1527. IN ULONG ulFlags,
  1528. IN HMACHINE hMachine
  1529. );
  1530. #ifdef UNICODE
  1531. #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
  1532. #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
  1533. #else
  1534. #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
  1535. #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
  1536. #endif // UNICODE
  1537. CMAPI
  1538. CONFIGRET
  1539. WINAPI
  1540. CM_Get_Device_ID_List_SizeA(
  1541. OUT PULONG pulLen,
  1542. IN PCSTR pszFilter, OPTIONAL
  1543. IN ULONG ulFlags
  1544. );
  1545. CMAPI
  1546. CONFIGRET
  1547. WINAPI
  1548. CM_Get_Device_ID_List_SizeW(
  1549. OUT PULONG pulLen,
  1550. IN PCWSTR pszFilter, OPTIONAL
  1551. IN ULONG ulFlags
  1552. );
  1553. CMAPI
  1554. CONFIGRET
  1555. WINAPI
  1556. CM_Get_Device_ID_List_Size_ExA(
  1557. OUT PULONG pulLen,
  1558. IN PCSTR pszFilter, OPTIONAL
  1559. IN ULONG ulFlags,
  1560. IN HMACHINE hMachine
  1561. );
  1562. CMAPI
  1563. CONFIGRET
  1564. WINAPI
  1565. CM_Get_Device_ID_List_Size_ExW(
  1566. OUT PULONG pulLen,
  1567. IN PCWSTR pszFilter, OPTIONAL
  1568. IN ULONG ulFlags,
  1569. IN HMACHINE hMachine
  1570. );
  1571. #ifdef UNICODE
  1572. #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
  1573. #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
  1574. #else
  1575. #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
  1576. #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
  1577. #endif // UNICODE
  1578. CMAPI
  1579. CONFIGRET
  1580. WINAPI
  1581. CM_Get_Device_ID_Size(
  1582. OUT PULONG pulLen,
  1583. IN DEVINST dnDevInst,
  1584. IN ULONG ulFlags
  1585. );
  1586. CMAPI
  1587. CONFIGRET
  1588. WINAPI
  1589. CM_Get_Device_ID_Size_Ex(
  1590. OUT PULONG pulLen,
  1591. IN DEVINST dnDevInst,
  1592. IN ULONG ulFlags,
  1593. IN HMACHINE hMachine
  1594. );
  1595. CMAPI
  1596. CONFIGRET
  1597. WINAPI
  1598. CM_Get_DevNode_Registry_PropertyA(
  1599. IN DEVINST dnDevInst,
  1600. IN ULONG ulProperty,
  1601. OUT PULONG pulRegDataType, OPTIONAL
  1602. OUT PVOID Buffer, OPTIONAL
  1603. IN OUT PULONG pulLength,
  1604. IN ULONG ulFlags
  1605. );
  1606. CMAPI
  1607. CONFIGRET
  1608. WINAPI
  1609. CM_Get_DevNode_Registry_PropertyW(
  1610. IN DEVINST dnDevInst,
  1611. IN ULONG ulProperty,
  1612. OUT PULONG pulRegDataType, OPTIONAL
  1613. OUT PVOID Buffer, OPTIONAL
  1614. IN OUT PULONG pulLength,
  1615. IN ULONG ulFlags
  1616. );
  1617. CMAPI
  1618. CONFIGRET
  1619. WINAPI
  1620. CM_Get_DevNode_Registry_Property_ExA(
  1621. IN DEVINST dnDevInst,
  1622. IN ULONG ulProperty,
  1623. OUT PULONG pulRegDataType, OPTIONAL
  1624. OUT PVOID Buffer, OPTIONAL
  1625. IN OUT PULONG pulLength,
  1626. IN ULONG ulFlags,
  1627. IN HMACHINE hMachine
  1628. );
  1629. CMAPI
  1630. CONFIGRET
  1631. WINAPI
  1632. CM_Get_DevNode_Registry_Property_ExW(
  1633. IN DEVINST dnDevInst,
  1634. IN ULONG ulProperty,
  1635. OUT PULONG pulRegDataType, OPTIONAL
  1636. OUT PVOID Buffer, OPTIONAL
  1637. IN OUT PULONG pulLength,
  1638. IN ULONG ulFlags,
  1639. IN HMACHINE hMachine
  1640. );
  1641. #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
  1642. #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
  1643. #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
  1644. #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
  1645. #ifdef UNICODE
  1646. #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
  1647. #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
  1648. #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
  1649. #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
  1650. #else
  1651. #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
  1652. #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
  1653. #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
  1654. #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
  1655. #endif // UNICODE
  1656. CMAPI
  1657. CONFIGRET
  1658. WINAPI
  1659. CM_Get_DevNode_Custom_PropertyA(
  1660. IN DEVINST dnDevInst,
  1661. IN PCSTR pszCustomPropertyName,
  1662. OUT PULONG pulRegDataType, OPTIONAL
  1663. OUT PVOID Buffer, OPTIONAL
  1664. IN OUT PULONG pulLength,
  1665. IN ULONG ulFlags
  1666. );
  1667. CMAPI
  1668. CONFIGRET
  1669. WINAPI
  1670. CM_Get_DevNode_Custom_PropertyW(
  1671. IN DEVINST dnDevInst,
  1672. IN PCWSTR pszCustomPropertyName,
  1673. OUT PULONG pulRegDataType, OPTIONAL
  1674. OUT PVOID Buffer, OPTIONAL
  1675. IN OUT PULONG pulLength,
  1676. IN ULONG ulFlags
  1677. );
  1678. CMAPI
  1679. CONFIGRET
  1680. WINAPI
  1681. CM_Get_DevNode_Custom_Property_ExA(
  1682. IN DEVINST dnDevInst,
  1683. IN PCSTR pszCustomPropertyName,
  1684. OUT PULONG pulRegDataType, OPTIONAL
  1685. OUT PVOID Buffer, OPTIONAL
  1686. IN OUT PULONG pulLength,
  1687. IN ULONG ulFlags,
  1688. IN HMACHINE hMachine
  1689. );
  1690. CMAPI
  1691. CONFIGRET
  1692. WINAPI
  1693. CM_Get_DevNode_Custom_Property_ExW(
  1694. IN DEVINST dnDevInst,
  1695. IN PCWSTR pszCustomPropertyName,
  1696. OUT PULONG pulRegDataType, OPTIONAL
  1697. OUT PVOID Buffer, OPTIONAL
  1698. IN OUT PULONG pulLength,
  1699. IN ULONG ulFlags,
  1700. IN HMACHINE hMachine
  1701. );
  1702. #define CM_Get_DevInst_Custom_PropertyW CM_Get_DevNode_Custom_PropertyW
  1703. #define CM_Get_DevInst_Custom_PropertyA CM_Get_DevNode_Custom_PropertyA
  1704. #define CM_Get_DevInst_Custom_Property_ExW CM_Get_DevNode_Custom_Property_ExW
  1705. #define CM_Get_DevInst_Custom_Property_ExA CM_Get_DevNode_Custom_Property_ExA
  1706. #ifdef UNICODE
  1707. #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyW
  1708. #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
  1709. #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyW
  1710. #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
  1711. #else
  1712. #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyA
  1713. #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
  1714. #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyA
  1715. #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
  1716. #endif // UNICODE
  1717. CMAPI
  1718. CONFIGRET
  1719. WINAPI
  1720. CM_Get_DevNode_Status(
  1721. OUT PULONG pulStatus,
  1722. OUT PULONG pulProblemNumber,
  1723. IN DEVINST dnDevInst,
  1724. IN ULONG ulFlags
  1725. );
  1726. CMAPI
  1727. CONFIGRET
  1728. WINAPI
  1729. CM_Get_DevNode_Status_Ex(
  1730. OUT PULONG pulStatus,
  1731. OUT PULONG pulProblemNumber,
  1732. IN DEVINST dnDevInst,
  1733. IN ULONG ulFlags,
  1734. IN HMACHINE hMachine
  1735. );
  1736. #define CM_Get_DevInst_Status CM_Get_DevNode_Status
  1737. #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
  1738. CMAPI
  1739. CONFIGRET
  1740. WINAPI
  1741. CM_Get_First_Log_Conf(
  1742. OUT PLOG_CONF plcLogConf, OPTIONAL
  1743. IN DEVINST dnDevInst,
  1744. IN ULONG ulFlags
  1745. );
  1746. CMAPI
  1747. CONFIGRET
  1748. WINAPI
  1749. CM_Get_First_Log_Conf_Ex(
  1750. OUT PLOG_CONF plcLogConf, OPTIONAL
  1751. IN DEVINST dnDevInst,
  1752. IN ULONG ulFlags,
  1753. IN HMACHINE hMachine
  1754. );
  1755. CMAPI
  1756. CONFIGRET
  1757. WINAPI
  1758. CM_Get_Global_State(
  1759. OUT PULONG pulState,
  1760. IN ULONG ulFlags
  1761. );
  1762. CMAPI
  1763. CONFIGRET
  1764. WINAPI
  1765. CM_Get_Global_State_Ex(
  1766. OUT PULONG pulState,
  1767. IN ULONG ulFlags,
  1768. IN HMACHINE hMachine
  1769. );
  1770. CMAPI
  1771. CONFIGRET
  1772. WINAPI
  1773. CM_Get_Hardware_Profile_InfoA(
  1774. IN ULONG ulIndex,
  1775. OUT PHWPROFILEINFO_A pHWProfileInfo,
  1776. IN ULONG ulFlags
  1777. );
  1778. CMAPI
  1779. CONFIGRET
  1780. WINAPI
  1781. CM_Get_Hardware_Profile_Info_ExA(
  1782. IN ULONG ulIndex,
  1783. OUT PHWPROFILEINFO_A pHWProfileInfo,
  1784. IN ULONG ulFlags,
  1785. IN HMACHINE hMachine
  1786. );
  1787. CMAPI
  1788. CONFIGRET
  1789. WINAPI
  1790. CM_Get_Hardware_Profile_InfoW(
  1791. IN ULONG ulIndex,
  1792. OUT PHWPROFILEINFO_W pHWProfileInfo,
  1793. IN ULONG ulFlags
  1794. );
  1795. CMAPI
  1796. CONFIGRET
  1797. WINAPI
  1798. CM_Get_Hardware_Profile_Info_ExW(
  1799. IN ULONG ulIndex,
  1800. OUT PHWPROFILEINFO_W pHWProfileInfo,
  1801. IN ULONG ulFlags,
  1802. IN HMACHINE hMachine
  1803. );
  1804. #ifdef UNICODE
  1805. #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoW
  1806. #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExW
  1807. #else
  1808. #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoA
  1809. #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExA
  1810. #endif // UNICODE
  1811. CMAPI
  1812. CONFIGRET
  1813. WINAPI
  1814. CM_Get_HW_Prof_FlagsA(
  1815. IN DEVINSTID_A szDevInstName,
  1816. IN ULONG ulHardwareProfile,
  1817. OUT PULONG pulValue,
  1818. IN ULONG ulFlags
  1819. );
  1820. CMAPI
  1821. CONFIGRET
  1822. WINAPI
  1823. CM_Get_HW_Prof_FlagsW(
  1824. IN DEVINSTID_W szDevInstName,
  1825. IN ULONG ulHardwareProfile,
  1826. OUT PULONG pulValue,
  1827. IN ULONG ulFlags
  1828. );
  1829. CMAPI
  1830. CONFIGRET
  1831. WINAPI
  1832. CM_Get_HW_Prof_Flags_ExA(
  1833. IN DEVINSTID_A szDevInstName,
  1834. IN ULONG ulHardwareProfile,
  1835. OUT PULONG pulValue,
  1836. IN ULONG ulFlags,
  1837. IN HMACHINE hMachine
  1838. );
  1839. CMAPI
  1840. CONFIGRET
  1841. WINAPI
  1842. CM_Get_HW_Prof_Flags_ExW(
  1843. IN DEVINSTID_W szDevInstName,
  1844. IN ULONG ulHardwareProfile,
  1845. OUT PULONG pulValue,
  1846. IN ULONG ulFlags,
  1847. IN HMACHINE hMachine
  1848. );
  1849. #ifdef UNICODE
  1850. #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
  1851. #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
  1852. #else
  1853. #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
  1854. #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
  1855. #endif // UNICODE
  1856. CMAPI
  1857. CONFIGRET
  1858. WINAPI
  1859. CM_Get_Device_Interface_AliasA(
  1860. IN LPCSTR pszDeviceInterface,
  1861. IN LPGUID AliasInterfaceGuid,
  1862. OUT LPSTR pszAliasDeviceInterface,
  1863. IN OUT PULONG pulLength,
  1864. IN ULONG ulFlags
  1865. );
  1866. CMAPI
  1867. CONFIGRET
  1868. WINAPI
  1869. CM_Get_Device_Interface_AliasW(
  1870. IN LPCWSTR pszDeviceInterface,
  1871. IN LPGUID AliasInterfaceGuid,
  1872. OUT LPWSTR pszAliasDeviceInterface,
  1873. IN OUT PULONG pulLength,
  1874. IN ULONG ulFlags
  1875. );
  1876. CMAPI
  1877. CONFIGRET
  1878. WINAPI
  1879. CM_Get_Device_Interface_Alias_ExA(
  1880. IN LPCSTR pszDeviceInterface,
  1881. IN LPGUID AliasInterfaceGuid,
  1882. OUT LPSTR pszAliasDeviceInterface,
  1883. IN OUT PULONG pulLength,
  1884. IN ULONG ulFlags,
  1885. IN HMACHINE hMachine
  1886. );
  1887. CMAPI
  1888. CONFIGRET
  1889. WINAPI
  1890. CM_Get_Device_Interface_Alias_ExW(
  1891. IN LPCWSTR pszDeviceInterface,
  1892. IN LPGUID AliasInterfaceGuid,
  1893. OUT LPWSTR pszAliasDeviceInterface,
  1894. IN OUT PULONG pulLength,
  1895. IN ULONG ulFlags,
  1896. IN HMACHINE hMachine
  1897. );
  1898. #ifdef UNICODE
  1899. #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasW
  1900. #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExW
  1901. #else
  1902. #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasA
  1903. #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExA
  1904. #endif // UNICODE
  1905. CMAPI
  1906. CONFIGRET
  1907. WINAPI
  1908. CM_Get_Device_Interface_ListA(
  1909. IN LPGUID InterfaceClassGuid,
  1910. IN DEVINSTID_A pDeviceID, OPTIONAL
  1911. OUT PCHAR Buffer,
  1912. IN ULONG BufferLen,
  1913. IN ULONG ulFlags
  1914. );
  1915. CMAPI
  1916. CONFIGRET
  1917. WINAPI
  1918. CM_Get_Device_Interface_ListW(
  1919. IN LPGUID InterfaceClassGuid,
  1920. IN DEVINSTID_W pDeviceID, OPTIONAL
  1921. OUT PWCHAR Buffer,
  1922. IN ULONG BufferLen,
  1923. IN ULONG ulFlags
  1924. );
  1925. CMAPI
  1926. CONFIGRET
  1927. WINAPI
  1928. CM_Get_Device_Interface_List_ExA(
  1929. IN LPGUID InterfaceClassGuid,
  1930. IN DEVINSTID_A pDeviceID, OPTIONAL
  1931. OUT PCHAR Buffer,
  1932. IN ULONG BufferLen,
  1933. IN ULONG ulFlags,
  1934. IN HMACHINE hMachine
  1935. );
  1936. CMAPI
  1937. CONFIGRET
  1938. WINAPI
  1939. CM_Get_Device_Interface_List_ExW(
  1940. IN LPGUID InterfaceClassGuid,
  1941. IN DEVINSTID_W pDeviceID, OPTIONAL
  1942. OUT PWCHAR Buffer,
  1943. IN ULONG BufferLen,
  1944. IN ULONG ulFlags,
  1945. IN HMACHINE hMachine
  1946. );
  1947. #ifdef UNICODE
  1948. #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListW
  1949. #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExW
  1950. #else
  1951. #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListA
  1952. #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExA
  1953. #endif // UNICODE
  1954. CMAPI
  1955. CONFIGRET
  1956. WINAPI
  1957. CM_Get_Device_Interface_List_SizeA(
  1958. IN PULONG pulLen,
  1959. IN LPGUID InterfaceClassGuid,
  1960. IN DEVINSTID_A pDeviceID, OPTIONAL
  1961. IN ULONG ulFlags
  1962. );
  1963. CMAPI
  1964. CONFIGRET
  1965. WINAPI
  1966. CM_Get_Device_Interface_List_SizeW(
  1967. IN PULONG pulLen,
  1968. IN LPGUID InterfaceClassGuid,
  1969. IN DEVINSTID_W pDeviceID, OPTIONAL
  1970. IN ULONG ulFlags
  1971. );
  1972. CMAPI
  1973. CONFIGRET
  1974. WINAPI
  1975. CM_Get_Device_Interface_List_Size_ExA(
  1976. IN PULONG pulLen,
  1977. IN LPGUID InterfaceClassGuid,
  1978. IN DEVINSTID_A pDeviceID, OPTIONAL
  1979. IN ULONG ulFlags,
  1980. IN HMACHINE hMachine
  1981. );
  1982. CMAPI
  1983. CONFIGRET
  1984. WINAPI
  1985. CM_Get_Device_Interface_List_Size_ExW(
  1986. IN PULONG pulLen,
  1987. IN LPGUID InterfaceClassGuid,
  1988. IN DEVINSTID_W pDeviceID, OPTIONAL
  1989. IN ULONG ulFlags,
  1990. IN HMACHINE hMachine
  1991. );
  1992. #ifdef UNICODE
  1993. #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeW
  1994. #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExW
  1995. #else
  1996. #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeA
  1997. #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExA
  1998. #endif // UNICODE
  1999. CMAPI
  2000. CONFIGRET
  2001. WINAPI
  2002. CM_Get_Log_Conf_Priority(
  2003. IN LOG_CONF lcLogConf,
  2004. OUT PPRIORITY pPriority,
  2005. IN ULONG ulFlags
  2006. );
  2007. CMAPI
  2008. CONFIGRET
  2009. WINAPI
  2010. CM_Get_Log_Conf_Priority_Ex(
  2011. IN LOG_CONF lcLogConf,
  2012. OUT PPRIORITY pPriority,
  2013. IN ULONG ulFlags,
  2014. IN HMACHINE hMachine
  2015. );
  2016. CMAPI
  2017. CONFIGRET
  2018. WINAPI
  2019. CM_Get_Next_Log_Conf(
  2020. OUT PLOG_CONF plcLogConf, OPTIONAL
  2021. IN LOG_CONF lcLogConf,
  2022. IN ULONG ulFlags
  2023. );
  2024. CMAPI
  2025. CONFIGRET
  2026. WINAPI
  2027. CM_Get_Next_Log_Conf_Ex(
  2028. OUT PLOG_CONF plcLogConf, OPTIONAL
  2029. IN LOG_CONF lcLogConf,
  2030. IN ULONG ulFlags,
  2031. IN HMACHINE hMachine
  2032. );
  2033. CMAPI
  2034. CONFIGRET
  2035. WINAPI
  2036. CM_Get_Parent(
  2037. OUT PDEVINST pdnDevInst,
  2038. IN DEVINST dnDevInst,
  2039. IN ULONG ulFlags
  2040. );
  2041. CMAPI
  2042. CONFIGRET
  2043. WINAPI
  2044. CM_Get_Parent_Ex(
  2045. OUT PDEVINST pdnDevInst,
  2046. IN DEVINST dnDevInst,
  2047. IN ULONG ulFlags,
  2048. IN HMACHINE hMachine
  2049. );
  2050. CMAPI
  2051. CONFIGRET
  2052. WINAPI
  2053. CM_Get_Res_Des_Data(
  2054. IN RES_DES rdResDes,
  2055. OUT PVOID Buffer,
  2056. IN ULONG BufferLen,
  2057. IN ULONG ulFlags
  2058. );
  2059. CMAPI
  2060. CONFIGRET
  2061. WINAPI
  2062. CM_Get_Res_Des_Data_Ex(
  2063. IN RES_DES rdResDes,
  2064. OUT PVOID Buffer,
  2065. IN ULONG BufferLen,
  2066. IN ULONG ulFlags,
  2067. IN HMACHINE hMachine
  2068. );
  2069. CMAPI
  2070. CONFIGRET
  2071. WINAPI
  2072. CM_Get_Res_Des_Data_Size(
  2073. OUT PULONG pulSize,
  2074. IN RES_DES rdResDes,
  2075. IN ULONG ulFlags
  2076. );
  2077. CMAPI
  2078. CONFIGRET
  2079. WINAPI
  2080. CM_Get_Res_Des_Data_Size_Ex(
  2081. OUT PULONG pulSize,
  2082. IN RES_DES rdResDes,
  2083. IN ULONG ulFlags,
  2084. IN HMACHINE hMachine
  2085. );
  2086. CMAPI
  2087. CONFIGRET
  2088. WINAPI
  2089. CM_Get_Sibling(
  2090. OUT PDEVINST pdnDevInst,
  2091. IN DEVINST DevInst,
  2092. IN ULONG ulFlags
  2093. );
  2094. CMAPI
  2095. CONFIGRET
  2096. WINAPI
  2097. CM_Get_Sibling_Ex(
  2098. OUT PDEVINST pdnDevInst,
  2099. IN DEVINST DevInst,
  2100. IN ULONG ulFlags,
  2101. IN HMACHINE hMachine
  2102. );
  2103. CMAPI
  2104. WORD
  2105. WINAPI
  2106. CM_Get_Version(
  2107. VOID
  2108. );
  2109. CMAPI
  2110. WORD
  2111. WINAPI
  2112. CM_Get_Version_Ex(
  2113. IN HMACHINE hMachine
  2114. );
  2115. CMAPI
  2116. BOOL
  2117. WINAPI
  2118. CM_Is_Version_Available(
  2119. IN WORD wVersion
  2120. );
  2121. CMAPI
  2122. BOOL
  2123. WINAPI
  2124. CM_Is_Version_Available_Ex(
  2125. IN WORD wVersion,
  2126. IN HMACHINE hMachine
  2127. );
  2128. CMAPI
  2129. CONFIGRET
  2130. WINAPI
  2131. CM_Intersect_Range_List(
  2132. IN RANGE_LIST rlhOld1,
  2133. IN RANGE_LIST rlhOld2,
  2134. IN RANGE_LIST rlhNew,
  2135. IN ULONG ulFlags
  2136. );
  2137. CMAPI
  2138. CONFIGRET
  2139. WINAPI
  2140. CM_Invert_Range_List(
  2141. IN RANGE_LIST rlhOld,
  2142. IN RANGE_LIST rlhNew,
  2143. IN DWORDLONG ullMaxValue,
  2144. IN ULONG ulFlags
  2145. );
  2146. CMAPI
  2147. CONFIGRET
  2148. WINAPI
  2149. CM_Locate_DevNodeA(
  2150. OUT PDEVINST pdnDevInst,
  2151. IN DEVINSTID_A pDeviceID, OPTIONAL
  2152. IN ULONG ulFlags
  2153. );
  2154. CMAPI
  2155. CONFIGRET
  2156. WINAPI
  2157. CM_Locate_DevNodeW(
  2158. OUT PDEVINST pdnDevInst,
  2159. IN DEVINSTID_W pDeviceID, OPTIONAL
  2160. IN ULONG ulFlags
  2161. );
  2162. CMAPI
  2163. CONFIGRET
  2164. WINAPI
  2165. CM_Locate_DevNode_ExA(
  2166. OUT PDEVINST pdnDevInst,
  2167. IN DEVINSTID_A pDeviceID, OPTIONAL
  2168. IN ULONG ulFlags,
  2169. IN HMACHINE hMachine
  2170. );
  2171. CMAPI
  2172. CONFIGRET
  2173. WINAPI
  2174. CM_Locate_DevNode_ExW(
  2175. OUT PDEVINST pdnDevInst,
  2176. IN DEVINSTID_W pDeviceID, OPTIONAL
  2177. IN ULONG ulFlags,
  2178. IN HMACHINE hMachine
  2179. );
  2180. #define CM_Locate_DevInstA CM_Locate_DevNodeA
  2181. #define CM_Locate_DevInstW CM_Locate_DevNodeW
  2182. #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
  2183. #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
  2184. #ifdef UNICODE
  2185. #define CM_Locate_DevNode CM_Locate_DevNodeW
  2186. #define CM_Locate_DevInst CM_Locate_DevNodeW
  2187. #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
  2188. #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
  2189. #else
  2190. #define CM_Locate_DevNode CM_Locate_DevNodeA
  2191. #define CM_Locate_DevInst CM_Locate_DevNodeA
  2192. #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
  2193. #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
  2194. #endif // UNICODE
  2195. CMAPI
  2196. CONFIGRET
  2197. WINAPI
  2198. CM_Merge_Range_List(
  2199. IN RANGE_LIST rlhOld1,
  2200. IN RANGE_LIST rlhOld2,
  2201. IN RANGE_LIST rlhNew,
  2202. IN ULONG ulFlags
  2203. );
  2204. CMAPI
  2205. CONFIGRET
  2206. WINAPI
  2207. CM_Modify_Res_Des(
  2208. OUT PRES_DES prdResDes,
  2209. IN RES_DES rdResDes,
  2210. IN RESOURCEID ResourceID,
  2211. IN PCVOID ResourceData,
  2212. IN ULONG ResourceLen,
  2213. IN ULONG ulFlags
  2214. );
  2215. CMAPI
  2216. CONFIGRET
  2217. WINAPI
  2218. CM_Modify_Res_Des_Ex(
  2219. OUT PRES_DES prdResDes,
  2220. IN RES_DES rdResDes,
  2221. IN RESOURCEID ResourceID,
  2222. IN PCVOID ResourceData,
  2223. IN ULONG ResourceLen,
  2224. IN ULONG ulFlags,
  2225. IN HMACHINE hMachine
  2226. );
  2227. CMAPI
  2228. CONFIGRET
  2229. WINAPI
  2230. CM_Move_DevNode(
  2231. IN DEVINST dnFromDevInst,
  2232. IN DEVINST dnToDevInst,
  2233. IN ULONG ulFlags
  2234. );
  2235. CMAPI
  2236. CONFIGRET
  2237. WINAPI
  2238. CM_Move_DevNode_Ex(
  2239. IN DEVINST dnFromDevInst,
  2240. IN DEVINST dnToDevInst,
  2241. IN ULONG ulFlags,
  2242. IN HMACHINE hMachine
  2243. );
  2244. #define CM_Move_DevInst CM_Move_DevNode
  2245. #define CM_Move_DevInst_Ex CM_Move_DevNode_Ex
  2246. CMAPI
  2247. CONFIGRET
  2248. WINAPI
  2249. CM_Next_Range(
  2250. IN OUT PRANGE_ELEMENT preElement,
  2251. OUT PDWORDLONG pullStart,
  2252. OUT PDWORDLONG pullEnd,
  2253. IN ULONG ulFlags
  2254. );
  2255. CMAPI
  2256. CONFIGRET
  2257. WINAPI
  2258. CM_Get_Next_Res_Des(
  2259. OUT PRES_DES prdResDes,
  2260. IN RES_DES rdResDes,
  2261. IN RESOURCEID ForResource,
  2262. OUT PRESOURCEID pResourceID,
  2263. IN ULONG ulFlags
  2264. );
  2265. CMAPI
  2266. CONFIGRET
  2267. WINAPI
  2268. CM_Get_Next_Res_Des_Ex(
  2269. OUT PRES_DES prdResDes,
  2270. IN RES_DES rdResDes,
  2271. IN RESOURCEID ForResource,
  2272. OUT PRESOURCEID pResourceID,
  2273. IN ULONG ulFlags,
  2274. IN HMACHINE hMachine
  2275. );
  2276. CMAPI
  2277. CONFIGRET
  2278. WINAPI
  2279. CM_Open_Class_KeyA(
  2280. IN LPGUID ClassGuid, OPTIONAL
  2281. IN LPCSTR pszClassName, OPTIONAL
  2282. IN REGSAM samDesired,
  2283. IN REGDISPOSITION Disposition,
  2284. OUT PHKEY phkClass,
  2285. IN ULONG ulFlags
  2286. );
  2287. CMAPI
  2288. CONFIGRET
  2289. WINAPI
  2290. CM_Open_Class_KeyW(
  2291. IN LPGUID ClassGuid, OPTIONAL
  2292. IN LPCWSTR pszClassName, OPTIONAL
  2293. IN REGSAM samDesired,
  2294. IN REGDISPOSITION Disposition,
  2295. OUT PHKEY phkClass,
  2296. IN ULONG ulFlags
  2297. );
  2298. CMAPI
  2299. CONFIGRET
  2300. WINAPI
  2301. CM_Open_Class_Key_ExA(
  2302. IN LPGUID pszClassGuid, OPTIONAL
  2303. IN LPCSTR pszClassName, OPTIONAL
  2304. IN REGSAM samDesired,
  2305. IN REGDISPOSITION Disposition,
  2306. OUT PHKEY phkClass,
  2307. IN ULONG ulFlags,
  2308. IN HMACHINE hMachine
  2309. );
  2310. CMAPI
  2311. CONFIGRET
  2312. WINAPI
  2313. CM_Open_Class_Key_ExW(
  2314. IN LPGUID pszClassGuid, OPTIONAL
  2315. IN LPCWSTR pszClassName, OPTIONAL
  2316. IN REGSAM samDesired,
  2317. IN REGDISPOSITION Disposition,
  2318. OUT PHKEY phkClass,
  2319. IN ULONG ulFlags,
  2320. IN HMACHINE hMachine
  2321. );
  2322. #ifdef UNICODE
  2323. #define CM_Open_Class_Key CM_Open_Class_KeyW
  2324. #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
  2325. #else
  2326. #define CM_Open_Class_Key CM_Open_Class_KeyA
  2327. #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
  2328. #endif // UNICODE
  2329. CMAPI
  2330. CONFIGRET
  2331. WINAPI
  2332. CM_Open_DevNode_Key(
  2333. IN DEVINST dnDevNode,
  2334. IN REGSAM samDesired,
  2335. IN ULONG ulHardwareProfile,
  2336. IN REGDISPOSITION Disposition,
  2337. OUT PHKEY phkDevice,
  2338. IN ULONG ulFlags
  2339. );
  2340. CMAPI
  2341. CONFIGRET
  2342. WINAPI
  2343. CM_Open_DevNode_Key_Ex(
  2344. IN DEVINST dnDevNode,
  2345. IN REGSAM samDesired,
  2346. IN ULONG ulHardwareProfile,
  2347. IN REGDISPOSITION Disposition,
  2348. OUT PHKEY phkDevice,
  2349. IN ULONG ulFlags,
  2350. IN HMACHINE hMachine
  2351. );
  2352. #define CM_Open_DevInst_Key CM_Open_DevNode_Key
  2353. #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
  2354. CMAPI
  2355. CONFIGRET
  2356. WINAPI
  2357. CM_Query_Arbitrator_Free_Data(
  2358. OUT PVOID pData,
  2359. IN ULONG DataLen,
  2360. IN DEVINST dnDevInst,
  2361. IN RESOURCEID ResourceID,
  2362. IN ULONG ulFlags
  2363. );
  2364. CMAPI
  2365. CONFIGRET
  2366. WINAPI
  2367. CM_Query_Arbitrator_Free_Data_Ex(
  2368. OUT PVOID pData,
  2369. IN ULONG DataLen,
  2370. IN DEVINST dnDevInst,
  2371. IN RESOURCEID ResourceID,
  2372. IN ULONG ulFlags,
  2373. IN HMACHINE hMachine
  2374. );
  2375. CMAPI
  2376. CONFIGRET
  2377. WINAPI
  2378. CM_Query_Arbitrator_Free_Size(
  2379. OUT PULONG pulSize,
  2380. IN DEVINST dnDevInst,
  2381. IN RESOURCEID ResourceID,
  2382. IN ULONG ulFlags
  2383. );
  2384. CMAPI
  2385. CONFIGRET
  2386. WINAPI
  2387. CM_Query_Arbitrator_Free_Size_Ex(
  2388. OUT PULONG pulSize,
  2389. IN DEVINST dnDevInst,
  2390. IN RESOURCEID ResourceID,
  2391. IN ULONG ulFlags,
  2392. IN HMACHINE hMachine
  2393. );
  2394. CMAPI
  2395. CONFIGRET
  2396. WINAPI
  2397. CM_Query_Remove_SubTree(
  2398. IN DEVINST dnAncestor,
  2399. IN ULONG ulFlags
  2400. );
  2401. CMAPI
  2402. CONFIGRET
  2403. WINAPI
  2404. CM_Query_Remove_SubTree_Ex(
  2405. IN DEVINST dnAncestor,
  2406. IN ULONG ulFlags,
  2407. IN HMACHINE hMachine
  2408. );
  2409. CMAPI
  2410. CONFIGRET
  2411. WINAPI
  2412. CM_Query_And_Remove_SubTreeA(
  2413. IN DEVINST dnAncestor,
  2414. OUT PPNP_VETO_TYPE pVetoType,
  2415. OUT LPSTR pszVetoName,
  2416. IN ULONG ulNameLength,
  2417. IN ULONG ulFlags
  2418. );
  2419. CMAPI
  2420. CONFIGRET
  2421. WINAPI
  2422. CM_Query_And_Remove_SubTree_ExA(
  2423. IN DEVINST dnAncestor,
  2424. OUT PPNP_VETO_TYPE pVetoType,
  2425. OUT LPSTR pszVetoName,
  2426. IN ULONG ulNameLength,
  2427. IN ULONG ulFlags,
  2428. IN HMACHINE hMachine
  2429. );
  2430. CMAPI
  2431. CONFIGRET
  2432. WINAPI
  2433. CM_Query_And_Remove_SubTreeW(
  2434. IN DEVINST dnAncestor,
  2435. OUT PPNP_VETO_TYPE pVetoType,
  2436. OUT LPWSTR pszVetoName,
  2437. IN ULONG ulNameLength,
  2438. IN ULONG ulFlags
  2439. );
  2440. CMAPI
  2441. CONFIGRET
  2442. WINAPI
  2443. CM_Query_And_Remove_SubTree_ExW(
  2444. IN DEVINST dnAncestor,
  2445. OUT PPNP_VETO_TYPE pVetoType,
  2446. OUT LPWSTR pszVetoName,
  2447. IN ULONG ulNameLength,
  2448. IN ULONG ulFlags,
  2449. IN HMACHINE hMachine
  2450. );
  2451. #ifdef UNICODE
  2452. #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeW
  2453. #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExW
  2454. #else
  2455. #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeA
  2456. #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExA
  2457. #endif // UNICODE
  2458. CMAPI
  2459. CONFIGRET
  2460. WINAPI
  2461. CM_Request_Device_EjectA(
  2462. IN DEVINST dnDevInst,
  2463. OUT PPNP_VETO_TYPE pVetoType,
  2464. OUT LPSTR pszVetoName,
  2465. IN ULONG ulNameLength,
  2466. IN ULONG ulFlags
  2467. );
  2468. CMAPI
  2469. CONFIGRET
  2470. WINAPI
  2471. CM_Request_Device_Eject_ExA(
  2472. IN DEVINST dnDevInst,
  2473. OUT PPNP_VETO_TYPE pVetoType,
  2474. OUT LPSTR pszVetoName,
  2475. IN ULONG ulNameLength,
  2476. IN ULONG ulFlags,
  2477. IN HMACHINE hMachine
  2478. );
  2479. CMAPI
  2480. CONFIGRET
  2481. WINAPI
  2482. CM_Request_Device_EjectW(
  2483. IN DEVINST dnDevInst,
  2484. OUT PPNP_VETO_TYPE pVetoType,
  2485. OUT LPWSTR pszVetoName,
  2486. IN ULONG ulNameLength,
  2487. IN ULONG ulFlags
  2488. );
  2489. CMAPI
  2490. CONFIGRET
  2491. WINAPI
  2492. CM_Request_Device_Eject_ExW(
  2493. IN DEVINST dnDevInst,
  2494. OUT PPNP_VETO_TYPE pVetoType,
  2495. OUT LPWSTR pszVetoName,
  2496. IN ULONG ulNameLength,
  2497. IN ULONG ulFlags,
  2498. IN HMACHINE hMachine
  2499. );
  2500. #ifdef UNICODE
  2501. #define CM_Request_Device_Eject CM_Request_Device_EjectW
  2502. #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
  2503. #else
  2504. #define CM_Request_Device_Eject CM_Request_Device_EjectA
  2505. #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
  2506. #endif // UNICODE
  2507. CMAPI
  2508. CONFIGRET
  2509. WINAPI
  2510. CM_Reenumerate_DevNode(
  2511. IN DEVINST dnDevInst,
  2512. IN ULONG ulFlags
  2513. );
  2514. CMAPI
  2515. CONFIGRET
  2516. WINAPI
  2517. CM_Reenumerate_DevNode_Ex(
  2518. IN DEVINST dnDevInst,
  2519. IN ULONG ulFlags,
  2520. IN HMACHINE hMachine
  2521. );
  2522. #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
  2523. #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
  2524. CMAPI
  2525. CONFIGRET
  2526. WINAPI
  2527. CM_Register_Device_InterfaceA(
  2528. IN DEVINST dnDevInst,
  2529. IN LPGUID InterfaceClassGuid,
  2530. IN LPCSTR pszReference, OPTIONAL
  2531. OUT LPSTR pszDeviceInterface,
  2532. IN OUT PULONG pulLength,
  2533. IN ULONG ulFlags
  2534. );
  2535. CMAPI
  2536. CONFIGRET
  2537. WINAPI
  2538. CM_Register_Device_InterfaceW(
  2539. IN DEVINST dnDevInst,
  2540. IN LPGUID InterfaceClassGuid,
  2541. IN LPCWSTR pszReference, OPTIONAL
  2542. OUT LPWSTR pszDeviceInterface,
  2543. IN OUT PULONG pulLength,
  2544. IN ULONG ulFlags
  2545. );
  2546. CMAPI
  2547. CONFIGRET
  2548. WINAPI
  2549. CM_Register_Device_Interface_ExA(
  2550. IN DEVINST dnDevInst,
  2551. IN LPGUID InterfaceClassGuid,
  2552. IN LPCSTR pszReference, OPTIONAL
  2553. OUT LPSTR pszDeviceInterface,
  2554. IN OUT PULONG pulLength,
  2555. IN ULONG ulFlags,
  2556. IN HMACHINE hMachine
  2557. );
  2558. CMAPI
  2559. CONFIGRET
  2560. WINAPI
  2561. CM_Register_Device_Interface_ExW(
  2562. IN DEVINST dnDevInst,
  2563. IN LPGUID InterfaceClassGuid,
  2564. IN LPCWSTR pszReference, OPTIONAL
  2565. OUT LPWSTR pszDeviceInterface,
  2566. IN OUT PULONG pulLength,
  2567. IN ULONG ulFlags,
  2568. IN HMACHINE hMachine
  2569. );
  2570. #ifdef UNICODE
  2571. #define CM_Register_Device_Interface CM_Register_Device_InterfaceW
  2572. #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExW
  2573. #else
  2574. #define CM_Register_Device_Interface CM_Register_Device_InterfaceA
  2575. #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExA
  2576. #endif // UNICODE
  2577. CMAPI
  2578. CONFIGRET
  2579. WINAPI
  2580. CM_Set_DevNode_Problem_Ex(
  2581. IN DEVINST dnDevInst,
  2582. IN ULONG ulProblem,
  2583. IN ULONG ulFlags,
  2584. IN HMACHINE hMachine
  2585. );
  2586. CMAPI
  2587. CONFIGRET
  2588. WINAPI
  2589. CM_Set_DevNode_Problem(
  2590. IN DEVINST dnDevInst,
  2591. IN ULONG ulProblem,
  2592. IN ULONG ulFlags
  2593. );
  2594. #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
  2595. #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
  2596. CMAPI
  2597. CONFIGRET
  2598. WINAPI
  2599. CM_Unregister_Device_InterfaceA(
  2600. IN LPCSTR pszDeviceInterface,
  2601. IN ULONG ulFlags
  2602. );
  2603. CMAPI
  2604. CONFIGRET
  2605. WINAPI
  2606. CM_Unregister_Device_InterfaceW(
  2607. IN LPCWSTR pszDeviceInterface,
  2608. IN ULONG ulFlags
  2609. );
  2610. CMAPI
  2611. CONFIGRET
  2612. WINAPI
  2613. CM_Unregister_Device_Interface_ExA(
  2614. IN LPCSTR pszDeviceInterface,
  2615. IN ULONG ulFlags,
  2616. IN HMACHINE hMachine
  2617. );
  2618. CMAPI
  2619. CONFIGRET
  2620. WINAPI
  2621. CM_Unregister_Device_Interface_ExW(
  2622. IN LPCWSTR pszDeviceInterface,
  2623. IN ULONG ulFlags,
  2624. IN HMACHINE hMachine
  2625. );
  2626. #ifdef UNICODE
  2627. #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceW
  2628. #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExW
  2629. #else
  2630. #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceA
  2631. #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExA
  2632. #endif // UNICODE
  2633. CMAPI
  2634. CONFIGRET
  2635. WINAPI
  2636. CM_Register_Device_Driver(
  2637. IN DEVINST dnDevInst,
  2638. IN ULONG ulFlags
  2639. );
  2640. CMAPI
  2641. CONFIGRET
  2642. WINAPI
  2643. CM_Register_Device_Driver_Ex(
  2644. IN DEVINST dnDevInst,
  2645. IN ULONG ulFlags,
  2646. IN HMACHINE hMachine
  2647. );
  2648. CMAPI
  2649. CONFIGRET
  2650. WINAPI
  2651. CM_Remove_SubTree(
  2652. IN DEVINST dnAncestor,
  2653. IN ULONG ulFlags
  2654. );
  2655. CMAPI
  2656. CONFIGRET
  2657. WINAPI
  2658. CM_Remove_SubTree_Ex(
  2659. IN DEVINST dnAncestor,
  2660. IN ULONG ulFlags,
  2661. IN HMACHINE hMachine
  2662. );
  2663. CMAPI
  2664. CONFIGRET
  2665. WINAPI
  2666. CM_Set_DevNode_Registry_PropertyA(
  2667. IN DEVINST dnDevInst,
  2668. IN ULONG ulProperty,
  2669. IN PCVOID Buffer, OPTIONAL
  2670. IN ULONG ulLength,
  2671. IN ULONG ulFlags
  2672. );
  2673. CMAPI
  2674. CONFIGRET
  2675. WINAPI
  2676. CM_Set_DevNode_Registry_PropertyW(
  2677. IN DEVINST dnDevInst,
  2678. IN ULONG ulProperty,
  2679. IN PCVOID Buffer, OPTIONAL
  2680. IN ULONG ulLength,
  2681. IN ULONG ulFlags
  2682. );
  2683. CMAPI
  2684. CONFIGRET
  2685. WINAPI
  2686. CM_Set_DevNode_Registry_Property_ExA(
  2687. IN DEVINST dnDevInst,
  2688. IN ULONG ulProperty,
  2689. IN PCVOID Buffer, OPTIONAL
  2690. IN ULONG ulLength,
  2691. IN ULONG ulFlags,
  2692. IN HMACHINE hMachine
  2693. );
  2694. CMAPI
  2695. CONFIGRET
  2696. WINAPI
  2697. CM_Set_DevNode_Registry_Property_ExW(
  2698. IN DEVINST dnDevInst,
  2699. IN ULONG ulProperty,
  2700. IN PCVOID Buffer, OPTIONAL
  2701. IN ULONG ulLength,
  2702. IN ULONG ulFlags,
  2703. IN HMACHINE hMachine
  2704. );
  2705. #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
  2706. #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
  2707. #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
  2708. #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
  2709. #ifdef UNICODE
  2710. #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
  2711. #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
  2712. #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
  2713. #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
  2714. #else
  2715. #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
  2716. #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
  2717. #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
  2718. #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
  2719. #endif // UNICODE
  2720. CMAPI
  2721. CONFIGRET
  2722. WINAPI
  2723. CM_Is_Dock_Station_Present(
  2724. OUT PBOOL pbPresent
  2725. );
  2726. CMAPI
  2727. CONFIGRET
  2728. WINAPI
  2729. CM_Is_Dock_Station_Present_Ex(
  2730. OUT PBOOL pbPresent,
  2731. IN HMACHINE hMachine
  2732. );
  2733. CMAPI
  2734. CONFIGRET
  2735. WINAPI
  2736. CM_Request_Eject_PC(
  2737. VOID
  2738. );
  2739. CMAPI
  2740. CONFIGRET
  2741. WINAPI
  2742. CM_Request_Eject_PC_Ex(
  2743. IN HMACHINE hMachine
  2744. );
  2745. CMAPI
  2746. CONFIGRET
  2747. WINAPI
  2748. CM_Set_HW_Prof_FlagsA(
  2749. IN DEVINSTID_A szDevInstName,
  2750. IN ULONG ulConfig,
  2751. IN ULONG ulValue,
  2752. IN ULONG ulFlags
  2753. );
  2754. CMAPI
  2755. CONFIGRET
  2756. WINAPI
  2757. CM_Set_HW_Prof_FlagsW(
  2758. IN DEVINSTID_W szDevInstName,
  2759. IN ULONG ulConfig,
  2760. IN ULONG ulValue,
  2761. IN ULONG ulFlags
  2762. );
  2763. CMAPI
  2764. CONFIGRET
  2765. WINAPI
  2766. CM_Set_HW_Prof_Flags_ExA(
  2767. IN DEVINSTID_A szDevInstName,
  2768. IN ULONG ulConfig,
  2769. IN ULONG ulValue,
  2770. IN ULONG ulFlags,
  2771. IN HMACHINE hMachine
  2772. );
  2773. CMAPI
  2774. CONFIGRET
  2775. WINAPI
  2776. CM_Set_HW_Prof_Flags_ExW(
  2777. IN DEVINSTID_W szDevInstName,
  2778. IN ULONG ulConfig,
  2779. IN ULONG ulValue,
  2780. IN ULONG ulFlags,
  2781. IN HMACHINE hMachine
  2782. );
  2783. #ifdef UNICODE
  2784. #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
  2785. #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
  2786. #else
  2787. #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
  2788. #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
  2789. #endif // UNICODE
  2790. CMAPI
  2791. CONFIGRET
  2792. WINAPI
  2793. CM_Setup_DevNode(
  2794. IN DEVINST dnDevInst,
  2795. IN ULONG ulFlags
  2796. );
  2797. CMAPI
  2798. CONFIGRET
  2799. WINAPI
  2800. CM_Setup_DevNode_Ex(
  2801. IN DEVINST dnDevInst,
  2802. IN ULONG ulFlags,
  2803. IN HMACHINE hMachine
  2804. );
  2805. #define CM_Setup_DevInst CM_Setup_DevNode
  2806. #define CM_Setup_DevInst_Ex CM_Setup_DevNode_Ex
  2807. CMAPI
  2808. CONFIGRET
  2809. WINAPI
  2810. CM_Test_Range_Available(
  2811. IN DWORDLONG ullStartValue,
  2812. IN DWORDLONG ullEndValue,
  2813. IN RANGE_LIST rlh,
  2814. IN ULONG ulFlags
  2815. );
  2816. CMAPI
  2817. CONFIGRET
  2818. WINAPI
  2819. CM_Uninstall_DevNode(
  2820. IN DEVNODE dnPhantom,
  2821. IN ULONG ulFlags
  2822. );
  2823. CMAPI
  2824. CONFIGRET
  2825. WINAPI
  2826. CM_Uninstall_DevNode_Ex(
  2827. IN DEVNODE dnPhantom,
  2828. IN ULONG ulFlags,
  2829. IN HANDLE hMachine
  2830. );
  2831. #define CM_Uninstall_DevInst CM_Uninstall_DevNode
  2832. #define CM_Uninstall_DevInst_Ex CM_Uninstall_DevNode_Ex
  2833. CMAPI
  2834. CONFIGRET
  2835. WINAPI
  2836. CM_Run_Detection(
  2837. IN ULONG ulFlags
  2838. );
  2839. CMAPI
  2840. CONFIGRET
  2841. WINAPI
  2842. CM_Run_Detection_Ex(
  2843. IN ULONG ulFlags,
  2844. IN HMACHINE hMachine
  2845. );
  2846. CMAPI
  2847. CONFIGRET
  2848. WINAPI
  2849. CM_Set_HW_Prof(
  2850. IN ULONG ulHardwareProfile,
  2851. IN ULONG ulFlags
  2852. );
  2853. CMAPI
  2854. CONFIGRET
  2855. WINAPI
  2856. CM_Set_HW_Prof_Ex(
  2857. IN ULONG ulHardwareProfile,
  2858. IN ULONG ulFlags,
  2859. IN HMACHINE hMachine
  2860. );
  2861. CMAPI
  2862. CONFIGRET
  2863. WINAPI
  2864. CM_Query_Resource_Conflict_List(
  2865. OUT PCONFLICT_LIST pclConflictList,
  2866. IN DEVINST dnDevInst,
  2867. IN RESOURCEID ResourceID,
  2868. IN PCVOID ResourceData,
  2869. IN ULONG ResourceLen,
  2870. IN ULONG ulFlags,
  2871. IN HMACHINE hMachine
  2872. );
  2873. CMAPI
  2874. CONFIGRET
  2875. WINAPI
  2876. CM_Free_Resource_Conflict_Handle(
  2877. IN CONFLICT_LIST clConflictList
  2878. );
  2879. CMAPI
  2880. CONFIGRET
  2881. WINAPI
  2882. CM_Get_Resource_Conflict_Count(
  2883. IN CONFLICT_LIST clConflictList,
  2884. OUT PULONG pulCount
  2885. );
  2886. CMAPI
  2887. CONFIGRET
  2888. WINAPI
  2889. CM_Get_Resource_Conflict_DetailsA(
  2890. IN CONFLICT_LIST clConflictList,
  2891. IN ULONG ulIndex,
  2892. IN OUT PCONFLICT_DETAILS_A pConflictDetails
  2893. );
  2894. CMAPI
  2895. CONFIGRET
  2896. WINAPI
  2897. CM_Get_Resource_Conflict_DetailsW(
  2898. IN CONFLICT_LIST clConflictList,
  2899. IN ULONG ulIndex,
  2900. IN OUT PCONFLICT_DETAILS_W pConflictDetails
  2901. );
  2902. #ifdef UNICODE
  2903. #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
  2904. #else
  2905. #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
  2906. #endif // UNICODE
  2907. CMAPI
  2908. CONFIGRET
  2909. WINAPI
  2910. CM_Get_Class_Registry_PropertyW(
  2911. IN LPGUID ClassGUID,
  2912. IN ULONG ulProperty,
  2913. OUT PULONG pulRegDataType, OPTIONAL
  2914. OUT PVOID Buffer, OPTIONAL
  2915. IN OUT PULONG pulLength,
  2916. IN ULONG ulFlags,
  2917. IN HMACHINE hMachine
  2918. );
  2919. CMAPI
  2920. CONFIGRET
  2921. WINAPI
  2922. CM_Set_Class_Registry_PropertyW(
  2923. IN LPGUID ClassGUID,
  2924. IN ULONG ulProperty,
  2925. IN PCVOID Buffer, OPTIONAL
  2926. IN ULONG ulLength,
  2927. IN ULONG ulFlags,
  2928. IN HMACHINE hMachine
  2929. );
  2930. CMAPI
  2931. CONFIGRET
  2932. WINAPI
  2933. CM_Get_Class_Registry_PropertyA(
  2934. IN LPGUID ClassGUID,
  2935. IN ULONG ulProperty,
  2936. OUT PULONG pulRegDataType, OPTIONAL
  2937. OUT PVOID Buffer, OPTIONAL
  2938. IN OUT PULONG pulLength,
  2939. IN ULONG ulFlags,
  2940. IN HMACHINE hMachine
  2941. );
  2942. CMAPI
  2943. CONFIGRET
  2944. WINAPI
  2945. CM_Set_Class_Registry_PropertyA(
  2946. IN LPGUID ClassGUID,
  2947. IN ULONG ulProperty,
  2948. IN PCVOID Buffer, OPTIONAL
  2949. IN ULONG ulLength,
  2950. IN ULONG ulFlags,
  2951. IN HMACHINE hMachine
  2952. );
  2953. #ifdef UNICODE
  2954. #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyW
  2955. #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyW
  2956. #else
  2957. #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyA
  2958. #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyA
  2959. #endif // UNICODE
  2960. #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
  2961. DWORD
  2962. WINAPI
  2963. CM_WaitNoPendingInstallEvents(
  2964. IN DWORD dwTimeout
  2965. );
  2966. //--------------------------------------------------------------
  2967. // Configuration Manager return status codes
  2968. //--------------------------------------------------------------
  2969. #define CR_SUCCESS (0x00000000)
  2970. #define CR_DEFAULT (0x00000001)
  2971. #define CR_OUT_OF_MEMORY (0x00000002)
  2972. #define CR_INVALID_POINTER (0x00000003)
  2973. #define CR_INVALID_FLAG (0x00000004)
  2974. #define CR_INVALID_DEVNODE (0x00000005)
  2975. #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
  2976. #define CR_INVALID_RES_DES (0x00000006)
  2977. #define CR_INVALID_LOG_CONF (0x00000007)
  2978. #define CR_INVALID_ARBITRATOR (0x00000008)
  2979. #define CR_INVALID_NODELIST (0x00000009)
  2980. #define CR_DEVNODE_HAS_REQS (0x0000000A)
  2981. #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
  2982. #define CR_INVALID_RESOURCEID (0x0000000B)
  2983. #define CR_DLVXD_NOT_FOUND (0x0000000C) // WIN 95 ONLY
  2984. #define CR_NO_SUCH_DEVNODE (0x0000000D)
  2985. #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
  2986. #define CR_NO_MORE_LOG_CONF (0x0000000E)
  2987. #define CR_NO_MORE_RES_DES (0x0000000F)
  2988. #define CR_ALREADY_SUCH_DEVNODE (0x00000010)
  2989. #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
  2990. #define CR_INVALID_RANGE_LIST (0x00000011)
  2991. #define CR_INVALID_RANGE (0x00000012)
  2992. #define CR_FAILURE (0x00000013)
  2993. #define CR_NO_SUCH_LOGICAL_DEV (0x00000014)
  2994. #define CR_CREATE_BLOCKED (0x00000015)
  2995. #define CR_NOT_SYSTEM_VM (0x00000016) // WIN 95 ONLY
  2996. #define CR_REMOVE_VETOED (0x00000017)
  2997. #define CR_APM_VETOED (0x00000018)
  2998. #define CR_INVALID_LOAD_TYPE (0x00000019)
  2999. #define CR_BUFFER_SMALL (0x0000001A)
  3000. #define CR_NO_ARBITRATOR (0x0000001B)
  3001. #define CR_NO_REGISTRY_HANDLE (0x0000001C)
  3002. #define CR_REGISTRY_ERROR (0x0000001D)
  3003. #define CR_INVALID_DEVICE_ID (0x0000001E)
  3004. #define CR_INVALID_DATA (0x0000001F)
  3005. #define CR_INVALID_API (0x00000020)
  3006. #define CR_DEVLOADER_NOT_READY (0x00000021)
  3007. #define CR_NEED_RESTART (0x00000022)
  3008. #define CR_NO_MORE_HW_PROFILES (0x00000023)
  3009. #define CR_DEVICE_NOT_THERE (0x00000024)
  3010. #define CR_NO_SUCH_VALUE (0x00000025)
  3011. #define CR_WRONG_TYPE (0x00000026)
  3012. #define CR_INVALID_PRIORITY (0x00000027)
  3013. #define CR_NOT_DISABLEABLE (0x00000028)
  3014. #define CR_FREE_RESOURCES (0x00000029)
  3015. #define CR_QUERY_VETOED (0x0000002A)
  3016. #define CR_CANT_SHARE_IRQ (0x0000002B)
  3017. #define CR_NO_DEPENDENT (0x0000002C)
  3018. #define CR_SAME_RESOURCES (0x0000002D)
  3019. #define CR_NO_SUCH_REGISTRY_KEY (0x0000002E)
  3020. #define CR_INVALID_MACHINENAME (0x0000002F) // NT ONLY
  3021. #define CR_REMOTE_COMM_FAILURE (0x00000030) // NT ONLY
  3022. #define CR_MACHINE_UNAVAILABLE (0x00000031) // NT ONLY
  3023. #define CR_NO_CM_SERVICES (0x00000032) // NT ONLY
  3024. #define CR_ACCESS_DENIED (0x00000033) // NT ONLY
  3025. #define CR_CALL_NOT_IMPLEMENTED (0x00000034)
  3026. #define CR_INVALID_PROPERTY (0x00000035)
  3027. #define CR_DEVICE_INTERFACE_ACTIVE (0x00000036)
  3028. #define CR_NO_SUCH_DEVICE_INTERFACE (0x00000037)
  3029. #define CR_INVALID_REFERENCE_STRING (0x00000038)
  3030. #define CR_INVALID_CONFLICT_LIST (0x00000039)
  3031. #define CR_INVALID_INDEX (0x0000003A)
  3032. #define CR_INVALID_STRUCTURE_SIZE (0x0000003B)
  3033. #define NUM_CR_RESULTS (0x0000003C)
  3034. #ifdef __cplusplus
  3035. }
  3036. #endif
  3037. #endif // _CFGMGR32_