4 * PnP configuration manager
6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
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.
37 #if defined(_CFGMGR32_)
40 #define CMAPI DECLSPEC_IMPORT
43 typedef CONST VOID
*PCVOID
;
45 #define MAX_CONFIG_VALUE 9999
46 #define MAX_INSTANCE_VALUE 9999
48 #define MAX_DEVICE_ID_LEN 200
49 #define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
51 #define MAX_CLASS_NAME_LEN 32
52 #define MAX_GUID_STRING_LEN 39
53 #define MAX_PROFILE_LEN 80
55 #define MAX_MEM_REGISTERS 9
56 #define MAX_IO_PORTS 20
58 #define MAX_DMA_CHANNELS 7
60 #define DWORD_MAX 0xffffffffUL
61 #define DWORDLONG_MAX 0xffffffffffffffffui64
63 #define CONFIGMG_VERSION 0x0400
67 typedef unsigned __int64 DWORDLONG
;
68 typedef DWORDLONG
*PDWORDLONG
;
70 #endif /* NT_INCLUDED */
72 typedef DWORD RETURN_TYPE
;
73 typedef RETURN_TYPE CONFIGRET
;
75 typedef DWORD DEVNODE
, DEVINST
;
76 typedef DEVNODE
*PDEVNODE
, *PDEVINST
;
78 typedef CHAR
*DEVNODEID_A
, *DEVINSTID_A
;
79 typedef WCHAR
*DEVNODEID_W
, *DEVINSTID_W
;
82 typedef DEVNODEID_W DEVNODEID
;
83 typedef DEVINSTID_W DEVINSTID
;
85 typedef DEVNODEID_A DEVNODEID
;
86 typedef DEVINSTID_A DEVINSTID
;
89 typedef DWORD_PTR LOG_CONF
;
90 typedef LOG_CONF
*PLOG_CONF
;
92 typedef DWORD_PTR RES_DES
;
93 typedef RES_DES
*PRES_DES
;
95 typedef ULONG RESOURCEID
;
96 typedef RESOURCEID
*PRESOURCEID
;
98 typedef ULONG PRIORITY
;
99 typedef PRIORITY
*PPRIORITY
;
101 typedef DWORD_PTR RANGE_LIST
;
102 typedef RANGE_LIST
*PRANGE_LIST
;
104 typedef DWORD_PTR RANGE_ELEMENT
;
105 typedef RANGE_ELEMENT
*PRANGE_ELEMENT
;
107 typedef HANDLE HMACHINE
;
108 typedef HMACHINE
*PHMACHINE
;
110 typedef ULONG_PTR CONFLICT_LIST
;
111 typedef CONFLICT_LIST
*PCONFLICT_LIST
;
113 typedef struct _CONFLICT_DETAILS_A
{
116 DEVINST CD_dnDevInst
;
119 CHAR CD_szDescription
[MAX_PATH
];
120 } CONFLICT_DETAILS_A
, *PCONFLICT_DETAILS_A
;
122 typedef struct _CONFLICT_DETAILS_W
{
125 DEVINST CD_dnDevInst
;
128 WCHAR CD_szDescription
[MAX_PATH
];
129 } CONFLICT_DETAILS_W
, *PCONFLICT_DETAILS_W
;
132 typedef CONFLICT_DETAILS_W CONFLICT_DETAILS
;
133 typedef PCONFLICT_DETAILS_W PCONFLICT_DETAILS
;
135 typedef CONFLICT_DETAILS_A CONFLICT_DETAILS
;
136 typedef PCONFLICT_DETAILS_A PCONFLICT_DETAILS
;
139 /* CONFLICT_DETAILS.CD.ulMask constants */
140 #define CM_CDMASK_DEVINST 0x00000001
141 #define CM_CDMASK_RESDES 0x00000002
142 #define CM_CDMASK_FLAGS 0x00000004
143 #define CM_CDMASK_DESCRIPTION 0x00000008
144 #define CM_CDMASK_VALID 0x0000000F
146 /* CONFLICT_DETAILS.CD.ulFlags constants */
147 #define CM_CDFLAGS_DRIVER 0x00000001
148 #define CM_CDFLAGS_ROOT_OWNED 0x00000002
149 #define CM_CDFLAGS_RESERVED 0x00000004
151 typedef ULONG REGDISPOSITION
;
153 #include <pshpack1.h>
155 /* MEM_DES.MD_Flags constants */
156 #define mMD_MemoryType 0x1
157 #define fMD_MemoryType mMD_MemoryType
161 #define mMD_32_24 0x2
162 #define fMD_32_24 mMD_32_24
166 #define mMD_Prefetchable 0x4
167 #define fMD_Prefetchable mMD_Prefetchable
168 #define fMD_Pref mMD_Prefetchable
169 #define fMD_PrefetchDisallowed 0x0
170 #define fMD_PrefetchAllowed 0x4
172 #define mMD_Readable 0x8
173 #define fMD_Readable mMD_Readable
174 #define fMD_ReadAllowed 0x0
175 #define fMD_ReadDisallowed 0x8
177 #define mMD_CombinedWrite 0x10
178 #define fMD_CombinedWrite mMD_CombinedWrite
179 #define fMD_CombinedWriteDisallowed 0x0
180 #define fMD_CombinedWriteAllowed 0x10
182 #define mMD_Cacheable 0x20
183 #define fMD_NonCacheable 0x0
184 #define fMD_Cacheable 0x20
185 #define fMD_WINDOW_DECODE 0x40
186 #define fMD_MEMORY_BAR 0x80
188 typedef struct Mem_Range_s
{
195 } MEM_RANGE
, *PMEM_RANGE
;
197 typedef struct Mem_Des_s
{
200 DWORDLONG MD_Alloc_Base
;
201 DWORDLONG MD_Alloc_End
;
204 } MEM_DES
, *PMEM_DES
;
206 typedef struct Mem_Resource_s
{
208 MEM_RANGE MEM_Data
[ANYSIZE_ARRAY
];
209 } MEM_RESOURCE
, *PMEM_RESOURCE
;
211 #define MType_Range sizeof(MEM_RANGE)
213 typedef struct Mem_Large_Range_s
{
215 ULONGLONG MLR_nBytes
;
220 } MEM_LARGE_RANGE
, *PMEM_LARGE_RANGE
;
222 typedef struct Mem_Large_Des_s
{
225 DWORDLONG MLD_Alloc_Base
;
226 DWORDLONG MLD_Alloc_End
;
229 } MEM_LARGE_DES
, *PMEM_LARGE_DES
;
231 typedef struct Mem_Large_Resource_s
{
232 MEM_LARGE_DES MEM_LARGE_Header
;
233 MEM_LARGE_RANGE MEM_LARGE_Data
[ANYSIZE_ARRAY
];
234 } MEM_LARGE_RESOURCE
, *PMEM_LARGE_RESOURCE
;
236 #define MLType_Range sizeof(struct Mem_Large_Range_s)
238 /* IO_DES.Type constants and masks */
239 #define fIOD_PortType 0x1
240 #define fIOD_Memory 0x0
242 #define fIOD_DECODE 0x00fc
243 #define fIOD_10_BIT_DECODE 0x0004
244 #define fIOD_12_BIT_DECODE 0x0008
245 #define fIOD_16_BIT_DECODE 0x0010
246 #define fIOD_POSITIVE_DECODE 0x0020
247 #define fIOD_PASSIVE_DECODE 0x0040
248 #define fIOD_WINDOW_DECODE 0x0080
249 #define fIOD_PORT_BAR 0x0100
251 /* IO_RANGE.IOR_Alias constants */
252 #define IO_ALIAS_10_BIT_DECODE 0x00000004
253 #define IO_ALIAS_12_BIT_DECODE 0x00000010
254 #define IO_ALIAS_16_BIT_DECODE 0x00000000
255 #define IO_ALIAS_POSITIVE_DECODE 0x000000FF
257 typedef struct IO_Range_s
{
262 DWORD IOR_RangeFlags
;
264 } IO_RANGE
, *PIO_RANGE
;
266 typedef struct IO_Des_s
{
269 DWORDLONG IOD_Alloc_Base
;
270 DWORDLONG IOD_Alloc_End
;
274 typedef struct IO_Resource_s
{
276 IO_RANGE IO_Data
[ANYSIZE_ARRAY
];
277 } IO_RESOURCE
, *PIO_RESOURCE
;
279 #define IOA_Local 0xff
281 #define IOType_Range sizeof(IO_RANGE)
283 /* DMA_DES.DD_Flags constants and masks */
284 #define mDD_Width 0x3
287 #define fDD_DWORD 0x2
288 #define fDD_BYTE_AND_WORD 0x3
290 #define mDD_BusMaster 0x4
291 #define fDD_NoBusMaster 0x0
292 #define fDD_BusMaster 0x4
294 #define mDD_Type 0x18
295 #define fDD_TypeStandard 0x00
296 #define fDD_TypeA 0x08
297 #define fDD_TypeB 0x10
298 #define fDD_TypeF 0x18
300 typedef struct DMA_Des_s
{
305 } DMA_DES
, *PDMA_DES
;
307 typedef struct DMA_Range_s
{
311 } DMA_RANGE
, *PDMA_RANGE
;
313 #define DType_Range sizeof(DMA_RANGE)
315 typedef struct DMA_Resource_s
{
317 DMA_RANGE DMA_Data
[ANYSIZE_ARRAY
];
318 } DMA_RESOURCE
, *PDMA_RESOURCE
;
320 /* IRQ_DES.IRQD_flags constants */
321 #define mIRQD_Share 0x1
322 #define fIRQD_Exclusive 0x0
323 #define fIRQD_Share 0x1
325 #define fIRQD_Share_Bit 0
326 #define fIRQD_Level_Bit 1
328 #define mIRQD_Edge_Level 0x2
329 #define fIRQD_Level 0x0
330 #define fIRQD_Edge 0x2
332 typedef struct IRQ_Range_s
{
335 #if defined(NT_PROCESSOR_GROUPS)
341 } IRQ_RANGE
, *PIRQ_RANGE
;
343 typedef struct IRQ_Des_32_s
{
346 #if defined(NT_PROCESSOR_GROUPS)
352 ULONG IRQD_Alloc_Num
;
353 ULONG32 IRQD_Affinity
;
354 } IRQ_DES_32
, *PIRQ_DES_32
;
356 typedef struct IRQ_Des_64_s
{
359 #if defined(NT_PROCESSOR_GROUPS)
365 ULONG IRQD_Alloc_Num
;
366 ULONG64 IRQD_Affinity
;
367 } IRQ_DES_64
, *PIRQ_DES_64
;
370 typedef IRQ_DES_64 IRQ_DES
;
371 typedef PIRQ_DES_64 PIRQ_DES
;
373 typedef IRQ_DES_32 IRQ_DES
;
374 typedef PIRQ_DES_32 PIRQ_DES
;
377 typedef struct IRQ_Resource_32_s
{
378 IRQ_DES_32 IRQ_Header
;
379 IRQ_RANGE IRQ_Data
[ANYSIZE_ARRAY
];
380 } IRQ_RESOURCE_32
, *PIRQ_RESOURCE_32
;
382 typedef struct IRQ_Resource_64_s
{
383 IRQ_DES_64 IRQ_Header
;
384 IRQ_RANGE IRQ_Data
[ANYSIZE_ARRAY
];
385 } IRQ_RESOURCE_64
, *PIRQ_RESOURCE_64
;
388 typedef IRQ_RESOURCE_64 IRQ_RESOURCE
;
389 typedef PIRQ_RESOURCE_64 PIRQ_RESOURCE
;
391 typedef IRQ_RESOURCE_32 IRQ_RESOURCE
;
392 typedef PIRQ_RESOURCE_32 PIRQ_RESOURCE
;
395 #define IRQType_Range sizeof(IRQ_RANGE)
397 #if (WINVER >= _WIN32_WINNT_WINXP)
398 #define CM_RESDES_WIDTH_DEFAULT 0x00000000
399 #define CM_RESDES_WIDTH_32 0x00000001
400 #define CM_RESDES_WIDTH_64 0x00000002
401 #define CM_RESDES_WIDTH_BITS 0x00000003
404 typedef struct DevPrivate_Range_s
{
408 } DEVPRIVATE_RANGE
, *PDEVPRIVATE_RANGE
;
410 typedef struct DevPrivate_Des_s
{
417 } DEVPRIVATE_DES
, *PDEVPRIVATE_DES
;
419 #define PType_Range sizeof(DEVPRIVATE_RANGE)
421 typedef struct DevPrivate_Resource_s
{
422 DEVPRIVATE_DES PRV_Header
;
423 DEVPRIVATE_RANGE PRV_Data
[ANYSIZE_ARRAY
];
424 } DEVPRIVATE_RESOURCE
, *PDEVPRIVATE_RESOURCE
;
426 typedef struct CS_Des_s
{
427 DWORD CSD_SignatureLength
;
428 DWORD CSD_LegacyDataOffset
;
429 DWORD CSD_LegacyDataSize
;
432 BYTE CSD_Signature
[ANYSIZE_ARRAY
];
435 typedef struct CS_Resource_s
{
437 } CS_RESOURCE
, *PCS_RESOURCE
;
439 #define mPCD_IO_8_16 0x1
440 #define fPCD_IO_8 0x0
441 #define fPCD_IO_16 0x1
442 #define mPCD_MEM_8_16 0x2
443 #define fPCD_MEM_8 0x0
444 #define fPCD_MEM_16 0x2
445 #define mPCD_MEM_A_C 0xC
446 #define fPCD_MEM1_A 0x4
447 #define fPCD_MEM2_A 0x8
448 #define fPCD_IO_ZW_8 0x10
449 #define fPCD_IO_SRC_16 0x20
450 #define fPCD_IO_WS_16 0x40
451 #define mPCD_MEM_WS 0x300
452 #define fPCD_MEM_WS_ONE 0x100
453 #define fPCD_MEM_WS_TWO 0x200
454 #define fPCD_MEM_WS_THREE 0x300
456 #if (WINVER >= _WIN32_WINNT_WINXP)
458 #define fPCD_MEM_A 0x4
460 #define fPCD_ATTRIBUTES_PER_WINDOW 0x8000
462 #define fPCD_IO1_16 0x00010000
463 #define fPCD_IO1_ZW_8 0x00020000
464 #define fPCD_IO1_SRC_16 0x00040000
465 #define fPCD_IO1_WS_16 0x00080000
467 #define fPCD_IO2_16 0x00100000
468 #define fPCD_IO2_ZW_8 0x00200000
469 #define fPCD_IO2_SRC_16 0x00400000
470 #define fPCD_IO2_WS_16 0x00800000
472 #define mPCD_MEM1_WS 0x03000000
473 #define fPCD_MEM1_WS_ONE 0x01000000
474 #define fPCD_MEM1_WS_TWO 0x02000000
475 #define fPCD_MEM1_WS_THREE 0x03000000
476 #define fPCD_MEM1_16 0x04000000
478 #define mPCD_MEM2_WS 0x30000000
479 #define fPCD_MEM2_WS_ONE 0x10000000
480 #define fPCD_MEM2_WS_TWO 0x20000000
481 #define fPCD_MEM2_WS_THREE 0x30000000
482 #define fPCD_MEM2_16 0x40000000
484 #define PCD_MAX_MEMORY 2
487 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
489 typedef struct PcCard_Des_s
{
493 BYTE PCD_ConfigIndex
;
494 BYTE PCD_Reserved
[3];
495 DWORD PCD_MemoryCardBase1
;
496 DWORD PCD_MemoryCardBase2
;
497 #if (WINVER >= _WIN32_WINNT_WINXP)
498 DWORD PCD_MemoryCardBase
[PCD_MAX_MEMORY
];
499 WORD PCD_MemoryFlags
[PCD_MAX_MEMORY
];
500 BYTE PCD_IoFlags
[PCD_MAX_IO
];
502 } PCCARD_DES
, *PPCCARD_DES
;
504 typedef struct PcCard_Resource_s
{
505 PCCARD_DES PcCard_Header
;
506 } PCCARD_RESOURCE
, *PPCCARD_RESOURCE
;
508 /* MFCARD_DES.PMF_Flags constants */
509 #define fPMF_AUDIO_ENABLE 0x8
510 #define mPMF_AUDIO_ENABLE fPMF_AUDIO_ENABLE
512 typedef struct MfCard_Des_s
{
516 BYTE PMF_ConfigOptions
;
517 BYTE PMF_IoResourceIndex
;
518 BYTE PMF_Reserved
[2];
519 DWORD PMF_ConfigRegisterBase
;
520 } MFCARD_DES
, *PMFCARD_DES
;
522 typedef struct MfCard_Resource_s
{
523 MFCARD_DES MfCard_Header
;
524 } MFCARD_RESOURCE
, *PMFCARD_RESOURCE
;
526 typedef struct BusNumber_Des_s
{
530 ULONG BUSD_Alloc_Base
;
531 ULONG BUSD_Alloc_End
;
532 } BUSNUMBER_DES
, *PBUSNUMBER_DES
;
534 typedef struct BusNumber_Range_s
{
537 ULONG BUSR_nBusNumbers
;
539 } BUSNUMBER_RANGE
, *PBUSNUMBER_RANGE
;
541 #define BusNumberType_Range sizeof(BUSNUMBER_RANGE)
543 typedef struct BusNumber_Resource_s
{
544 BUSNUMBER_DES BusNumber_Header
;
545 BUSNUMBER_RANGE BusNumber_Data
[ANYSIZE_ARRAY
];
546 } BUSNUMBER_RESOURCE
, *PBUSNUMBER_RESOURCE
;
548 #define CM_HWPI_NOT_DOCKABLE 0x00000000
549 #define CM_HWPI_UNDOCKED 0x00000001
550 #define CM_HWPI_DOCKED 0x00000002
552 typedef struct HWProfileInfo_sA
{
553 ULONG HWPI_ulHWProfile
;
554 CHAR HWPI_szFriendlyName
[MAX_PROFILE_LEN
];
556 } HWPROFILEINFO_A
, *PHWPROFILEINFO_A
;
558 typedef struct HWProfileInfo_sW
{
559 ULONG HWPI_ulHWProfile
;
560 WCHAR HWPI_szFriendlyName
[MAX_PROFILE_LEN
];
562 } HWPROFILEINFO_W
, *PHWPROFILEINFO_W
;
565 typedef HWPROFILEINFO_W HWPROFILEINFO
;
566 typedef PHWPROFILEINFO_W PHWPROFILEINFO
;
568 typedef HWPROFILEINFO_A HWPROFILEINFO
;
569 typedef PHWPROFILEINFO_A PHWPROFILEINFO
;
574 #define ResType_All 0x00000000
575 #define ResType_None 0x00000000
576 #define ResType_Mem 0x00000001
577 #define ResType_IO 0x00000002
578 #define ResType_DMA 0x00000003
579 #define ResType_IRQ 0x00000004
580 #define ResType_DoNotUse 0x00000005
581 #define ResType_BusNumber 0x00000006
582 #define ResType_MemLarge 0x00000007
583 #define ResType_MAX 0x00000007
584 #define ResType_Ignored_Bit 0x00008000
585 #define ResType_ClassSpecific 0x0000FFFF
586 #define ResType_Reserved 0x00008000
587 #define ResType_DevicePrivate 0x00008001
588 #define ResType_PcCardConfig 0x00008002
589 #define ResType_MfCardConfig 0x00008003
591 #define CM_ADD_RANGE_ADDIFCONFLICT 0x00000000
592 #define CM_ADD_RANGE_DONOTADDIFCONFLICT 0x00000001
593 #define CM_ADD_RANGE_BITS 0x00000001
595 #define BASIC_LOG_CONF 0x00000000
596 #define FILTERED_LOG_CONF 0x00000001
597 #define ALLOC_LOG_CONF 0x00000002
598 #define BOOT_LOG_CONF 0x00000003
599 #define FORCED_LOG_CONF 0x00000004
600 #define OVERRIDE_LOG_CONF 0x00000005
601 #define NUM_LOG_CONF 0x00000006
602 #define LOG_CONF_BITS 0x00000007
604 #define PRIORITY_EQUAL_FIRST 0x00000008
605 #define PRIORITY_EQUAL_LAST 0x00000000
606 #define PRIORITY_BIT 0x00000008
608 #define RegDisposition_OpenAlways 0x00000000
609 #define RegDisposition_OpenExisting 0x00000001
610 #define RegDisposition_Bits 0x00000001
612 /* CM_Add_ID.ulFlags constants */
613 #define CM_ADD_ID_HARDWARE 0x00000000
614 #define CM_ADD_ID_COMPATIBLE 0x00000001
615 #define CM_ADD_ID_BITS 0x00000001
617 /* Flags for CM_Create_DevNode[_Ex].ulFlags constants */
618 #define CM_CREATE_DEVNODE_NORMAL 0x00000000
619 #define CM_CREATE_DEVNODE_NO_WAIT_INSTALL 0x00000001
620 #define CM_CREATE_DEVNODE_PHANTOM 0x00000002
621 #define CM_CREATE_DEVNODE_GENERATE_ID 0x00000004
622 #define CM_CREATE_DEVNODE_DO_NOT_INSTALL 0x00000008
623 #define CM_CREATE_DEVNODE_BITS 0x0000000F
625 #define CM_CREATE_DEVINST_NORMAL CM_CREATE_DEVNODE_NORMAL
626 #define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
627 #define CM_CREATE_DEVINST_PHANTOM CM_CREATE_DEVNODE_PHANTOM
628 #define CM_CREATE_DEVINST_GENERATE_ID CM_CREATE_DEVNODE_GENERATE_ID
629 #define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
630 #define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
632 /* Flags for CM_Delete_Class_Key.ulFlags constants */
633 #define CM_DELETE_CLASS_ONLY 0x00000000
634 #define CM_DELETE_CLASS_SUBKEYS 0x00000001
635 #if (WINVER >= _WIN32_WINNT_VISTA)
636 #define CM_DELETE_CLASS_INTERFACE 0x00000002
638 #define CM_DELETE_CLASS_BITS 0x00000003
640 /* CM_Run_Detection[_Ex].ulFlags constants */
641 #define CM_DETECT_NEW_PROFILE 0x00000001
642 #define CM_DETECT_CRASHED 0x00000002
643 #define CM_DETECT_HWPROF_FIRST_BOOT 0x00000004
644 #define CM_DETECT_RUN 0x80000000
645 #define CM_DETECT_BITS 0x80000007
647 #define CM_DISABLE_POLITE 0x00000000
648 #define CM_DISABLE_ABSOLUTE 0x00000001
649 #define CM_DISABLE_HARDWARE 0x00000002
650 #define CM_DISABLE_UI_NOT_OK 0x00000004
651 #define CM_DISABLE_BITS 0x00000007
653 #define CM_GETIDLIST_FILTER_NONE 0x00000000
654 #define CM_GETIDLIST_FILTER_ENUMERATOR 0x00000001
655 #define CM_GETIDLIST_FILTER_SERVICE 0x00000002
656 #define CM_GETIDLIST_FILTER_EJECTRELATIONS 0x00000004
657 #define CM_GETIDLIST_FILTER_REMOVALRELATIONS 0x00000008
658 #define CM_GETIDLIST_FILTER_POWERRELATIONS 0x00000010
659 #define CM_GETIDLIST_FILTER_BUSRELATIONS 0x00000020
660 #define CM_GETIDLIST_DONOTGENERATE 0x10000040
661 #if (WINVER <= _WIN32_WINNT_VISTA)
662 #define CM_GETIDLIST_FILTER_BITS 0x1000007F
664 #if (WINVER >= _WIN32_WINNT_WIN7)
665 #define CM_GETIDLIST_FILTER_TRANSPORTRELATIONS 0x00000080
666 #define CM_GETIDLIST_FILTER_PRESENT 0x00000100
667 #define CM_GETIDLIST_FILTER_CLASS 0x00000200
668 #define CM_GETIDLIST_FILTER_BITS 0x100003FF
671 #define CM_GET_DEVICE_INTERFACE_LIST_PRESENT 0x00000000
672 #define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES 0x00000001
673 #define CM_GET_DEVICE_INTERFACE_LIST_BITS 0x00000001
675 #define CM_DRP_DEVICEDESC 0x00000001
676 #define CM_DRP_HARDWAREID 0x00000002
677 #define CM_DRP_COMPATIBLEIDS 0x00000003
678 #define CM_DRP_UNUSED0 0x00000004
679 #define CM_DRP_SERVICE 0x00000005
680 #define CM_DRP_UNUSED1 0x00000006
681 #define CM_DRP_UNUSED2 0x00000007
682 #define CM_DRP_CLASS 0x00000008
683 #define CM_DRP_CLASSGUID 0x00000009
684 #define CM_DRP_DRIVER 0x0000000A
685 #define CM_DRP_CONFIGFLAGS 0x0000000B
686 #define CM_DRP_MFG 0x0000000C
687 #define CM_DRP_FRIENDLYNAME 0x0000000D
688 #define CM_DRP_LOCATION_INFORMATION 0x0000000E
689 #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F
690 #define CM_DRP_CAPABILITIES 0x00000010
691 #define CM_DRP_UI_NUMBER 0x00000011
692 #define CM_DRP_UPPERFILTERS 0x00000012
693 #if (WINVER >= _WIN32_WINNT_VISTA)
694 #define CM_CRP_UPPERFILTERS CM_DRP_UPPERFILTERS
696 #define CM_DRP_LOWERFILTERS 0x00000013
697 #if (WINVER >= _WIN32_WINNT_VISTA)
698 #define CM_CRP_LOWERFILTERS CM_DRP_LOWERFILTERS
700 #define CM_DRP_BUSTYPEGUID 0x00000014
701 #define CM_DRP_LEGACYBUSTYPE 0x00000015
702 #define CM_DRP_BUSNUMBER 0x00000016
703 #define CM_DRP_ENUMERATOR_NAME 0x00000017
704 #define CM_DRP_SECURITY 0x00000018
705 #define CM_CRP_SECURITY CM_DRP_SECURITY
706 #define CM_DRP_SECURITY_SDS 0x00000019
707 #define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS
708 #define CM_DRP_DEVTYPE 0x0000001A
709 #define CM_CRP_DEVTYPE CM_DRP_DEVTYPE
710 #define CM_DRP_EXCLUSIVE 0x0000001B
711 #define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE
712 #define CM_DRP_CHARACTERISTICS 0x0000001C
713 #define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS
714 #define CM_DRP_ADDRESS 0x0000001D
715 #define CM_DRP_UI_NUMBER_DESC_FORMAT 0x0000001E
716 #if (WINVER >= _WIN32_WINNT_WINXP)
717 #define CM_DRP_DEVICE_POWER_DATA 0x0000001F
718 #define CM_DRP_REMOVAL_POLICY 0x00000020
719 #define CM_DRP_REMOVAL_POLICY_HW_DEFAULT 0x00000021
720 #define CM_DRP_REMOVAL_POLICY_OVERRIDE 0x00000022
721 #define CM_DRP_INSTALL_STATE 0x00000023
723 #if (WINVER >= _WIN32_WINNT_WS03)
724 #define CM_DRP_LOCATION_PATHS 0x00000024
726 #if (WINVER >= _WIN32_WINNT_WIN7)
727 #define CM_DRP_BASE_CONTAINERID 0x00000025
729 #define CM_DRP_MIN 0x00000001
730 #define CM_CRP_MIN CM_DRP_MIN
731 #define CM_DRP_MAX 0x00000025
732 #define CM_CRP_MAX CM_DRP_MAX
734 #define CM_DEVCAP_LOCKSUPPORTED 0x00000001
735 #define CM_DEVCAP_EJECTSUPPORTED 0x00000002
736 #define CM_DEVCAP_REMOVABLE 0x00000004
737 #define CM_DEVCAP_DOCKDEVICE 0x00000008
738 #define CM_DEVCAP_UNIQUEID 0x00000010
739 #define CM_DEVCAP_SILENTINSTALL 0x00000020
740 #define CM_DEVCAP_RAWDEVICEOK 0x00000040
741 #define CM_DEVCAP_SURPRISEREMOVALOK 0x00000080
742 #define CM_DEVCAP_HARDWAREDISABLED 0x00000100
743 #define CM_DEVCAP_NONDYNAMIC 0x00000200
745 #if (WINVER >= _WIN32_WINNT_WINXP)
747 #define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
748 #define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
749 #define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
751 #define CM_INSTALL_STATE_INSTALLED 0
752 #define CM_INSTALL_STATE_NEEDS_REINSTALL 1
753 #define CM_INSTALL_STATE_FAILED_INSTALL 2
754 #define CM_INSTALL_STATE_FINISH_INSTALL 3
756 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
758 /* CM_Locate_DevNode.ulFlags constants */
759 #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
760 #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
761 #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
762 #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
763 #define CM_LOCATE_DEVNODE_BITS 0x00000007
765 #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
766 #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
767 #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
768 #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
769 #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
771 #define CM_OPEN_CLASS_KEY_INSTALLER 0x00000000
772 #define CM_OPEN_CLASS_KEY_INTERFACE 0x00000001
773 #define CM_OPEN_CLASS_KEY_BITS 0x00000001
775 /* CM_Query_And_Remove_SubTree.ulFlags constants */
776 #define CM_REMOVE_UI_OK 0x00000000
777 #define CM_REMOVE_UI_NOT_OK 0x00000001
778 #define CM_REMOVE_NO_RESTART 0x00000002
779 #define CM_REMOVE_BITS 0x00000003
781 #define CM_QUERY_REMOVE_UI_OK (CM_REMOVE_UI_OK)
782 #define CM_QUERY_REMOVE_UI_NOT_OK (CM_REMOVE_UI_NOT_OK)
783 #define CM_QUERY_REMOVE_BITS (CM_QUERY_REMOVE_UI_OK|CM_QUERY_REMOVE_UI_NOT_OK)
785 /* CM_Reenumerate_DevNode.ulFlags constants */
786 #define CM_REENUMERATE_NORMAL 0x00000000
787 #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
788 #if (WINVER >= _WIN32_WINNT_WINXP)
789 #define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
790 #define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
792 #define CM_REENUMERATE_BITS 0x00000007
794 #define CM_REGISTER_DEVICE_DRIVER_STATIC 0x00000000
795 #define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE 0x00000001
796 #define CM_REGISTER_DEVICE_DRIVER_REMOVABLE 0x00000002
797 #define CM_REGISTER_DEVICE_DRIVER_BITS 0x00000003
799 #define CM_REGISTRY_HARDWARE 0x00000000
800 #define CM_REGISTRY_SOFTWARE 0x00000001
801 #define CM_REGISTRY_USER 0x00000100
802 #define CM_REGISTRY_CONFIG 0x00000200
803 #define CM_REGISTRY_BITS 0x00000301
805 #define CM_SET_DEVNODE_PROBLEM_NORMAL 0x00000000
806 #define CM_SET_DEVNODE_PROBLEM_OVERRIDE 0x00000001
807 #define CM_SET_DEVNODE_PROBLEM_BITS 0x00000001
809 #define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
810 #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
811 #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
813 /* CM_Set_HW_Prof_Flags[_Ex].ulFlags constants */
814 #define CM_SET_HW_PROF_FLAGS_UI_NOT_OK 0x00000001
815 #define CM_SET_HW_PROF_FLAGS_BITS 0x00000001
817 /* CM_Setup_DevInst[_Ex].ulFlags constants */
818 #define CM_SETUP_DEVNODE_READY 0x00000000
819 #define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
820 #define CM_SETUP_DOWNLOAD 0x00000001
821 #define CM_SETUP_WRITE_LOG_CONFS 0x00000002
822 #define CM_SETUP_PROP_CHANGE 0x00000003
823 #if (WINVER >= _WIN32_WINNT_WINXP)
824 #define CM_SETUP_DEVNODE_RESET 0x00000004
825 #define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
827 #define CM_SETUP_BITS 0x00000007
829 #define CM_QUERY_ARBITRATOR_RAW 0x00000000
830 #define CM_QUERY_ARBITRATOR_TRANSLATED 0x00000001
831 #define CM_QUERY_ARBITRATOR_BITS 0x00000001
833 #if (WINVER >= _WIN32_WINNT_WINXP)
834 #define CM_CUSTOMDEVPROP_MERGE_MULTISZ 0x00000001
835 #define CM_CUSTOMDEVPROP_BITS 0x00000001
838 #define CM_NAME_ATTRIBUTE_NAME_RETRIEVED_FROM_DEVICE 0x1
839 #define CM_NAME_ATTRIBUTE_USER_ASSIGNED_NAME 0x2
841 #define CR_SUCCESS 0x00000000
842 #define CR_DEFAULT 0x00000001
843 #define CR_OUT_OF_MEMORY 0x00000002
844 #define CR_INVALID_POINTER 0x00000003
845 #define CR_INVALID_FLAG 0x00000004
846 #define CR_INVALID_DEVNODE 0x00000005
847 #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
848 #define CR_INVALID_RES_DES 0x00000006
849 #define CR_INVALID_LOG_CONF 0x00000007
850 #define CR_INVALID_ARBITRATOR 0x00000008
851 #define CR_INVALID_NODELIST 0x00000009
852 #define CR_DEVNODE_HAS_REQS 0x0000000A
853 #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
854 #define CR_INVALID_RESOURCEID 0x0000000B
855 #define CR_DLVXD_NOT_FOUND 0x0000000C
856 #define CR_NO_SUCH_DEVNODE 0x0000000D
857 #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
858 #define CR_NO_MORE_LOG_CONF 0x0000000E
859 #define CR_NO_MORE_RES_DES 0x0000000F
860 #define CR_ALREADY_SUCH_DEVNODE 0x00000010
861 #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
862 #define CR_INVALID_RANGE_LIST 0x00000011
863 #define CR_INVALID_RANGE 0x00000012
864 #define CR_FAILURE 0x00000013
865 #define CR_NO_SUCH_LOGICAL_DEV 0x00000014
866 #define CR_CREATE_BLOCKED 0x00000015
867 #define CR_NOT_SYSTEM_VM 0x00000016
868 #define CR_REMOVE_VETOED 0x00000017
869 #define CR_APM_VETOED 0x00000018
870 #define CR_INVALID_LOAD_TYPE 0x00000019
871 #define CR_BUFFER_SMALL 0x0000001A
872 #define CR_NO_ARBITRATOR 0x0000001B
873 #define CR_NO_REGISTRY_HANDLE 0x0000001C
874 #define CR_REGISTRY_ERROR 0x0000001D
875 #define CR_INVALID_DEVICE_ID 0x0000001E
876 #define CR_INVALID_DATA 0x0000001F
877 #define CR_INVALID_API 0x00000020
878 #define CR_DEVLOADER_NOT_READY 0x00000021
879 #define CR_NEED_RESTART 0x00000022
880 #define CR_NO_MORE_HW_PROFILES 0x00000023
881 #define CR_DEVICE_NOT_THERE 0x00000024
882 #define CR_NO_SUCH_VALUE 0x00000025
883 #define CR_WRONG_TYPE 0x00000026
884 #define CR_INVALID_PRIORITY 0x00000027
885 #define CR_NOT_DISABLEABLE 0x00000028
886 #define CR_FREE_RESOURCES 0x00000029
887 #define CR_QUERY_VETOED 0x0000002A
888 #define CR_CANT_SHARE_IRQ 0x0000002B
889 #define CR_NO_DEPENDENT 0x0000002C
890 #define CR_SAME_RESOURCES 0x0000002D
891 #define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
892 #define CR_INVALID_MACHINENAME 0x0000002F
893 #define CR_REMOTE_COMM_FAILURE 0x00000030
894 #define CR_MACHINE_UNAVAILABLE 0x00000031
895 #define CR_NO_CM_SERVICES 0x00000032
896 #define CR_ACCESS_DENIED 0x00000033
897 #define CR_CALL_NOT_IMPLEMENTED 0x00000034
898 #define CR_INVALID_PROPERTY 0x00000035
899 #define CR_DEVICE_INTERFACE_ACTIVE 0x00000036
900 #define CR_NO_SUCH_DEVICE_INTERFACE 0x00000037
901 #define CR_INVALID_REFERENCE_STRING 0x00000038
902 #define CR_INVALID_CONFLICT_LIST 0x00000039
903 #define CR_INVALID_INDEX 0x0000003A
904 #define CR_INVALID_STRUCTURE_SIZE 0x0000003B
905 #define NUM_CR_RESULTS 0x0000003C
907 #define CM_GLOBAL_STATE_CAN_DO_UI 0x00000001
908 #define CM_GLOBAL_STATE_ON_BIG_STACK 0x00000002
909 #define CM_GLOBAL_STATE_SERVICES_AVAILABLE 0x00000004
910 #define CM_GLOBAL_STATE_SHUTTING_DOWN 0x00000008
911 #define CM_GLOBAL_STATE_DETECTION_PENDING 0x00000010
912 #if (WINVER >= _WIN32_WINNT_WIN7)
913 #define CM_GLOBAL_STATE_REBOOT_REQUIRED 0x00000020
916 /* FIXME : These definitions don't exist in the official header
918 #define CMP_MAGIC 0x01234567
923 CMP_Init_Detection(IN DWORD dwMagic);
928 CMP_RegisterNotification(
929 IN HANDLE hRecipient,
930 IN LPVOID lpvNotificationFilter,
932 OUT PULONG pluhDevNotify);
939 IN DWORD dwProcessId);
944 CMP_UnregisterNotification(IN ULONG luhDevNotify);
949 CMP_WaitServicesAvailable(IN HMACHINE hMachine);
955 CM_Add_Empty_Log_Conf(
956 OUT PLOG_CONF plcLogConf
,
957 IN DEVINST dnDevInst
,
958 IN PRIORITY Priority
,
964 CM_Add_Empty_Log_Conf_Ex(
965 OUT PLOG_CONF plcLogConf
,
966 IN DEVINST dnDevInst
,
967 IN PRIORITY Priority
,
969 IN HMACHINE hMachine
);
975 IN DEVINST dnDevInst
,
983 IN DEVINST dnDevInst
,
986 IN HMACHINE hMachine
);
992 IN DEVINST dnDevInst
,
995 IN HMACHINE hMachine
);
1001 IN DEVINST dnDevInst
,
1006 #define CM_Add_ID CM_Add_IDW
1007 #define CM_Add_ID_Ex CM_Add_ID_ExW
1009 #define CM_Add_ID CM_Add_IDA
1010 #define CM_Add_ID_Ex CM_Add_ID_ExA
1011 #endif /* UNICODE */
1017 IN DWORDLONG ullStartValue
,
1018 IN DWORDLONG ullEndValue
,
1026 OUT PRES_DES prdResDes OPTIONAL
,
1027 IN LOG_CONF lcLogConf
,
1028 IN RESOURCEID ResourceID
,
1029 IN PCVOID ResourceData
,
1030 IN ULONG ResourceLen
,
1037 OUT PRES_DES prdResDes OPTIONAL
,
1038 IN LOG_CONF lcLogConf
,
1039 IN RESOURCEID ResourceID
,
1040 IN PCVOID ResourceData
,
1041 IN ULONG ResourceLen
,
1043 IN HMACHINE hMachine
);
1048 CM_Connect_MachineA(
1049 IN PCSTR UNCServerName OPTIONAL
,
1050 OUT PHMACHINE phMachine
);
1055 CM_Connect_MachineW(
1056 IN PCWSTR UNCServerName OPTIONAL
,
1057 OUT PHMACHINE phMachine
);
1060 #define CM_Connect_Machine CM_Connect_MachineW
1062 #define CM_Connect_Machine CM_Connect_MachineA
1063 #endif /* UNICODE */
1069 OUT PDEVINST pdnDevInst
,
1070 IN DEVINSTID_A pDeviceID
,
1071 IN DEVINST dnParent
,
1078 OUT PDEVINST pdnDevInst
,
1079 IN DEVINSTID_W pDeviceID
,
1080 IN DEVINST dnParent
,
1086 CM_Create_DevNode_ExA(
1087 OUT PDEVINST pdnDevInst
,
1088 IN DEVINSTID_A pDeviceID
,
1089 IN DEVINST dnParent
,
1091 IN HANDLE hMachine
);
1096 CM_Create_DevNode_ExW(
1097 OUT PDEVINST pdnDevInst
,
1098 IN DEVINSTID_W pDeviceID
,
1099 IN DEVINST dnParent
,
1101 IN HANDLE hMachine
);
1103 #define CM_Create_DevInstW CM_Create_DevNodeW
1104 #define CM_Create_DevInstA CM_Create_DevNodeA
1105 #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
1106 #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
1108 #define CM_Create_DevNode CM_Create_DevNodeW
1109 #define CM_Create_DevInst CM_Create_DevNodeW
1110 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
1111 #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
1113 #define CM_Create_DevNode CM_Create_DevNodeA
1114 #define CM_Create_DevInst CM_Create_DevNodeA
1115 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
1116 #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
1117 #endif /* UNICODE */
1122 CM_Create_Range_List(
1123 OUT PRANGE_LIST prlh
,
1129 CM_Delete_Class_Key(
1130 IN LPGUID ClassGuid
,
1136 CM_Delete_Class_Key_Ex(
1137 IN LPGUID ClassGuid
,
1139 IN HANDLE hMachine
);
1144 CM_Delete_DevNode_Key(
1145 IN DEVNODE dnDevNode
,
1146 IN ULONG ulHardwareProfile
,
1152 CM_Delete_DevNode_Key_Ex(
1153 IN DEVNODE dnDevNode
,
1154 IN ULONG ulHardwareProfile
,
1156 IN HANDLE hMachine
);
1158 #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
1159 #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
1165 IN DWORDLONG ullStartValue
,
1166 IN DWORDLONG ullEndValue
,
1173 CM_Detect_Resource_Conflict(
1174 IN DEVINST dnDevInst
,
1175 IN RESOURCEID ResourceID
,
1176 IN PCVOID ResourceData
,
1177 IN ULONG ResourceLen
,
1178 OUT PBOOL pbConflictDetected
,
1184 CM_Detect_Resource_Conflict_Ex(
1185 IN DEVINST dnDevInst
,
1186 IN RESOURCEID ResourceID
,
1187 IN PCVOID ResourceData
,
1188 IN ULONG ResourceLen
,
1189 OUT PBOOL pbConflictDetected
,
1191 IN HMACHINE hMachine OPTIONAL
);
1197 IN DEVINST dnDevInst
,
1203 CM_Disable_DevNode_Ex(
1204 IN DEVINST dnDevInst
,
1206 IN HMACHINE hMachine OPTIONAL
);
1208 #define CM_Disable_DevInst CM_Disable_DevNode
1209 #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
1214 CM_Disconnect_Machine(
1215 IN HMACHINE hMachine OPTIONAL
);
1221 IN RANGE_LIST rlhOld
,
1222 IN RANGE_LIST rlhNew
,
1229 IN DEVINST dnDevInst
,
1235 CM_Enable_DevNode_Ex(
1236 IN DEVINST dnDevInst
,
1238 IN HMACHINE hMachine OPTIONAL
);
1240 #define CM_Enable_DevInst CM_Enable_DevNode
1241 #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
1246 CM_Enumerate_Classes(
1247 IN ULONG ulClassIndex
,
1248 OUT LPGUID ClassGuid
,
1254 CM_Enumerate_Classes_Ex(
1255 IN ULONG ulClassIndex
,
1256 OUT LPGUID ClassGuid
,
1258 IN HMACHINE hMachine OPTIONAL
);
1263 CM_Enumerate_EnumeratorsA(
1264 IN ULONG ulEnumIndex
,
1266 IN OUT PULONG pulLength
,
1272 CM_Enumerate_Enumerators_ExA(
1273 IN ULONG ulEnumIndex
,
1275 IN OUT PULONG pulLength
,
1277 IN HMACHINE hMachine OPTIONAL
);
1282 CM_Enumerate_Enumerators_ExW(
1283 IN ULONG ulEnumIndex
,
1285 IN OUT PULONG pulLength
,
1287 IN HMACHINE hMachine OPTIONAL
);
1292 CM_Enumerate_EnumeratorsW(
1293 IN ULONG ulEnumIndex
,
1295 IN OUT PULONG pulLength
,
1299 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
1300 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
1302 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
1303 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
1304 #endif /* UNICODE */
1310 OUT PDWORDLONG pullStart
,
1311 IN DWORDLONG ullStart
,
1313 IN DWORDLONG ullAlignment
,
1314 IN DWORDLONG ullEnd
,
1323 OUT PDWORDLONG pullStart
,
1324 OUT PDWORDLONG pullEnd
,
1325 OUT PRANGE_ELEMENT preElement
,
1332 IN LOG_CONF lcLogConfToBeFreed
,
1338 CM_Free_Log_Conf_Ex(
1339 IN LOG_CONF lcLogConfToBeFreed
,
1341 IN HMACHINE hMachine
);
1346 CM_Free_Log_Conf_Handle(
1347 IN LOG_CONF lcLogConf
);
1360 OUT PRES_DES prdResDes
,
1361 IN RES_DES rdResDes
,
1368 OUT PRES_DES prdResDes
,
1369 IN RES_DES rdResDes
,
1371 IN HMACHINE hMachine
);
1376 CM_Free_Res_Des_Handle(
1377 IN RES_DES rdResDes
);
1382 CM_Free_Resource_Conflict_Handle(
1383 IN CONFLICT_LIST clConflictList
);
1389 OUT PDEVINST pdnDevInst
,
1390 IN DEVINST dnDevInst
,
1397 OUT PDEVINST pdnDevInst
,
1398 IN DEVINST dnDevInst
,
1400 IN HMACHINE hMachine
);
1406 IN LPGUID ClassGuid
,
1408 IN OUT PULONG pulLength
,
1415 IN LPGUID ClassGuid
,
1417 IN OUT PULONG pulLength
,
1423 CM_Get_Class_Name_ExA(
1424 IN LPGUID ClassGuid
,
1426 IN OUT PULONG pulLength
,
1428 IN HMACHINE hMachine
);
1433 CM_Get_Class_Name_ExW(
1434 IN LPGUID ClassGuid
,
1436 IN OUT PULONG pulLength
,
1438 IN HMACHINE hMachine
);
1441 #define CM_Get_Class_Name CM_Get_Class_NameW
1442 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
1444 #define CM_Get_Class_Name CM_Get_Class_NameA
1445 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
1446 #endif /* UNICODE */
1451 CM_Get_Class_Key_NameA(
1452 IN LPGUID ClassGuid
,
1453 OUT LPSTR pszKeyName
,
1454 IN OUT PULONG pulLength
,
1460 CM_Get_Class_Key_NameW(
1461 IN LPGUID ClassGuid
,
1462 OUT LPWSTR pszKeyName
,
1463 IN OUT PULONG pulLength
,
1469 CM_Get_Class_Key_Name_ExA(
1470 IN LPGUID ClassGuid
,
1471 OUT LPSTR pszKeyName
,
1472 IN OUT PULONG pulLength
,
1474 IN HMACHINE hMachine
);
1479 CM_Get_Class_Key_Name_ExW(
1480 IN LPGUID ClassGuid
,
1481 OUT LPWSTR pszKeyName
,
1482 IN OUT PULONG pulLength
,
1484 IN HMACHINE hMachine
);
1487 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
1488 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
1490 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
1491 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
1492 #endif /* UNICODE */
1498 OUT PULONG pulDepth
,
1499 IN DEVINST dnDevInst
,
1506 OUT PULONG pulDepth
,
1507 IN DEVINST dnDevInst
,
1509 IN HMACHINE hMachine
);
1515 IN DEVINST dnDevInst
,
1523 CM_Get_Device_ID_ExA(
1524 IN DEVINST dnDevInst
,
1528 IN HMACHINE hMachine
);
1533 CM_Get_Device_ID_ExW(
1534 IN DEVINST dnDevInst
,
1538 IN HMACHINE hMachine
);
1544 IN DEVINST dnDevInst
,
1550 #define CM_Get_Device_ID CM_Get_Device_IDW
1551 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
1553 #define CM_Get_Device_ID CM_Get_Device_IDA
1554 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
1555 #endif /* UNICODE */
1560 CM_Get_Device_ID_ListA(
1561 IN PCSTR pszFilter OPTIONAL
,
1569 CM_Get_Device_ID_List_ExA(
1570 IN PCSTR pszFilter OPTIONAL
,
1574 IN HMACHINE hMachine
);
1579 CM_Get_Device_ID_List_ExW(
1580 IN PCWSTR pszFilter OPTIONAL
,
1584 IN HMACHINE hMachine
);
1589 CM_Get_Device_ID_ListW(
1590 IN PCWSTR pszFilter OPTIONAL
,
1596 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
1597 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
1599 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
1600 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
1601 #endif /* UNICODE */
1606 CM_Get_Device_ID_List_SizeA(
1608 IN PCSTR pszFilter OPTIONAL
,
1614 CM_Get_Device_ID_List_Size_ExA(
1616 IN PCSTR pszFilter OPTIONAL
,
1618 IN HMACHINE hMachine
);
1623 CM_Get_Device_ID_List_Size_ExW(
1625 IN PCWSTR pszFilter OPTIONAL
,
1627 IN HMACHINE hMachine
);
1632 CM_Get_Device_ID_List_SizeW(
1634 IN PCWSTR pszFilter OPTIONAL
,
1638 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
1639 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
1641 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
1642 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
1643 #endif /* UNICODE */
1648 CM_Get_Device_ID_Size(
1650 IN DEVINST dnDevInst
,
1656 CM_Get_Device_ID_Size_Ex(
1658 IN DEVINST dnDevInst
,
1660 IN HMACHINE hMachine
);
1665 CM_Get_DevNode_Registry_PropertyA(
1666 IN DEVINST dnDevInst
,
1667 IN ULONG ulProperty
,
1668 OUT PULONG pulRegDataType OPTIONAL
,
1669 OUT PVOID Buffer OPTIONAL
,
1670 IN OUT PULONG pulLength
,
1676 CM_Get_DevNode_Registry_PropertyW(
1677 IN DEVINST dnDevInst
,
1678 IN ULONG ulProperty
,
1679 OUT PULONG pulRegDataType OPTIONAL
,
1680 OUT PVOID Buffer OPTIONAL
,
1681 IN OUT PULONG pulLength
,
1687 CM_Get_DevNode_Registry_Property_ExA(
1688 IN DEVINST dnDevInst
,
1689 IN ULONG ulProperty
,
1690 OUT PULONG pulRegDataType OPTIONAL
,
1691 OUT PVOID Buffer OPTIONAL
,
1692 IN OUT PULONG pulLength
,
1694 IN HMACHINE hMachine
);
1699 CM_Get_DevNode_Registry_Property_ExW(
1700 IN DEVINST dnDevInst
,
1701 IN ULONG ulProperty
,
1702 OUT PULONG pulRegDataType OPTIONAL
,
1703 OUT PVOID Buffer OPTIONAL
,
1704 IN OUT PULONG pulLength
,
1706 IN HMACHINE hMachine
);
1708 #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
1709 #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
1710 #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
1711 #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
1714 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
1715 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1716 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
1717 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1719 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
1720 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1721 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
1722 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1723 #endif /* UNICODE */
1725 #if (WINVER >= _WIN32_WINNT_WINXP)
1730 CM_Get_DevNode_Custom_PropertyA(
1731 IN DEVINST dnDevInst
,
1732 IN PCSTR pszCustomPropertyName
,
1733 OUT PULONG pulRegDataType OPTIONAL
,
1734 OUT PVOID Buffer OPTIONAL
,
1735 IN OUT PULONG pulLength
,
1741 CM_Get_DevNode_Custom_PropertyW(
1742 IN DEVINST dnDevInst
,
1743 IN PCWSTR pszCustomPropertyName
,
1744 OUT PULONG pulRegDataType OPTIONAL
,
1745 OUT PVOID Buffer OPTIONAL
,
1746 IN OUT PULONG pulLength
,
1752 CM_Get_DevNode_Custom_Property_ExA(
1753 IN DEVINST dnDevInst
,
1754 IN PCSTR pszCustomPropertyName
,
1755 OUT PULONG pulRegDataType OPTIONAL
,
1756 OUT PVOID Buffer OPTIONAL
,
1757 IN OUT PULONG pulLength
,
1759 IN HMACHINE hMachine OPTIONAL
);
1764 CM_Get_DevNode_Custom_Property_ExW(
1765 IN DEVINST dnDevInst
,
1766 IN PCWSTR pszCustomPropertyName
,
1767 OUT PULONG pulRegDataType OPTIONAL
,
1768 OUT PVOID Buffer OPTIONAL
,
1769 IN OUT PULONG pulLength
,
1771 IN HMACHINE hMachine OPTIONAL
);
1773 #define CM_Get_DevInst_Custom_PropertyW CM_Get_DevNode_Custom_PropertyW
1774 #define CM_Get_DevInst_Custom_PropertyA CM_Get_DevNode_Custom_PropertyA
1775 #define CM_Get_DevInst_Custom_Property_ExW CM_Get_DevNode_Custom_Property_ExW
1776 #define CM_Get_DevInst_Custom_Property_ExA CM_Get_DevNode_Custom_Property_ExA
1778 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyW
1779 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1780 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyW
1781 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1783 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyA
1784 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1785 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyA
1786 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1789 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
1794 CM_Get_DevNode_Status(
1795 OUT PULONG pulStatus
,
1796 OUT PULONG pulProblemNumber
,
1797 IN DEVINST dnDevInst
,
1803 CM_Get_DevNode_Status_Ex(
1804 OUT PULONG pulStatus
,
1805 OUT PULONG pulProblemNumber
,
1806 IN DEVINST dnDevInst
,
1808 IN HMACHINE hMachine
);
1810 #define CM_Get_DevInst_Status CM_Get_DevNode_Status
1811 #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
1816 CM_Get_First_Log_Conf(
1817 OUT PLOG_CONF plcLogConf OPTIONAL
,
1818 IN DEVINST dnDevInst
,
1824 CM_Get_First_Log_Conf_Ex(
1825 OUT PLOG_CONF plcLogConf OPTIONAL
,
1826 IN DEVINST dnDevInst
,
1828 IN HMACHINE hMachine OPTIONAL
);
1833 CM_Get_Global_State(
1834 OUT PULONG pulState
,
1840 CM_Get_Global_State_Ex(
1841 OUT PULONG pulState
,
1843 IN HMACHINE hMachine
);
1848 CM_Get_Hardware_Profile_InfoA(
1850 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1856 CM_Get_Hardware_Profile_Info_ExA(
1858 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1860 IN HMACHINE hMachine OPTIONAL
);
1865 CM_Get_Hardware_Profile_InfoW(
1867 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1873 CM_Get_Hardware_Profile_Info_ExW(
1875 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1877 IN HMACHINE hMachine OPTIONAL
);
1880 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoW
1881 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExW
1883 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoA
1884 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExA
1890 CM_Get_HW_Prof_FlagsA(
1891 IN DEVINSTID_A szDevInstName
,
1892 IN ULONG ulHardwareProfile
,
1893 OUT PULONG pulValue
,
1899 CM_Get_HW_Prof_FlagsW(
1900 IN DEVINSTID_W szDevInstName
,
1901 IN ULONG ulHardwareProfile
,
1902 OUT PULONG pulValue
,
1908 CM_Get_HW_Prof_Flags_ExA(
1909 IN DEVINSTID_A szDevInstName
,
1910 IN ULONG ulHardwareProfile
,
1911 OUT PULONG pulValue
,
1913 IN HMACHINE hMachine
);
1918 CM_Get_HW_Prof_Flags_ExW(
1919 IN DEVINSTID_W szDevInstName
,
1920 IN ULONG ulHardwareProfile
,
1921 OUT PULONG pulValue
,
1923 IN HMACHINE hMachine
);
1926 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
1927 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
1929 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
1930 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
1936 CM_Get_Device_Interface_AliasA(
1937 IN LPCSTR pszDeviceInterface
,
1938 IN LPGUID AliasInterfaceGuid
,
1939 OUT LPSTR pszAliasDeviceInterface
,
1940 IN OUT PULONG pulLength
,
1946 CM_Get_Device_Interface_AliasW(
1947 IN LPCWSTR pszDeviceInterface
,
1948 IN LPGUID AliasInterfaceGuid
,
1949 OUT LPWSTR pszAliasDeviceInterface
,
1950 IN OUT PULONG pulLength
,
1956 CM_Get_Device_Interface_Alias_ExA(
1957 IN LPCSTR pszDeviceInterface
,
1958 IN LPGUID AliasInterfaceGuid
,
1959 OUT LPSTR pszAliasDeviceInterface
,
1960 IN OUT PULONG pulLength
,
1962 IN HMACHINE hMachine OPTIONAL
);
1967 CM_Get_Device_Interface_Alias_ExW(
1968 IN LPCWSTR pszDeviceInterface
,
1969 IN LPGUID AliasInterfaceGuid
,
1970 OUT LPWSTR pszAliasDeviceInterface
,
1971 IN OUT PULONG pulLength
,
1973 IN HMACHINE hMachine OPTIONAL
);
1976 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasW
1977 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExW
1979 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasA
1980 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExA
1986 CM_Get_Device_Interface_ListA(
1987 IN LPGUID InterfaceClassGuid
,
1988 IN DEVINSTID_A pDeviceID OPTIONAL
,
1996 CM_Get_Device_Interface_ListW(
1997 IN LPGUID InterfaceClassGuid
,
1998 IN DEVINSTID_W pDeviceID OPTIONAL
,
2006 CM_Get_Device_Interface_List_ExA(
2007 IN LPGUID InterfaceClassGuid
,
2008 IN DEVINSTID_A pDeviceID OPTIONAL
,
2012 IN HMACHINE hMachine OPTIONAL
);
2017 CM_Get_Device_Interface_List_ExW(
2018 IN LPGUID InterfaceClassGuid
,
2019 IN DEVINSTID_W pDeviceID OPTIONAL
,
2023 IN HMACHINE hMachine OPTIONAL
);
2026 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListW
2027 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExW
2029 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListA
2030 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExA
2036 CM_Get_Device_Interface_List_SizeA(
2038 IN LPGUID InterfaceClassGuid
,
2039 IN DEVINSTID_A pDeviceID OPTIONAL
,
2045 CM_Get_Device_Interface_List_SizeW(
2047 IN LPGUID InterfaceClassGuid
,
2048 IN DEVINSTID_W pDeviceID OPTIONAL
,
2054 CM_Get_Device_Interface_List_Size_ExA(
2056 IN LPGUID InterfaceClassGuid
,
2057 IN DEVINSTID_A pDeviceID OPTIONAL
,
2059 IN HMACHINE hMachine OPTIONAL
);
2064 CM_Get_Device_Interface_List_Size_ExW(
2066 IN LPGUID InterfaceClassGuid
,
2067 IN DEVINSTID_W pDeviceID OPTIONAL
,
2069 IN HMACHINE hMachine OPTIONAL
);
2072 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeW
2073 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExW
2075 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeA
2076 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExA
2082 CM_Get_Log_Conf_Priority(
2083 IN LOG_CONF lcLogConf
,
2084 OUT PPRIORITY pPriority
,
2090 CM_Get_Log_Conf_Priority_Ex(
2091 IN LOG_CONF lcLogConf
,
2092 OUT PPRIORITY pPriority
,
2094 IN HMACHINE hMachine
);
2099 CM_Get_Next_Log_Conf(
2100 OUT PLOG_CONF plcLogConf OPTIONAL
,
2101 IN LOG_CONF lcLogConf
,
2107 CM_Get_Next_Log_Conf_Ex(
2108 OUT PLOG_CONF plcLogConf OPTIONAL
,
2109 IN LOG_CONF lcLogConf
,
2111 IN HMACHINE hMachine
);
2116 CM_Get_Next_Res_Des(
2117 OUT PRES_DES prdResDes
,
2118 IN RES_DES rdResDes
,
2119 IN RESOURCEID ForResource
,
2120 OUT PRESOURCEID pResourceID
,
2126 CM_Get_Next_Res_Des_Ex(
2127 OUT PRES_DES prdResDes
,
2128 IN RES_DES rdResDes
,
2129 IN RESOURCEID ForResource
,
2130 OUT PRESOURCEID pResourceID
,
2132 IN HMACHINE hMachine
);
2138 OUT PDEVINST pdnDevInst
,
2139 IN DEVINST dnDevInst
,
2146 OUT PDEVINST pdnDevInst
,
2147 IN DEVINST dnDevInst
,
2149 IN HMACHINE hMachine
);
2154 CM_Get_Res_Des_Data(
2155 IN RES_DES rdResDes
,
2163 CM_Get_Res_Des_Data_Ex(
2164 IN RES_DES rdResDes
,
2168 IN HMACHINE hMachine
);
2173 CM_Get_Res_Des_Data_Size(
2175 IN RES_DES rdResDes
,
2181 CM_Get_Res_Des_Data_Size_Ex(
2183 IN RES_DES rdResDes
,
2185 IN HMACHINE hMachine
);
2190 CM_Get_Resource_Conflict_Count(
2191 IN CONFLICT_LIST clConflictList
,
2192 OUT PULONG pulCount
);
2197 CM_Get_Resource_Conflict_DetailsA(
2198 IN CONFLICT_LIST clConflictList
,
2200 IN OUT PCONFLICT_DETAILS_A pConflictDetails
);
2205 CM_Get_Resource_Conflict_DetailsW(
2206 IN CONFLICT_LIST clConflictList
,
2208 IN OUT PCONFLICT_DETAILS_W pConflictDetails
);
2211 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
2213 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
2214 #endif /* UNICODE */
2219 CM_Get_Class_Registry_PropertyW(
2220 IN LPGUID ClassGuid
,
2221 IN ULONG ulProperty
,
2222 OUT PULONG pulRegDataType OPTIONAL
,
2223 OUT PVOID Buffer OPTIONAL
,
2224 IN OUT PULONG pulLength
,
2226 IN HMACHINE hMachine OPTIONAL
);
2231 CM_Set_Class_Registry_PropertyW(
2232 IN LPGUID ClassGuid
,
2233 IN ULONG ulProperty
,
2234 IN PCVOID Buffer OPTIONAL
,
2237 IN HMACHINE hMachine OPTIONAL
);
2242 CM_Get_Class_Registry_PropertyA(
2243 IN LPGUID ClassGuid
,
2244 IN ULONG ulProperty
,
2245 OUT PULONG pulRegDataType OPTIONAL
,
2246 OUT PVOID Buffer OPTIONAL
,
2247 IN OUT PULONG pulLength
,
2249 IN HMACHINE hMachine OPTIONAL
);
2254 CM_Set_Class_Registry_PropertyA(
2255 IN LPGUID ClassGuid
,
2256 IN ULONG ulProperty
,
2257 IN PCVOID Buffer OPTIONAL
,
2260 IN HMACHINE hMachine OPTIONAL
);
2263 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyW
2264 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyW
2266 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyA
2267 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyA
2274 OUT PDEVINST pdnDevInst
,
2282 OUT PDEVINST pdnDevInst
,
2285 IN HMACHINE hMachine
);
2290 CM_Get_Version(VOID
);
2296 IN HMACHINE hMachine
);
2298 #if (WINVER >= _WIN32_WINNT_WINXP)
2303 CM_Is_Version_Available(
2309 CM_Is_Version_Available_Ex(
2311 IN HMACHINE hMachine OPTIONAL
);
2313 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
2318 CM_Intersect_Range_List(
2319 IN RANGE_LIST rlhOld1
,
2320 IN RANGE_LIST rlhOld2
,
2321 IN RANGE_LIST rlhNew
,
2327 CM_Invert_Range_List(
2328 IN RANGE_LIST rlhOld
,
2329 IN RANGE_LIST rlhNew
,
2330 IN DWORDLONG ullMaxValue
,
2336 CM_Is_Dock_Station_Present(
2337 OUT PBOOL pbPresent
);
2342 CM_Is_Dock_Station_Present_Ex(
2343 OUT PBOOL pbPresent
,
2344 IN HMACHINE hMachine OPTIONAL
);
2350 OUT PDEVINST pdnDevInst
,
2351 IN DEVINSTID_A pDeviceID OPTIONAL
,
2357 CM_Locate_DevNode_ExA(
2358 OUT PDEVINST pdnDevInst
,
2359 IN DEVINSTID_A pDeviceID OPTIONAL
,
2361 IN HMACHINE hMachine
);
2366 CM_Locate_DevNode_ExW(
2367 OUT PDEVINST pdnDevInst
,
2368 IN DEVINSTID_W pDeviceID OPTIONAL
,
2370 IN HMACHINE hMachine
);
2376 OUT PDEVINST pdnDevInst
,
2377 IN DEVINSTID_W pDeviceID OPTIONAL
,
2380 #define CM_Locate_DevInstA CM_Locate_DevNodeA
2381 #define CM_Locate_DevInstW CM_Locate_DevNodeW
2382 #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
2383 #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
2386 #define CM_Locate_DevNode CM_Locate_DevNodeW
2387 #define CM_Locate_DevInst CM_Locate_DevNodeW
2388 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
2389 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
2391 #define CM_Locate_DevNode CM_Locate_DevNodeA
2392 #define CM_Locate_DevInst CM_Locate_DevNodeA
2393 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
2394 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
2395 #endif /* UNICODE */
2400 CM_Merge_Range_List(
2401 IN RANGE_LIST rlhOld1
,
2402 IN RANGE_LIST rlhOld2
,
2403 IN RANGE_LIST rlhNew
,
2410 OUT PRES_DES prdResDes
,
2411 IN RES_DES rdResDes
,
2412 IN RESOURCEID ResourceID
,
2413 IN PCVOID ResourceData
,
2414 IN ULONG ResourceLen
,
2420 CM_Modify_Res_Des_Ex(
2421 OUT PRES_DES prdResDes
,
2422 IN RES_DES rdResDes
,
2423 IN RESOURCEID ResourceID
,
2424 IN PCVOID ResourceData
,
2425 IN ULONG ResourceLen
,
2427 IN HMACHINE hMachine
);
2433 IN DEVINST dnFromDevInst
,
2434 IN DEVINST dnToDevInst
,
2441 IN DEVINST dnFromDevInst
,
2442 IN DEVINST dnToDevInst
,
2444 IN HMACHINE hMachine OPTIONAL
);
2446 #define CM_Move_DevInst CM_Move_DevNode
2447 #define CM_Move_DevInst_Ex CM_Move_DevNode_Ex
2453 IN OUT PRANGE_ELEMENT preElement
,
2454 OUT PDWORDLONG pullStart
,
2455 OUT PDWORDLONG pullEnd
,
2462 IN LPGUID ClassGuid OPTIONAL
,
2463 IN LPCSTR pszClassName OPTIONAL
,
2464 IN REGSAM samDesired
,
2465 IN REGDISPOSITION Disposition
,
2473 IN LPGUID ClassGuid OPTIONAL
,
2474 IN LPCWSTR pszClassName OPTIONAL
,
2475 IN REGSAM samDesired
,
2476 IN REGDISPOSITION Disposition
,
2483 CM_Open_Class_Key_ExA(
2484 IN LPGUID pszClassGuid OPTIONAL
,
2485 IN LPCSTR pszClassName OPTIONAL
,
2486 IN REGSAM samDesired
,
2487 IN REGDISPOSITION Disposition
,
2490 IN HMACHINE hMachine
);
2495 CM_Open_Class_Key_ExW(
2496 IN LPGUID pszClassGuid OPTIONAL
,
2497 IN LPCWSTR pszClassName OPTIONAL
,
2498 IN REGSAM samDesired
,
2499 IN REGDISPOSITION Disposition
,
2502 IN HMACHINE hMachine
);
2505 #define CM_Open_Class_Key CM_Open_Class_KeyW
2506 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
2508 #define CM_Open_Class_Key CM_Open_Class_KeyA
2509 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
2510 #endif /* UNICODE */
2515 CM_Open_DevNode_Key(
2516 IN DEVINST dnDevNode
,
2517 IN REGSAM samDesired
,
2518 IN ULONG ulHardwareProfile
,
2519 IN REGDISPOSITION Disposition
,
2520 OUT PHKEY phkDevice
,
2526 CM_Open_DevNode_Key_Ex(
2527 IN DEVINST dnDevNode
,
2528 IN REGSAM samDesired
,
2529 IN ULONG ulHardwareProfile
,
2530 IN REGDISPOSITION Disposition
,
2531 OUT PHKEY phkDevice
,
2533 IN HMACHINE hMachine
);
2535 #define CM_Open_DevInst_Key CM_Open_DevNode_Key
2536 #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
2538 #if (WINVER >= _WIN32_WINNT_VISTA)
2543 CM_Open_Device_Interface_KeyA(
2544 IN LPCSTR pszDeviceInterface
,
2545 IN REGSAM samDesired
,
2546 IN REGDISPOSITION Disposition
,
2547 OUT PHKEY phkDeviceInterface
,
2553 CM_Open_Device_Interface_KeyW(
2554 IN LPCWSTR pszDeviceInterface
,
2555 IN REGSAM samDesired
,
2556 IN REGDISPOSITION Disposition
,
2557 OUT PHKEY phkDeviceInterface
,
2563 CM_Open_Device_Interface_Key_ExA(
2564 IN LPCSTR pszDeviceInterface
,
2565 IN REGSAM samDesired
,
2566 IN REGDISPOSITION Disposition
,
2567 OUT PHKEY phkDeviceInterface
,
2569 IN HMACHINE hMachine OPTIONAL
);
2574 CM_Open_Device_Interface_Key_ExW(
2575 IN LPCWSTR pszDeviceInterface
,
2576 IN REGSAM samDesired
,
2577 IN REGDISPOSITION Disposition
,
2578 OUT PHKEY phkDeviceInterface
,
2580 IN HMACHINE hMachine OPTIONAL
);
2583 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyW
2584 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExW
2586 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyA
2587 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExA
2593 CM_Delete_Device_Interface_KeyA(
2594 IN LPCSTR pszDeviceInterface
,
2600 CM_Delete_Device_Interface_KeyW(
2601 IN LPCWSTR pszDeviceInterface
,
2607 CM_Delete_Device_Interface_Key_ExA(
2608 IN LPCSTR pszDeviceInterface
,
2610 IN HMACHINE hMachine OPTIONAL
);
2615 CM_Delete_Device_Interface_Key_ExW(
2616 IN LPCWSTR pszDeviceInterface
,
2618 IN HMACHINE hMachine OPTIONAL
);
2621 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyW
2622 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExW
2624 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyA
2625 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExA
2628 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2633 CM_Query_Arbitrator_Free_Data(
2636 IN DEVINST dnDevInst
,
2637 IN RESOURCEID ResourceID
,
2643 CM_Query_Arbitrator_Free_Data_Ex(
2646 IN DEVINST dnDevInst
,
2647 IN RESOURCEID ResourceID
,
2649 IN HMACHINE hMachine OPTIONAL
);
2654 CM_Query_Arbitrator_Free_Size(
2656 IN DEVINST dnDevInst
,
2657 IN RESOURCEID ResourceID
,
2663 CM_Query_Arbitrator_Free_Size_Ex(
2665 IN DEVINST dnDevInst
,
2666 IN RESOURCEID ResourceID
,
2668 IN HMACHINE hMachine OPTIONAL
);
2673 CM_Query_Remove_SubTree(
2674 IN DEVINST dnAncestor
,
2680 CM_Query_Remove_SubTree_Ex(
2681 IN DEVINST dnAncestor
,
2683 IN HMACHINE hMachine OPTIONAL
);
2688 CM_Query_And_Remove_SubTreeA(
2689 IN DEVINST dnAncestor
,
2690 OUT PPNP_VETO_TYPE pVetoType
,
2691 OUT LPSTR pszVetoName
,
2692 IN ULONG ulNameLength
,
2698 CM_Query_And_Remove_SubTreeW(
2699 IN DEVINST dnAncestor
,
2700 OUT PPNP_VETO_TYPE pVetoType
,
2701 OUT LPWSTR pszVetoName
,
2702 IN ULONG ulNameLength
,
2708 CM_Query_And_Remove_SubTree_ExA(
2709 IN DEVINST dnAncestor
,
2710 OUT PPNP_VETO_TYPE pVetoType
,
2711 OUT LPSTR pszVetoName
,
2712 IN ULONG ulNameLength
,
2714 IN HMACHINE hMachine
);
2719 CM_Query_And_Remove_SubTree_ExW(
2720 IN DEVINST dnAncestor
,
2721 OUT PPNP_VETO_TYPE pVetoType
,
2722 OUT LPWSTR pszVetoName
,
2723 IN ULONG ulNameLength
,
2725 IN HMACHINE hMachine
);
2728 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeW
2729 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExW
2731 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeA
2732 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExA
2738 CM_Query_Resource_Conflict_List(
2739 OUT PCONFLICT_LIST pclConflictList
,
2740 IN DEVINST dnDevInst
,
2741 IN RESOURCEID ResourceID
,
2742 IN PCVOID ResourceData
,
2743 IN ULONG ResourceLen
,
2745 IN HMACHINE hMachine OPTIONAL
);
2750 CM_Reenumerate_DevNode(
2751 IN DEVINST dnDevInst
,
2757 CM_Reenumerate_DevNode_Ex(
2758 IN DEVINST dnDevInst
,
2760 IN HMACHINE hMachine
);
2762 #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
2763 #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
2768 CM_Register_Device_InterfaceA(
2769 IN DEVINST dnDevInst
,
2770 IN LPGUID InterfaceClassGuid
,
2771 IN LPCSTR pszReference OPTIONAL
,
2772 OUT LPSTR pszDeviceInterface
,
2773 IN OUT PULONG pulLength
,
2779 CM_Register_Device_InterfaceW(
2780 IN DEVINST dnDevInst
,
2781 IN LPGUID InterfaceClassGuid
,
2782 IN LPCWSTR pszReference OPTIONAL
,
2783 OUT LPWSTR pszDeviceInterface
,
2784 IN OUT PULONG pulLength
,
2790 CM_Register_Device_Interface_ExA(
2791 IN DEVINST dnDevInst
,
2792 IN LPGUID InterfaceClassGuid
,
2793 IN LPCSTR pszReference OPTIONAL
,
2794 OUT LPSTR pszDeviceInterface
,
2795 IN OUT PULONG pulLength
,
2797 IN HMACHINE hMachine OPTIONAL
);
2802 CM_Register_Device_Interface_ExW(
2803 IN DEVINST dnDevInst
,
2804 IN LPGUID InterfaceClassGuid
,
2805 IN LPCWSTR pszReference OPTIONAL
,
2806 OUT LPWSTR pszDeviceInterface
,
2807 IN OUT PULONG pulLength
,
2809 IN HMACHINE hMachine OPTIONAL
);
2812 #define CM_Register_Device_Interface CM_Register_Device_InterfaceW
2813 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExW
2815 #define CM_Register_Device_Interface CM_Register_Device_InterfaceA
2816 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExA
2822 CM_Request_Device_EjectA(
2823 IN DEVINST dnDevInst
,
2824 OUT PPNP_VETO_TYPE pVetoType
,
2825 OUT LPSTR pszVetoName
,
2826 IN ULONG ulNameLength
,
2832 CM_Request_Device_Eject_ExW(
2833 IN DEVINST dnDevInst
,
2834 OUT PPNP_VETO_TYPE pVetoType
,
2835 OUT LPWSTR pszVetoName
,
2836 IN ULONG ulNameLength
,
2838 IN HMACHINE hMachine
);
2843 CM_Request_Device_Eject_ExA(
2844 IN DEVINST dnDevInst
,
2845 OUT PPNP_VETO_TYPE pVetoType
,
2846 OUT LPSTR pszVetoName
,
2847 IN ULONG ulNameLength
,
2849 IN HMACHINE hMachine
);
2854 CM_Request_Device_EjectW(
2855 IN DEVINST dnDevInst
,
2856 OUT PPNP_VETO_TYPE pVetoType
,
2857 OUT LPWSTR pszVetoName
,
2858 IN ULONG ulNameLength
,
2862 #define CM_Request_Device_Eject CM_Request_Device_EjectW
2863 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
2865 #define CM_Request_Device_Eject CM_Request_Device_EjectA
2866 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
2872 CM_Request_Eject_PC(VOID
);
2877 CM_Request_Eject_PC_Ex(
2878 IN HMACHINE hMachine OPTIONAL
);
2889 CM_Run_Detection_Ex(
2891 IN HMACHINE hMachine OPTIONAL
);
2893 #if (WINVER >= _WIN32_WINNT_VISTA)
2896 CM_Apply_PowerScheme(VOID
);
2899 CM_Write_UserPowerKey(
2900 IN CONST GUID
*SchemeGuid OPTIONAL
,
2901 IN CONST GUID
*SubGroupOfPowerSettingsGuid OPTIONAL
,
2902 IN CONST GUID
*PowerSettingGuid OPTIONAL
,
2903 IN ULONG AccessFlags
,
2906 IN DWORD BufferSize
,
2910 CM_Set_ActiveScheme(
2911 IN CONST GUID
*SchemeGuid
,
2915 CM_Restore_DefaultPowerScheme(
2916 IN CONST GUID
*SchemeGuid
,
2920 CM_RestoreAll_DefaultPowerSchemes(
2924 CM_Duplicate_PowerScheme(
2925 IN CONST GUID
*SourceSchemeGuid
,
2926 IN GUID
**DestinationSchemeGuid
,
2930 CM_Delete_PowerScheme(
2931 IN CONST GUID
*SchemeGuid
,
2935 CM_Import_PowerScheme(
2936 IN LPCWSTR ImportFileNamePath
,
2937 IN OUT GUID
**DestinationSchemeGuid
,
2940 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2945 CM_Set_DevNode_Problem(
2946 IN DEVINST dnDevInst
,
2953 CM_Set_DevNode_Problem_Ex(
2954 IN DEVINST dnDevInst
,
2957 IN HMACHINE hMachine
);
2959 #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
2960 #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
2965 CM_Unregister_Device_InterfaceA(
2966 IN LPCSTR pszDeviceInterface
,
2972 CM_Unregister_Device_InterfaceW(
2973 IN LPCWSTR pszDeviceInterface
,
2979 CM_Unregister_Device_Interface_ExA(
2980 IN LPCSTR pszDeviceInterface
,
2982 IN HMACHINE hMachine OPTIONAL
);
2987 CM_Unregister_Device_Interface_ExW(
2988 IN LPCWSTR pszDeviceInterface
,
2990 IN HMACHINE hMachine OPTIONAL
);
2993 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceW
2994 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExW
2996 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceA
2997 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExA
3003 CM_Register_Device_Driver(
3004 IN DEVINST dnDevInst
,
3010 CM_Register_Device_Driver_Ex(
3011 IN DEVINST dnDevInst
,
3013 IN HMACHINE hMachine OPTIONAL
);
3019 IN DEVINST dnAncestor
,
3025 CM_Remove_SubTree_Ex(
3026 IN DEVINST dnAncestor
,
3028 IN HMACHINE hMachine OPTIONAL
);
3033 CM_Set_DevNode_Registry_PropertyA(
3034 IN DEVINST dnDevInst
,
3035 IN ULONG ulProperty
,
3036 IN PCVOID Buffer OPTIONAL
,
3043 CM_Set_DevNode_Registry_PropertyW(
3044 IN DEVINST dnDevInst
,
3045 IN ULONG ulProperty
,
3046 IN PCVOID Buffer OPTIONAL
,
3053 CM_Set_DevNode_Registry_Property_ExA(
3054 IN DEVINST dnDevInst
,
3055 IN ULONG ulProperty
,
3056 IN PCVOID Buffer OPTIONAL
,
3059 IN HMACHINE hMachine
);
3064 CM_Set_DevNode_Registry_Property_ExW(
3065 IN DEVINST dnDevInst
,
3066 IN ULONG ulProperty
,
3067 IN PCVOID Buffer OPTIONAL
,
3070 IN HMACHINE hMachine
);
3072 #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
3073 #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
3074 #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
3075 #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
3078 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
3079 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3080 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
3081 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3083 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
3084 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3085 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
3086 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3087 #endif /* UNICODE */
3093 IN ULONG ulHardwareProfile
,
3100 IN ULONG ulHardwareProfile
,
3102 IN HMACHINE hMachine
);
3107 CM_Set_HW_Prof_FlagsA(
3108 IN DEVINSTID_A szDevInstName
,
3116 CM_Set_HW_Prof_FlagsW(
3117 IN DEVINSTID_W szDevInstName
,
3125 CM_Set_HW_Prof_Flags_ExA(
3126 IN DEVINSTID_A szDevInstName
,
3130 IN HMACHINE hMachine
);
3135 CM_Set_HW_Prof_Flags_ExW(
3136 IN DEVINSTID_W szDevInstName
,
3140 IN HMACHINE hMachine
);
3143 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
3144 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
3146 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
3147 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
3148 #endif /* UNICODE */
3154 IN DEVINST dnDevInst
,
3160 CM_Setup_DevNode_Ex(
3161 IN DEVINST dnDevInst
,
3163 IN HMACHINE hMachine OPTIONAL
);
3165 #define CM_Setup_DevInst CM_Setup_DevNode
3166 #define CM_Setup_DevInst_Ex CM_Setup_DevNode_Ex
3171 CM_Test_Range_Available(
3172 IN DWORDLONG ullStartValue
,
3173 IN DWORDLONG ullEndValue
,
3180 CM_Uninstall_DevNode(
3181 IN DEVINST dnPhantom
,
3187 CM_Uninstall_DevNode_Ex(
3188 IN DEVINST dnPhantom
,
3190 IN HMACHINE hMachine
);
3192 #define CM_Uninstall_DevInst CM_Uninstall_DevNode
3193 #define CM_Uninstall_DevInst_Ex CM_Uninstall_DevNode_Ex
3196 #if (WINVER >= _WIN32_WINNT_WIN2K)
3198 #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
3203 CMP_WaitNoPendingInstallEvents(
3204 IN DWORD dwTimeout
);
3206 #endif /* (WINVER >= _WIN32_WINNT_WIN2K) */