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);
951 CM_Add_Empty_Log_Conf(
952 OUT PLOG_CONF plcLogConf
,
953 IN DEVINST dnDevInst
,
954 IN PRIORITY Priority
,
960 CM_Add_Empty_Log_Conf_Ex(
961 OUT PLOG_CONF plcLogConf
,
962 IN DEVINST dnDevInst
,
963 IN PRIORITY Priority
,
965 IN HMACHINE hMachine
);
971 IN DEVINST dnDevInst
,
979 IN DEVINST dnDevInst
,
982 IN HMACHINE hMachine
);
988 IN DEVINST dnDevInst
,
991 IN HMACHINE hMachine
);
997 IN DEVINST dnDevInst
,
1002 #define CM_Add_ID CM_Add_IDW
1003 #define CM_Add_ID_Ex CM_Add_ID_ExW
1005 #define CM_Add_ID CM_Add_IDA
1006 #define CM_Add_ID_Ex CM_Add_ID_ExA
1007 #endif /* UNICODE */
1013 IN DWORDLONG ullStartValue
,
1014 IN DWORDLONG ullEndValue
,
1022 OUT PRES_DES prdResDes OPTIONAL
,
1023 IN LOG_CONF lcLogConf
,
1024 IN RESOURCEID ResourceID
,
1025 IN PCVOID ResourceData
,
1026 IN ULONG ResourceLen
,
1033 OUT PRES_DES prdResDes OPTIONAL
,
1034 IN LOG_CONF lcLogConf
,
1035 IN RESOURCEID ResourceID
,
1036 IN PCVOID ResourceData
,
1037 IN ULONG ResourceLen
,
1039 IN HMACHINE hMachine
);
1044 CM_Connect_MachineA(
1045 IN PCSTR UNCServerName OPTIONAL
,
1046 OUT PHMACHINE phMachine
);
1051 CM_Connect_MachineW(
1052 IN PCWSTR UNCServerName OPTIONAL
,
1053 OUT PHMACHINE phMachine
);
1056 #define CM_Connect_Machine CM_Connect_MachineW
1058 #define CM_Connect_Machine CM_Connect_MachineA
1059 #endif /* UNICODE */
1065 OUT PDEVINST pdnDevInst
,
1066 IN DEVINSTID_A pDeviceID
,
1067 IN DEVINST dnParent
,
1074 OUT PDEVINST pdnDevInst
,
1075 IN DEVINSTID_W pDeviceID
,
1076 IN DEVINST dnParent
,
1082 CM_Create_DevNode_ExA(
1083 OUT PDEVINST pdnDevInst
,
1084 IN DEVINSTID_A pDeviceID
,
1085 IN DEVINST dnParent
,
1087 IN HANDLE hMachine
);
1092 CM_Create_DevNode_ExW(
1093 OUT PDEVINST pdnDevInst
,
1094 IN DEVINSTID_W pDeviceID
,
1095 IN DEVINST dnParent
,
1097 IN HANDLE hMachine
);
1099 #define CM_Create_DevInstW CM_Create_DevNodeW
1100 #define CM_Create_DevInstA CM_Create_DevNodeA
1101 #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
1102 #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
1104 #define CM_Create_DevNode CM_Create_DevNodeW
1105 #define CM_Create_DevInst CM_Create_DevNodeW
1106 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
1107 #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
1109 #define CM_Create_DevNode CM_Create_DevNodeA
1110 #define CM_Create_DevInst CM_Create_DevNodeA
1111 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
1112 #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
1113 #endif /* UNICODE */
1118 CM_Create_Range_List(
1119 OUT PRANGE_LIST prlh
,
1125 CM_Delete_Class_Key(
1126 IN LPGUID ClassGuid
,
1132 CM_Delete_Class_Key_Ex(
1133 IN LPGUID ClassGuid
,
1135 IN HANDLE hMachine
);
1140 CM_Delete_DevNode_Key(
1141 IN DEVNODE dnDevNode
,
1142 IN ULONG ulHardwareProfile
,
1148 CM_Delete_DevNode_Key_Ex(
1149 IN DEVNODE dnDevNode
,
1150 IN ULONG ulHardwareProfile
,
1152 IN HANDLE hMachine
);
1154 #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
1155 #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
1161 IN DWORDLONG ullStartValue
,
1162 IN DWORDLONG ullEndValue
,
1169 CM_Detect_Resource_Conflict(
1170 IN DEVINST dnDevInst
,
1171 IN RESOURCEID ResourceID
,
1172 IN PCVOID ResourceData
,
1173 IN ULONG ResourceLen
,
1174 OUT PBOOL pbConflictDetected
,
1180 CM_Detect_Resource_Conflict_Ex(
1181 IN DEVINST dnDevInst
,
1182 IN RESOURCEID ResourceID
,
1183 IN PCVOID ResourceData
,
1184 IN ULONG ResourceLen
,
1185 OUT PBOOL pbConflictDetected
,
1187 IN HMACHINE hMachine OPTIONAL
);
1193 IN DEVINST dnDevInst
,
1199 CM_Disable_DevNode_Ex(
1200 IN DEVINST dnDevInst
,
1202 IN HMACHINE hMachine OPTIONAL
);
1204 #define CM_Disable_DevInst CM_Disable_DevNode
1205 #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
1210 CM_Disconnect_Machine(
1211 IN HMACHINE hMachine OPTIONAL
);
1217 IN RANGE_LIST rlhOld
,
1218 IN RANGE_LIST rlhNew
,
1225 IN DEVINST dnDevInst
,
1231 CM_Enable_DevNode_Ex(
1232 IN DEVINST dnDevInst
,
1234 IN HMACHINE hMachine OPTIONAL
);
1236 #define CM_Enable_DevInst CM_Enable_DevNode
1237 #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
1242 CM_Enumerate_Classes(
1243 IN ULONG ulClassIndex
,
1244 OUT LPGUID ClassGuid
,
1250 CM_Enumerate_Classes_Ex(
1251 IN ULONG ulClassIndex
,
1252 OUT LPGUID ClassGuid
,
1254 IN HMACHINE hMachine OPTIONAL
);
1259 CM_Enumerate_EnumeratorsA(
1260 IN ULONG ulEnumIndex
,
1262 IN OUT PULONG pulLength
,
1268 CM_Enumerate_Enumerators_ExA(
1269 IN ULONG ulEnumIndex
,
1271 IN OUT PULONG pulLength
,
1273 IN HMACHINE hMachine OPTIONAL
);
1278 CM_Enumerate_Enumerators_ExW(
1279 IN ULONG ulEnumIndex
,
1281 IN OUT PULONG pulLength
,
1283 IN HMACHINE hMachine OPTIONAL
);
1288 CM_Enumerate_EnumeratorsW(
1289 IN ULONG ulEnumIndex
,
1291 IN OUT PULONG pulLength
,
1295 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
1296 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
1298 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
1299 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
1300 #endif /* UNICODE */
1306 OUT PDWORDLONG pullStart
,
1307 IN DWORDLONG ullStart
,
1309 IN DWORDLONG ullAlignment
,
1310 IN DWORDLONG ullEnd
,
1319 OUT PDWORDLONG pullStart
,
1320 OUT PDWORDLONG pullEnd
,
1321 OUT PRANGE_ELEMENT preElement
,
1328 IN LOG_CONF lcLogConfToBeFreed
,
1334 CM_Free_Log_Conf_Ex(
1335 IN LOG_CONF lcLogConfToBeFreed
,
1337 IN HMACHINE hMachine
);
1342 CM_Free_Log_Conf_Handle(
1343 IN LOG_CONF lcLogConf
);
1356 OUT PRES_DES prdResDes
,
1357 IN RES_DES rdResDes
,
1364 OUT PRES_DES prdResDes
,
1365 IN RES_DES rdResDes
,
1367 IN HMACHINE hMachine
);
1372 CM_Free_Res_Des_Handle(
1373 IN RES_DES rdResDes
);
1378 CM_Free_Resource_Conflict_Handle(
1379 IN CONFLICT_LIST clConflictList
);
1385 OUT PDEVINST pdnDevInst
,
1386 IN DEVINST dnDevInst
,
1393 OUT PDEVINST pdnDevInst
,
1394 IN DEVINST dnDevInst
,
1396 IN HMACHINE hMachine
);
1402 IN LPGUID ClassGuid
,
1404 IN OUT PULONG pulLength
,
1411 IN LPGUID ClassGuid
,
1413 IN OUT PULONG pulLength
,
1419 CM_Get_Class_Name_ExA(
1420 IN LPGUID ClassGuid
,
1422 IN OUT PULONG pulLength
,
1424 IN HMACHINE hMachine
);
1429 CM_Get_Class_Name_ExW(
1430 IN LPGUID ClassGuid
,
1432 IN OUT PULONG pulLength
,
1434 IN HMACHINE hMachine
);
1437 #define CM_Get_Class_Name CM_Get_Class_NameW
1438 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
1440 #define CM_Get_Class_Name CM_Get_Class_NameA
1441 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
1442 #endif /* UNICODE */
1447 CM_Get_Class_Key_NameA(
1448 IN LPGUID ClassGuid
,
1449 OUT LPSTR pszKeyName
,
1450 IN OUT PULONG pulLength
,
1456 CM_Get_Class_Key_NameW(
1457 IN LPGUID ClassGuid
,
1458 OUT LPWSTR pszKeyName
,
1459 IN OUT PULONG pulLength
,
1465 CM_Get_Class_Key_Name_ExA(
1466 IN LPGUID ClassGuid
,
1467 OUT LPSTR pszKeyName
,
1468 IN OUT PULONG pulLength
,
1470 IN HMACHINE hMachine
);
1475 CM_Get_Class_Key_Name_ExW(
1476 IN LPGUID ClassGuid
,
1477 OUT LPWSTR pszKeyName
,
1478 IN OUT PULONG pulLength
,
1480 IN HMACHINE hMachine
);
1483 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
1484 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
1486 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
1487 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
1488 #endif /* UNICODE */
1494 OUT PULONG pulDepth
,
1495 IN DEVINST dnDevInst
,
1502 OUT PULONG pulDepth
,
1503 IN DEVINST dnDevInst
,
1505 IN HMACHINE hMachine
);
1511 IN DEVINST dnDevInst
,
1519 CM_Get_Device_ID_ExA(
1520 IN DEVINST dnDevInst
,
1524 IN HMACHINE hMachine
);
1529 CM_Get_Device_ID_ExW(
1530 IN DEVINST dnDevInst
,
1534 IN HMACHINE hMachine
);
1540 IN DEVINST dnDevInst
,
1546 #define CM_Get_Device_ID CM_Get_Device_IDW
1547 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
1549 #define CM_Get_Device_ID CM_Get_Device_IDA
1550 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
1551 #endif /* UNICODE */
1556 CM_Get_Device_ID_ListA(
1557 IN PCSTR pszFilter OPTIONAL
,
1565 CM_Get_Device_ID_List_ExA(
1566 IN PCSTR pszFilter OPTIONAL
,
1570 IN HMACHINE hMachine
);
1575 CM_Get_Device_ID_List_ExW(
1576 IN PCWSTR pszFilter OPTIONAL
,
1580 IN HMACHINE hMachine
);
1585 CM_Get_Device_ID_ListW(
1586 IN PCWSTR pszFilter OPTIONAL
,
1592 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
1593 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
1595 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
1596 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
1597 #endif /* UNICODE */
1602 CM_Get_Device_ID_List_SizeA(
1604 IN PCSTR pszFilter OPTIONAL
,
1610 CM_Get_Device_ID_List_Size_ExA(
1612 IN PCSTR pszFilter OPTIONAL
,
1614 IN HMACHINE hMachine
);
1619 CM_Get_Device_ID_List_Size_ExW(
1621 IN PCWSTR pszFilter OPTIONAL
,
1623 IN HMACHINE hMachine
);
1628 CM_Get_Device_ID_List_SizeW(
1630 IN PCWSTR pszFilter OPTIONAL
,
1634 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
1635 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
1637 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
1638 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
1639 #endif /* UNICODE */
1644 CM_Get_Device_ID_Size(
1646 IN DEVINST dnDevInst
,
1652 CM_Get_Device_ID_Size_Ex(
1654 IN DEVINST dnDevInst
,
1656 IN HMACHINE hMachine
);
1661 CM_Get_DevNode_Registry_PropertyA(
1662 IN DEVINST dnDevInst
,
1663 IN ULONG ulProperty
,
1664 OUT PULONG pulRegDataType OPTIONAL
,
1665 OUT PVOID Buffer OPTIONAL
,
1666 IN OUT PULONG pulLength
,
1672 CM_Get_DevNode_Registry_PropertyW(
1673 IN DEVINST dnDevInst
,
1674 IN ULONG ulProperty
,
1675 OUT PULONG pulRegDataType OPTIONAL
,
1676 OUT PVOID Buffer OPTIONAL
,
1677 IN OUT PULONG pulLength
,
1683 CM_Get_DevNode_Registry_Property_ExA(
1684 IN DEVINST dnDevInst
,
1685 IN ULONG ulProperty
,
1686 OUT PULONG pulRegDataType OPTIONAL
,
1687 OUT PVOID Buffer OPTIONAL
,
1688 IN OUT PULONG pulLength
,
1690 IN HMACHINE hMachine
);
1695 CM_Get_DevNode_Registry_Property_ExW(
1696 IN DEVINST dnDevInst
,
1697 IN ULONG ulProperty
,
1698 OUT PULONG pulRegDataType OPTIONAL
,
1699 OUT PVOID Buffer OPTIONAL
,
1700 IN OUT PULONG pulLength
,
1702 IN HMACHINE hMachine
);
1704 #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
1705 #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
1706 #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
1707 #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
1710 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
1711 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1712 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
1713 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1715 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
1716 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1717 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
1718 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1719 #endif /* UNICODE */
1721 #if (WINVER >= _WIN32_WINNT_WINXP)
1726 CM_Get_DevNode_Custom_PropertyA(
1727 IN DEVINST dnDevInst
,
1728 IN PCSTR pszCustomPropertyName
,
1729 OUT PULONG pulRegDataType OPTIONAL
,
1730 OUT PVOID Buffer OPTIONAL
,
1731 IN OUT PULONG pulLength
,
1737 CM_Get_DevNode_Custom_PropertyW(
1738 IN DEVINST dnDevInst
,
1739 IN PCWSTR pszCustomPropertyName
,
1740 OUT PULONG pulRegDataType OPTIONAL
,
1741 OUT PVOID Buffer OPTIONAL
,
1742 IN OUT PULONG pulLength
,
1748 CM_Get_DevNode_Custom_Property_ExA(
1749 IN DEVINST dnDevInst
,
1750 IN PCSTR pszCustomPropertyName
,
1751 OUT PULONG pulRegDataType OPTIONAL
,
1752 OUT PVOID Buffer OPTIONAL
,
1753 IN OUT PULONG pulLength
,
1755 IN HMACHINE hMachine OPTIONAL
);
1760 CM_Get_DevNode_Custom_Property_ExW(
1761 IN DEVINST dnDevInst
,
1762 IN PCWSTR pszCustomPropertyName
,
1763 OUT PULONG pulRegDataType OPTIONAL
,
1764 OUT PVOID Buffer OPTIONAL
,
1765 IN OUT PULONG pulLength
,
1767 IN HMACHINE hMachine OPTIONAL
);
1769 #define CM_Get_DevInst_Custom_PropertyW CM_Get_DevNode_Custom_PropertyW
1770 #define CM_Get_DevInst_Custom_PropertyA CM_Get_DevNode_Custom_PropertyA
1771 #define CM_Get_DevInst_Custom_Property_ExW CM_Get_DevNode_Custom_Property_ExW
1772 #define CM_Get_DevInst_Custom_Property_ExA CM_Get_DevNode_Custom_Property_ExA
1774 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyW
1775 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1776 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyW
1777 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1779 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyA
1780 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1781 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyA
1782 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1785 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
1790 CM_Get_DevNode_Status(
1791 OUT PULONG pulStatus
,
1792 OUT PULONG pulProblemNumber
,
1793 IN DEVINST dnDevInst
,
1799 CM_Get_DevNode_Status_Ex(
1800 OUT PULONG pulStatus
,
1801 OUT PULONG pulProblemNumber
,
1802 IN DEVINST dnDevInst
,
1804 IN HMACHINE hMachine
);
1806 #define CM_Get_DevInst_Status CM_Get_DevNode_Status
1807 #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
1812 CM_Get_First_Log_Conf(
1813 OUT PLOG_CONF plcLogConf OPTIONAL
,
1814 IN DEVINST dnDevInst
,
1820 CM_Get_First_Log_Conf_Ex(
1821 OUT PLOG_CONF plcLogConf OPTIONAL
,
1822 IN DEVINST dnDevInst
,
1824 IN HMACHINE hMachine OPTIONAL
);
1829 CM_Get_Global_State(
1830 OUT PULONG pulState
,
1836 CM_Get_Global_State_Ex(
1837 OUT PULONG pulState
,
1839 IN HMACHINE hMachine
);
1844 CM_Get_Hardware_Profile_InfoA(
1846 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1852 CM_Get_Hardware_Profile_Info_ExA(
1854 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1856 IN HMACHINE hMachine OPTIONAL
);
1861 CM_Get_Hardware_Profile_InfoW(
1863 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1869 CM_Get_Hardware_Profile_Info_ExW(
1871 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1873 IN HMACHINE hMachine OPTIONAL
);
1876 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoW
1877 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExW
1879 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoA
1880 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExA
1886 CM_Get_HW_Prof_FlagsA(
1887 IN DEVINSTID_A szDevInstName
,
1888 IN ULONG ulHardwareProfile
,
1889 OUT PULONG pulValue
,
1895 CM_Get_HW_Prof_FlagsW(
1896 IN DEVINSTID_W szDevInstName
,
1897 IN ULONG ulHardwareProfile
,
1898 OUT PULONG pulValue
,
1904 CM_Get_HW_Prof_Flags_ExA(
1905 IN DEVINSTID_A szDevInstName
,
1906 IN ULONG ulHardwareProfile
,
1907 OUT PULONG pulValue
,
1909 IN HMACHINE hMachine
);
1914 CM_Get_HW_Prof_Flags_ExW(
1915 IN DEVINSTID_W szDevInstName
,
1916 IN ULONG ulHardwareProfile
,
1917 OUT PULONG pulValue
,
1919 IN HMACHINE hMachine
);
1922 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
1923 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
1925 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
1926 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
1932 CM_Get_Device_Interface_AliasA(
1933 IN LPCSTR pszDeviceInterface
,
1934 IN LPGUID AliasInterfaceGuid
,
1935 OUT LPSTR pszAliasDeviceInterface
,
1936 IN OUT PULONG pulLength
,
1942 CM_Get_Device_Interface_AliasW(
1943 IN LPCWSTR pszDeviceInterface
,
1944 IN LPGUID AliasInterfaceGuid
,
1945 OUT LPWSTR pszAliasDeviceInterface
,
1946 IN OUT PULONG pulLength
,
1952 CM_Get_Device_Interface_Alias_ExA(
1953 IN LPCSTR pszDeviceInterface
,
1954 IN LPGUID AliasInterfaceGuid
,
1955 OUT LPSTR pszAliasDeviceInterface
,
1956 IN OUT PULONG pulLength
,
1958 IN HMACHINE hMachine OPTIONAL
);
1963 CM_Get_Device_Interface_Alias_ExW(
1964 IN LPCWSTR pszDeviceInterface
,
1965 IN LPGUID AliasInterfaceGuid
,
1966 OUT LPWSTR pszAliasDeviceInterface
,
1967 IN OUT PULONG pulLength
,
1969 IN HMACHINE hMachine OPTIONAL
);
1972 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasW
1973 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExW
1975 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasA
1976 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExA
1982 CM_Get_Device_Interface_ListA(
1983 IN LPGUID InterfaceClassGuid
,
1984 IN DEVINSTID_A pDeviceID OPTIONAL
,
1992 CM_Get_Device_Interface_ListW(
1993 IN LPGUID InterfaceClassGuid
,
1994 IN DEVINSTID_W pDeviceID OPTIONAL
,
2002 CM_Get_Device_Interface_List_ExA(
2003 IN LPGUID InterfaceClassGuid
,
2004 IN DEVINSTID_A pDeviceID OPTIONAL
,
2008 IN HMACHINE hMachine OPTIONAL
);
2013 CM_Get_Device_Interface_List_ExW(
2014 IN LPGUID InterfaceClassGuid
,
2015 IN DEVINSTID_W pDeviceID OPTIONAL
,
2019 IN HMACHINE hMachine OPTIONAL
);
2022 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListW
2023 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExW
2025 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListA
2026 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExA
2032 CM_Get_Device_Interface_List_SizeA(
2034 IN LPGUID InterfaceClassGuid
,
2035 IN DEVINSTID_A pDeviceID OPTIONAL
,
2041 CM_Get_Device_Interface_List_SizeW(
2043 IN LPGUID InterfaceClassGuid
,
2044 IN DEVINSTID_W pDeviceID OPTIONAL
,
2050 CM_Get_Device_Interface_List_Size_ExA(
2052 IN LPGUID InterfaceClassGuid
,
2053 IN DEVINSTID_A pDeviceID OPTIONAL
,
2055 IN HMACHINE hMachine OPTIONAL
);
2060 CM_Get_Device_Interface_List_Size_ExW(
2062 IN LPGUID InterfaceClassGuid
,
2063 IN DEVINSTID_W pDeviceID OPTIONAL
,
2065 IN HMACHINE hMachine OPTIONAL
);
2068 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeW
2069 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExW
2071 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeA
2072 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExA
2078 CM_Get_Log_Conf_Priority(
2079 IN LOG_CONF lcLogConf
,
2080 OUT PPRIORITY pPriority
,
2086 CM_Get_Log_Conf_Priority_Ex(
2087 IN LOG_CONF lcLogConf
,
2088 OUT PPRIORITY pPriority
,
2090 IN HMACHINE hMachine
);
2095 CM_Get_Next_Log_Conf(
2096 OUT PLOG_CONF plcLogConf OPTIONAL
,
2097 IN LOG_CONF lcLogConf
,
2103 CM_Get_Next_Log_Conf_Ex(
2104 OUT PLOG_CONF plcLogConf OPTIONAL
,
2105 IN LOG_CONF lcLogConf
,
2107 IN HMACHINE hMachine
);
2112 CM_Get_Next_Res_Des(
2113 OUT PRES_DES prdResDes
,
2114 IN RES_DES rdResDes
,
2115 IN RESOURCEID ForResource
,
2116 OUT PRESOURCEID pResourceID
,
2122 CM_Get_Next_Res_Des_Ex(
2123 OUT PRES_DES prdResDes
,
2124 IN RES_DES rdResDes
,
2125 IN RESOURCEID ForResource
,
2126 OUT PRESOURCEID pResourceID
,
2128 IN HMACHINE hMachine
);
2134 OUT PDEVINST pdnDevInst
,
2135 IN DEVINST dnDevInst
,
2142 OUT PDEVINST pdnDevInst
,
2143 IN DEVINST dnDevInst
,
2145 IN HMACHINE hMachine
);
2150 CM_Get_Res_Des_Data(
2151 IN RES_DES rdResDes
,
2159 CM_Get_Res_Des_Data_Ex(
2160 IN RES_DES rdResDes
,
2164 IN HMACHINE hMachine
);
2169 CM_Get_Res_Des_Data_Size(
2171 IN RES_DES rdResDes
,
2177 CM_Get_Res_Des_Data_Size_Ex(
2179 IN RES_DES rdResDes
,
2181 IN HMACHINE hMachine
);
2186 CM_Get_Resource_Conflict_Count(
2187 IN CONFLICT_LIST clConflictList
,
2188 OUT PULONG pulCount
);
2193 CM_Get_Resource_Conflict_DetailsA(
2194 IN CONFLICT_LIST clConflictList
,
2196 IN OUT PCONFLICT_DETAILS_A pConflictDetails
);
2201 CM_Get_Resource_Conflict_DetailsW(
2202 IN CONFLICT_LIST clConflictList
,
2204 IN OUT PCONFLICT_DETAILS_W pConflictDetails
);
2207 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
2209 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
2210 #endif /* UNICODE */
2215 CM_Get_Class_Registry_PropertyW(
2216 IN LPGUID ClassGuid
,
2217 IN ULONG ulProperty
,
2218 OUT PULONG pulRegDataType OPTIONAL
,
2219 OUT PVOID Buffer OPTIONAL
,
2220 IN OUT PULONG pulLength
,
2222 IN HMACHINE hMachine OPTIONAL
);
2227 CM_Set_Class_Registry_PropertyW(
2228 IN LPGUID ClassGuid
,
2229 IN ULONG ulProperty
,
2230 IN PCVOID Buffer OPTIONAL
,
2233 IN HMACHINE hMachine OPTIONAL
);
2238 CM_Get_Class_Registry_PropertyA(
2239 IN LPGUID ClassGuid
,
2240 IN ULONG ulProperty
,
2241 OUT PULONG pulRegDataType OPTIONAL
,
2242 OUT PVOID Buffer OPTIONAL
,
2243 IN OUT PULONG pulLength
,
2245 IN HMACHINE hMachine OPTIONAL
);
2250 CM_Set_Class_Registry_PropertyA(
2251 IN LPGUID ClassGuid
,
2252 IN ULONG ulProperty
,
2253 IN PCVOID Buffer OPTIONAL
,
2256 IN HMACHINE hMachine OPTIONAL
);
2259 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyW
2260 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyW
2262 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyA
2263 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyA
2270 OUT PDEVINST pdnDevInst
,
2278 OUT PDEVINST pdnDevInst
,
2281 IN HMACHINE hMachine
);
2286 CM_Get_Version(VOID
);
2292 IN HMACHINE hMachine
);
2294 #if (WINVER >= _WIN32_WINNT_WINXP)
2299 CM_Is_Version_Available(
2305 CM_Is_Version_Available_Ex(
2307 IN HMACHINE hMachine OPTIONAL
);
2309 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
2314 CM_Intersect_Range_List(
2315 IN RANGE_LIST rlhOld1
,
2316 IN RANGE_LIST rlhOld2
,
2317 IN RANGE_LIST rlhNew
,
2323 CM_Invert_Range_List(
2324 IN RANGE_LIST rlhOld
,
2325 IN RANGE_LIST rlhNew
,
2326 IN DWORDLONG ullMaxValue
,
2332 CM_Is_Dock_Station_Present(
2333 OUT PBOOL pbPresent
);
2338 CM_Is_Dock_Station_Present_Ex(
2339 OUT PBOOL pbPresent
,
2340 IN HMACHINE hMachine OPTIONAL
);
2346 OUT PDEVINST pdnDevInst
,
2347 IN DEVINSTID_A pDeviceID OPTIONAL
,
2353 CM_Locate_DevNode_ExA(
2354 OUT PDEVINST pdnDevInst
,
2355 IN DEVINSTID_A pDeviceID OPTIONAL
,
2357 IN HMACHINE hMachine
);
2362 CM_Locate_DevNode_ExW(
2363 OUT PDEVINST pdnDevInst
,
2364 IN DEVINSTID_W pDeviceID OPTIONAL
,
2366 IN HMACHINE hMachine
);
2372 OUT PDEVINST pdnDevInst
,
2373 IN DEVINSTID_W pDeviceID OPTIONAL
,
2376 #define CM_Locate_DevInstA CM_Locate_DevNodeA
2377 #define CM_Locate_DevInstW CM_Locate_DevNodeW
2378 #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
2379 #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
2382 #define CM_Locate_DevNode CM_Locate_DevNodeW
2383 #define CM_Locate_DevInst CM_Locate_DevNodeW
2384 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
2385 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
2387 #define CM_Locate_DevNode CM_Locate_DevNodeA
2388 #define CM_Locate_DevInst CM_Locate_DevNodeA
2389 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
2390 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
2391 #endif /* UNICODE */
2396 CM_Merge_Range_List(
2397 IN RANGE_LIST rlhOld1
,
2398 IN RANGE_LIST rlhOld2
,
2399 IN RANGE_LIST rlhNew
,
2406 OUT PRES_DES prdResDes
,
2407 IN RES_DES rdResDes
,
2408 IN RESOURCEID ResourceID
,
2409 IN PCVOID ResourceData
,
2410 IN ULONG ResourceLen
,
2416 CM_Modify_Res_Des_Ex(
2417 OUT PRES_DES prdResDes
,
2418 IN RES_DES rdResDes
,
2419 IN RESOURCEID ResourceID
,
2420 IN PCVOID ResourceData
,
2421 IN ULONG ResourceLen
,
2423 IN HMACHINE hMachine
);
2429 IN DEVINST dnFromDevInst
,
2430 IN DEVINST dnToDevInst
,
2437 IN DEVINST dnFromDevInst
,
2438 IN DEVINST dnToDevInst
,
2440 IN HMACHINE hMachine OPTIONAL
);
2442 #define CM_Move_DevInst CM_Move_DevNode
2443 #define CM_Move_DevInst_Ex CM_Move_DevNode_Ex
2449 IN OUT PRANGE_ELEMENT preElement
,
2450 OUT PDWORDLONG pullStart
,
2451 OUT PDWORDLONG pullEnd
,
2458 IN LPGUID ClassGuid OPTIONAL
,
2459 IN LPCSTR pszClassName OPTIONAL
,
2460 IN REGSAM samDesired
,
2461 IN REGDISPOSITION Disposition
,
2469 IN LPGUID ClassGuid OPTIONAL
,
2470 IN LPCWSTR pszClassName OPTIONAL
,
2471 IN REGSAM samDesired
,
2472 IN REGDISPOSITION Disposition
,
2479 CM_Open_Class_Key_ExA(
2480 IN LPGUID pszClassGuid OPTIONAL
,
2481 IN LPCSTR pszClassName OPTIONAL
,
2482 IN REGSAM samDesired
,
2483 IN REGDISPOSITION Disposition
,
2486 IN HMACHINE hMachine
);
2491 CM_Open_Class_Key_ExW(
2492 IN LPGUID pszClassGuid OPTIONAL
,
2493 IN LPCWSTR pszClassName OPTIONAL
,
2494 IN REGSAM samDesired
,
2495 IN REGDISPOSITION Disposition
,
2498 IN HMACHINE hMachine
);
2501 #define CM_Open_Class_Key CM_Open_Class_KeyW
2502 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
2504 #define CM_Open_Class_Key CM_Open_Class_KeyA
2505 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
2506 #endif /* UNICODE */
2511 CM_Open_DevNode_Key(
2512 IN DEVINST dnDevNode
,
2513 IN REGSAM samDesired
,
2514 IN ULONG ulHardwareProfile
,
2515 IN REGDISPOSITION Disposition
,
2516 OUT PHKEY phkDevice
,
2522 CM_Open_DevNode_Key_Ex(
2523 IN DEVINST dnDevNode
,
2524 IN REGSAM samDesired
,
2525 IN ULONG ulHardwareProfile
,
2526 IN REGDISPOSITION Disposition
,
2527 OUT PHKEY phkDevice
,
2529 IN HMACHINE hMachine
);
2531 #define CM_Open_DevInst_Key CM_Open_DevNode_Key
2532 #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
2534 #if (WINVER >= _WIN32_WINNT_VISTA)
2539 CM_Open_Device_Interface_KeyA(
2540 IN LPCSTR pszDeviceInterface
,
2541 IN REGSAM samDesired
,
2542 IN REGDISPOSITION Disposition
,
2543 OUT PHKEY phkDeviceInterface
,
2549 CM_Open_Device_Interface_KeyW(
2550 IN LPCWSTR pszDeviceInterface
,
2551 IN REGSAM samDesired
,
2552 IN REGDISPOSITION Disposition
,
2553 OUT PHKEY phkDeviceInterface
,
2559 CM_Open_Device_Interface_Key_ExA(
2560 IN LPCSTR pszDeviceInterface
,
2561 IN REGSAM samDesired
,
2562 IN REGDISPOSITION Disposition
,
2563 OUT PHKEY phkDeviceInterface
,
2565 IN HMACHINE hMachine OPTIONAL
);
2570 CM_Open_Device_Interface_Key_ExW(
2571 IN LPCWSTR pszDeviceInterface
,
2572 IN REGSAM samDesired
,
2573 IN REGDISPOSITION Disposition
,
2574 OUT PHKEY phkDeviceInterface
,
2576 IN HMACHINE hMachine OPTIONAL
);
2579 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyW
2580 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExW
2582 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyA
2583 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExA
2589 CM_Delete_Device_Interface_KeyA(
2590 IN LPCSTR pszDeviceInterface
,
2596 CM_Delete_Device_Interface_KeyW(
2597 IN LPCWSTR pszDeviceInterface
,
2603 CM_Delete_Device_Interface_Key_ExA(
2604 IN LPCSTR pszDeviceInterface
,
2606 IN HMACHINE hMachine OPTIONAL
);
2611 CM_Delete_Device_Interface_Key_ExW(
2612 IN LPCWSTR pszDeviceInterface
,
2614 IN HMACHINE hMachine OPTIONAL
);
2617 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyW
2618 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExW
2620 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyA
2621 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExA
2624 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2629 CM_Query_Arbitrator_Free_Data(
2632 IN DEVINST dnDevInst
,
2633 IN RESOURCEID ResourceID
,
2639 CM_Query_Arbitrator_Free_Data_Ex(
2642 IN DEVINST dnDevInst
,
2643 IN RESOURCEID ResourceID
,
2645 IN HMACHINE hMachine OPTIONAL
);
2650 CM_Query_Arbitrator_Free_Size(
2652 IN DEVINST dnDevInst
,
2653 IN RESOURCEID ResourceID
,
2659 CM_Query_Arbitrator_Free_Size_Ex(
2661 IN DEVINST dnDevInst
,
2662 IN RESOURCEID ResourceID
,
2664 IN HMACHINE hMachine OPTIONAL
);
2669 CM_Query_Remove_SubTree(
2670 IN DEVINST dnAncestor
,
2676 CM_Query_Remove_SubTree_Ex(
2677 IN DEVINST dnAncestor
,
2679 IN HMACHINE hMachine OPTIONAL
);
2684 CM_Query_And_Remove_SubTreeA(
2685 IN DEVINST dnAncestor
,
2686 OUT PPNP_VETO_TYPE pVetoType
,
2687 OUT LPSTR pszVetoName
,
2688 IN ULONG ulNameLength
,
2694 CM_Query_And_Remove_SubTreeW(
2695 IN DEVINST dnAncestor
,
2696 OUT PPNP_VETO_TYPE pVetoType
,
2697 OUT LPWSTR pszVetoName
,
2698 IN ULONG ulNameLength
,
2704 CM_Query_And_Remove_SubTree_ExA(
2705 IN DEVINST dnAncestor
,
2706 OUT PPNP_VETO_TYPE pVetoType
,
2707 OUT LPSTR pszVetoName
,
2708 IN ULONG ulNameLength
,
2710 IN HMACHINE hMachine
);
2715 CM_Query_And_Remove_SubTree_ExW(
2716 IN DEVINST dnAncestor
,
2717 OUT PPNP_VETO_TYPE pVetoType
,
2718 OUT LPWSTR pszVetoName
,
2719 IN ULONG ulNameLength
,
2721 IN HMACHINE hMachine
);
2724 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeW
2725 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExW
2727 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeA
2728 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExA
2734 CM_Query_Resource_Conflict_List(
2735 OUT PCONFLICT_LIST pclConflictList
,
2736 IN DEVINST dnDevInst
,
2737 IN RESOURCEID ResourceID
,
2738 IN PCVOID ResourceData
,
2739 IN ULONG ResourceLen
,
2741 IN HMACHINE hMachine OPTIONAL
);
2746 CM_Reenumerate_DevNode(
2747 IN DEVINST dnDevInst
,
2753 CM_Reenumerate_DevNode_Ex(
2754 IN DEVINST dnDevInst
,
2756 IN HMACHINE hMachine
);
2758 #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
2759 #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
2764 CM_Register_Device_InterfaceA(
2765 IN DEVINST dnDevInst
,
2766 IN LPGUID InterfaceClassGuid
,
2767 IN LPCSTR pszReference OPTIONAL
,
2768 OUT LPSTR pszDeviceInterface
,
2769 IN OUT PULONG pulLength
,
2775 CM_Register_Device_InterfaceW(
2776 IN DEVINST dnDevInst
,
2777 IN LPGUID InterfaceClassGuid
,
2778 IN LPCWSTR pszReference OPTIONAL
,
2779 OUT LPWSTR pszDeviceInterface
,
2780 IN OUT PULONG pulLength
,
2786 CM_Register_Device_Interface_ExA(
2787 IN DEVINST dnDevInst
,
2788 IN LPGUID InterfaceClassGuid
,
2789 IN LPCSTR pszReference OPTIONAL
,
2790 OUT LPSTR pszDeviceInterface
,
2791 IN OUT PULONG pulLength
,
2793 IN HMACHINE hMachine OPTIONAL
);
2798 CM_Register_Device_Interface_ExW(
2799 IN DEVINST dnDevInst
,
2800 IN LPGUID InterfaceClassGuid
,
2801 IN LPCWSTR pszReference OPTIONAL
,
2802 OUT LPWSTR pszDeviceInterface
,
2803 IN OUT PULONG pulLength
,
2805 IN HMACHINE hMachine OPTIONAL
);
2808 #define CM_Register_Device_Interface CM_Register_Device_InterfaceW
2809 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExW
2811 #define CM_Register_Device_Interface CM_Register_Device_InterfaceA
2812 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExA
2818 CM_Request_Device_EjectA(
2819 IN DEVINST dnDevInst
,
2820 OUT PPNP_VETO_TYPE pVetoType
,
2821 OUT LPSTR pszVetoName
,
2822 IN ULONG ulNameLength
,
2828 CM_Request_Device_Eject_ExW(
2829 IN DEVINST dnDevInst
,
2830 OUT PPNP_VETO_TYPE pVetoType
,
2831 OUT LPWSTR pszVetoName
,
2832 IN ULONG ulNameLength
,
2834 IN HMACHINE hMachine
);
2839 CM_Request_Device_Eject_ExA(
2840 IN DEVINST dnDevInst
,
2841 OUT PPNP_VETO_TYPE pVetoType
,
2842 OUT LPSTR pszVetoName
,
2843 IN ULONG ulNameLength
,
2845 IN HMACHINE hMachine
);
2850 CM_Request_Device_EjectW(
2851 IN DEVINST dnDevInst
,
2852 OUT PPNP_VETO_TYPE pVetoType
,
2853 OUT LPWSTR pszVetoName
,
2854 IN ULONG ulNameLength
,
2858 #define CM_Request_Device_Eject CM_Request_Device_EjectW
2859 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
2861 #define CM_Request_Device_Eject CM_Request_Device_EjectA
2862 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
2868 CM_Request_Eject_PC(VOID
);
2873 CM_Request_Eject_PC_Ex(
2874 IN HMACHINE hMachine OPTIONAL
);
2885 CM_Run_Detection_Ex(
2887 IN HMACHINE hMachine OPTIONAL
);
2889 #if (WINVER >= _WIN32_WINNT_VISTA)
2892 CM_Apply_PowerScheme(VOID
);
2895 CM_Write_UserPowerKey(
2896 IN CONST GUID
*SchemeGuid OPTIONAL
,
2897 IN CONST GUID
*SubGroupOfPowerSettingsGuid OPTIONAL
,
2898 IN CONST GUID
*PowerSettingGuid OPTIONAL
,
2899 IN ULONG AccessFlags
,
2902 IN DWORD BufferSize
,
2906 CM_Set_ActiveScheme(
2907 IN CONST GUID
*SchemeGuid
,
2911 CM_Restore_DefaultPowerScheme(
2912 IN CONST GUID
*SchemeGuid
,
2916 CM_RestoreAll_DefaultPowerSchemes(
2920 CM_Duplicate_PowerScheme(
2921 IN CONST GUID
*SourceSchemeGuid
,
2922 IN GUID
**DestinationSchemeGuid
,
2926 CM_Delete_PowerScheme(
2927 IN CONST GUID
*SchemeGuid
,
2931 CM_Import_PowerScheme(
2932 IN LPCWSTR ImportFileNamePath
,
2933 IN OUT GUID
**DestinationSchemeGuid
,
2936 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2941 CM_Set_DevNode_Problem(
2942 IN DEVINST dnDevInst
,
2949 CM_Set_DevNode_Problem_Ex(
2950 IN DEVINST dnDevInst
,
2953 IN HMACHINE hMachine
);
2955 #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
2956 #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
2961 CM_Unregister_Device_InterfaceA(
2962 IN LPCSTR pszDeviceInterface
,
2968 CM_Unregister_Device_InterfaceW(
2969 IN LPCWSTR pszDeviceInterface
,
2975 CM_Unregister_Device_Interface_ExA(
2976 IN LPCSTR pszDeviceInterface
,
2978 IN HMACHINE hMachine OPTIONAL
);
2983 CM_Unregister_Device_Interface_ExW(
2984 IN LPCWSTR pszDeviceInterface
,
2986 IN HMACHINE hMachine OPTIONAL
);
2989 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceW
2990 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExW
2992 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceA
2993 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExA
2999 CM_Register_Device_Driver(
3000 IN DEVINST dnDevInst
,
3006 CM_Register_Device_Driver_Ex(
3007 IN DEVINST dnDevInst
,
3009 IN HMACHINE hMachine OPTIONAL
);
3015 IN DEVINST dnAncestor
,
3021 CM_Remove_SubTree_Ex(
3022 IN DEVINST dnAncestor
,
3024 IN HMACHINE hMachine OPTIONAL
);
3029 CM_Set_DevNode_Registry_PropertyA(
3030 IN DEVINST dnDevInst
,
3031 IN ULONG ulProperty
,
3032 IN PCVOID Buffer OPTIONAL
,
3039 CM_Set_DevNode_Registry_PropertyW(
3040 IN DEVINST dnDevInst
,
3041 IN ULONG ulProperty
,
3042 IN PCVOID Buffer OPTIONAL
,
3049 CM_Set_DevNode_Registry_Property_ExA(
3050 IN DEVINST dnDevInst
,
3051 IN ULONG ulProperty
,
3052 IN PCVOID Buffer OPTIONAL
,
3055 IN HMACHINE hMachine
);
3060 CM_Set_DevNode_Registry_Property_ExW(
3061 IN DEVINST dnDevInst
,
3062 IN ULONG ulProperty
,
3063 IN PCVOID Buffer OPTIONAL
,
3066 IN HMACHINE hMachine
);
3068 #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
3069 #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
3070 #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
3071 #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
3074 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
3075 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3076 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
3077 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3079 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
3080 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3081 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
3082 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3083 #endif /* UNICODE */
3089 IN ULONG ulHardwareProfile
,
3096 IN ULONG ulHardwareProfile
,
3098 IN HMACHINE hMachine
);
3103 CM_Set_HW_Prof_FlagsA(
3104 IN DEVINSTID_A szDevInstName
,
3112 CM_Set_HW_Prof_FlagsW(
3113 IN DEVINSTID_W szDevInstName
,
3121 CM_Set_HW_Prof_Flags_ExA(
3122 IN DEVINSTID_A szDevInstName
,
3126 IN HMACHINE hMachine
);
3131 CM_Set_HW_Prof_Flags_ExW(
3132 IN DEVINSTID_W szDevInstName
,
3136 IN HMACHINE hMachine
);
3139 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
3140 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
3142 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
3143 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
3144 #endif /* UNICODE */
3150 IN DEVINST dnDevInst
,
3156 CM_Setup_DevNode_Ex(
3157 IN DEVINST dnDevInst
,
3159 IN HMACHINE hMachine OPTIONAL
);
3161 #define CM_Setup_DevInst CM_Setup_DevNode
3162 #define CM_Setup_DevInst_Ex CM_Setup_DevNode_Ex
3167 CM_Test_Range_Available(
3168 IN DWORDLONG ullStartValue
,
3169 IN DWORDLONG ullEndValue
,
3176 CM_Uninstall_DevNode(
3177 IN DEVINST dnPhantom
,
3183 CM_Uninstall_DevNode_Ex(
3184 IN DEVINST dnPhantom
,
3186 IN HMACHINE hMachine
);
3188 #define CM_Uninstall_DevInst CM_Uninstall_DevNode
3189 #define CM_Uninstall_DevInst_Ex CM_Uninstall_DevNode_Ex
3192 #if (WINVER >= _WIN32_WINNT_WIN2K)
3194 #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
3199 CMP_WaitNoPendingInstallEvents(
3200 IN DWORD dwTimeout
);
3202 #endif /* (WINVER >= _WIN32_WINNT_WIN2K) */