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