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.
35 #if defined(_CFGMGR32_)
38 #define CMAPI DECLSPEC_IMPORT
41 typedef CONST VOID
*PCVOID
;
43 #define MAX_CONFIG_VALUE 9999
44 #define MAX_INSTANCE_VALUE 9999
46 #define MAX_DEVICE_ID_LEN 200
47 #define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
49 #define MAX_CLASS_NAME_LEN 32
50 #define MAX_GUID_STRING_LEN 39
51 #define MAX_PROFILE_LEN 80
53 #define MAX_MEM_REGISTERS 9
54 #define MAX_IO_PORTS 20
56 #define MAX_DMA_CHANNELS 7
58 #define DWORD_MAX 0xffffffffUL
59 #define DWORDLONG_MAX 0xffffffffffffffffui64
61 #define CONFIGMG_VERSION 0x0400
65 typedef unsigned __int64 DWORDLONG
;
66 typedef DWORDLONG
*PDWORDLONG
;
68 #endif /* NT_INCLUDED */
70 typedef DWORD RETURN_TYPE
;
71 typedef RETURN_TYPE CONFIGRET
;
73 typedef DWORD DEVNODE
, DEVINST
;
74 typedef DEVNODE
*PDEVNODE
, *PDEVINST
;
76 typedef CHAR
*DEVNODEID_A
, *DEVINSTID_A
;
77 typedef WCHAR
*DEVNODEID_W
, *DEVINSTID_W
;
80 typedef DEVNODEID_W DEVNODEID
;
81 typedef DEVINSTID_W DEVINSTID
;
83 typedef DEVNODEID_A DEVNODEID
;
84 typedef DEVINSTID_A DEVINSTID
;
87 typedef DWORD_PTR LOG_CONF
;
88 typedef LOG_CONF
*PLOG_CONF
;
90 typedef DWORD_PTR RES_DES
;
91 typedef RES_DES
*PRES_DES
;
93 typedef ULONG RESOURCEID
;
94 typedef RESOURCEID
*PRESOURCEID
;
96 typedef ULONG PRIORITY
;
97 typedef PRIORITY
*PPRIORITY
;
99 typedef DWORD_PTR RANGE_LIST
;
100 typedef RANGE_LIST
*PRANGE_LIST
;
102 typedef DWORD_PTR RANGE_ELEMENT
;
103 typedef RANGE_ELEMENT
*PRANGE_ELEMENT
;
105 typedef HANDLE HMACHINE
;
106 typedef HMACHINE
*PHMACHINE
;
108 typedef ULONG_PTR CONFLICT_LIST
;
109 typedef CONFLICT_LIST
*PCONFLICT_LIST
;
111 typedef struct _CONFLICT_DETAILS_A
{
114 DEVINST CD_dnDevInst
;
117 CHAR CD_szDescription
[MAX_PATH
];
118 } CONFLICT_DETAILS_A
, *PCONFLICT_DETAILS_A
;
120 typedef struct _CONFLICT_DETAILS_W
{
123 DEVINST CD_dnDevInst
;
126 WCHAR CD_szDescription
[MAX_PATH
];
127 } CONFLICT_DETAILS_W
, *PCONFLICT_DETAILS_W
;
130 typedef CONFLICT_DETAILS_W CONFLICT_DETAILS
;
131 typedef PCONFLICT_DETAILS_W PCONFLICT_DETAILS
;
133 typedef CONFLICT_DETAILS_A CONFLICT_DETAILS
;
134 typedef PCONFLICT_DETAILS_A PCONFLICT_DETAILS
;
137 /* CONFLICT_DETAILS.CD.ulMask constants */
138 #define CM_CDMASK_DEVINST 0x00000001
139 #define CM_CDMASK_RESDES 0x00000002
140 #define CM_CDMASK_FLAGS 0x00000004
141 #define CM_CDMASK_DESCRIPTION 0x00000008
142 #define CM_CDMASK_VALID 0x0000000F
144 /* CONFLICT_DETAILS.CD.ulFlags constants */
145 #define CM_CDFLAGS_DRIVER 0x00000001
146 #define CM_CDFLAGS_ROOT_OWNED 0x00000002
147 #define CM_CDFLAGS_RESERVED 0x00000004
149 typedef ULONG REGDISPOSITION
;
151 #include <pshpack1.h>
153 /* MEM_DES.MD_Flags constants */
154 #define mMD_MemoryType 0x1
155 #define fMD_MemoryType mMD_MemoryType
159 #define mMD_32_24 0x2
160 #define fMD_32_24 mMD_32_24
164 #define mMD_Prefetchable 0x4
165 #define fMD_Prefetchable mMD_Prefetchable
166 #define fMD_Pref mMD_Prefetchable
167 #define fMD_PrefetchDisallowed 0x0
168 #define fMD_PrefetchAllowed 0x4
170 #define mMD_Readable 0x8
171 #define fMD_Readable mMD_Readable
172 #define fMD_ReadAllowed 0x0
173 #define fMD_ReadDisallowed 0x8
175 #define mMD_CombinedWrite 0x10
176 #define fMD_CombinedWrite mMD_CombinedWrite
177 #define fMD_CombinedWriteDisallowed 0x0
178 #define fMD_CombinedWriteAllowed 0x10
180 #define mMD_Cacheable 0x20
181 #define fMD_NonCacheable 0x0
182 #define fMD_Cacheable 0x20
183 #define fMD_WINDOW_DECODE 0x40
184 #define fMD_MEMORY_BAR 0x80
186 typedef struct Mem_Range_s
{
193 } MEM_RANGE
, *PMEM_RANGE
;
195 typedef struct Mem_Des_s
{
198 DWORDLONG MD_Alloc_Base
;
199 DWORDLONG MD_Alloc_End
;
202 } MEM_DES
, *PMEM_DES
;
204 typedef struct Mem_Resource_s
{
206 MEM_RANGE MEM_Data
[ANYSIZE_ARRAY
];
207 } MEM_RESOURCE
, *PMEM_RESOURCE
;
209 #define MType_Range sizeof(MEM_RANGE)
211 typedef struct Mem_Large_Range_s
{
213 ULONGLONG MLR_nBytes
;
218 } MEM_LARGE_RANGE
, *PMEM_LARGE_RANGE
;
220 typedef struct Mem_Large_Des_s
{
223 DWORDLONG MLD_Alloc_Base
;
224 DWORDLONG MLD_Alloc_End
;
227 } MEM_LARGE_DES
, *PMEM_LARGE_DES
;
229 typedef struct Mem_Large_Resource_s
{
230 MEM_LARGE_DES MEM_LARGE_Header
;
231 MEM_LARGE_RANGE MEM_LARGE_Data
[ANYSIZE_ARRAY
];
232 } MEM_LARGE_RESOURCE
, *PMEM_LARGE_RESOURCE
;
234 #define MLType_Range sizeof(struct Mem_Large_Range_s)
236 /* IO_DES.Type constants and masks */
237 #define fIOD_PortType 0x1
238 #define fIOD_Memory 0x0
240 #define fIOD_DECODE 0x00fc
241 #define fIOD_10_BIT_DECODE 0x0004
242 #define fIOD_12_BIT_DECODE 0x0008
243 #define fIOD_16_BIT_DECODE 0x0010
244 #define fIOD_POSITIVE_DECODE 0x0020
245 #define fIOD_PASSIVE_DECODE 0x0040
246 #define fIOD_WINDOW_DECODE 0x0080
247 #define fIOD_PORT_BAR 0x0100
249 /* IO_RANGE.IOR_Alias constants */
250 #define IO_ALIAS_10_BIT_DECODE 0x00000004
251 #define IO_ALIAS_12_BIT_DECODE 0x00000010
252 #define IO_ALIAS_16_BIT_DECODE 0x00000000
253 #define IO_ALIAS_POSITIVE_DECODE 0x000000FF
255 typedef struct IO_Range_s
{
260 DWORD IOR_RangeFlags
;
262 } IO_RANGE
, *PIO_RANGE
;
264 typedef struct IO_Des_s
{
267 DWORDLONG IOD_Alloc_Base
;
268 DWORDLONG IOD_Alloc_End
;
272 typedef struct IO_Resource_s
{
274 IO_RANGE IO_Data
[ANYSIZE_ARRAY
];
275 } IO_RESOURCE
, *PIO_RESOURCE
;
277 #define IOA_Local 0xff
279 #define IOType_Range sizeof(IO_RANGE)
281 /* DMA_DES.DD_Flags constants and masks */
282 #define mDD_Width 0x3
285 #define fDD_DWORD 0x2
286 #define fDD_BYTE_AND_WORD 0x3
288 #define mDD_BusMaster 0x4
289 #define fDD_NoBusMaster 0x0
290 #define fDD_BusMaster 0x4
292 #define mDD_Type 0x18
293 #define fDD_TypeStandard 0x00
294 #define fDD_TypeA 0x08
295 #define fDD_TypeB 0x10
296 #define fDD_TypeF 0x18
298 typedef struct DMA_Des_s
{
303 } DMA_DES
, *PDMA_DES
;
305 typedef struct DMA_Range_s
{
309 } DMA_RANGE
, *PDMA_RANGE
;
311 #define DType_Range sizeof(DMA_RANGE)
313 typedef struct DMA_Resource_s
{
315 DMA_RANGE DMA_Data
[ANYSIZE_ARRAY
];
316 } DMA_RESOURCE
, *PDMA_RESOURCE
;
318 /* IRQ_DES.IRQD_flags constants */
319 #define mIRQD_Share 0x1
320 #define fIRQD_Exclusive 0x0
321 #define fIRQD_Share 0x1
323 #define fIRQD_Share_Bit 0
324 #define fIRQD_Level_Bit 1
326 #define mIRQD_Edge_Level 0x2
327 #define fIRQD_Level 0x0
328 #define fIRQD_Edge 0x2
330 typedef struct IRQ_Range_s
{
333 #if defined(NT_PROCESSOR_GROUPS)
339 } IRQ_RANGE
, *PIRQ_RANGE
;
341 typedef struct IRQ_Des_32_s
{
344 #if defined(NT_PROCESSOR_GROUPS)
350 ULONG IRQD_Alloc_Num
;
351 ULONG32 IRQD_Affinity
;
352 } IRQ_DES_32
, *PIRQ_DES_32
;
354 typedef struct IRQ_Des_64_s
{
357 #if defined(NT_PROCESSOR_GROUPS)
363 ULONG IRQD_Alloc_Num
;
364 ULONG64 IRQD_Affinity
;
365 } IRQ_DES_64
, *PIRQ_DES_64
;
368 typedef IRQ_DES_64 IRQ_DES
;
369 typedef PIRQ_DES_64 PIRQ_DES
;
371 typedef IRQ_DES_32 IRQ_DES
;
372 typedef PIRQ_DES_32 PIRQ_DES
;
375 typedef struct IRQ_Resource_32_s
{
376 IRQ_DES_32 IRQ_Header
;
377 IRQ_RANGE IRQ_Data
[ANYSIZE_ARRAY
];
378 } IRQ_RESOURCE_32
, *PIRQ_RESOURCE_32
;
380 typedef struct IRQ_Resource_64_s
{
381 IRQ_DES_64 IRQ_Header
;
382 IRQ_RANGE IRQ_Data
[ANYSIZE_ARRAY
];
383 } IRQ_RESOURCE_64
, *PIRQ_RESOURCE_64
;
386 typedef IRQ_RESOURCE_64 IRQ_RESOURCE
;
387 typedef PIRQ_RESOURCE_64 PIRQ_RESOURCE
;
389 typedef IRQ_RESOURCE_32 IRQ_RESOURCE
;
390 typedef PIRQ_RESOURCE_32 PIRQ_RESOURCE
;
393 #define IRQType_Range sizeof(IRQ_RANGE)
395 #if (WINVER >= _WIN32_WINNT_WINXP)
396 #define CM_RESDES_WIDTH_DEFAULT 0x00000000
397 #define CM_RESDES_WIDTH_32 0x00000001
398 #define CM_RESDES_WIDTH_64 0x00000002
399 #define CM_RESDES_WIDTH_BITS 0x00000003
402 typedef struct DevPrivate_Range_s
{
406 } DEVPRIVATE_RANGE
, *PDEVPRIVATE_RANGE
;
408 typedef struct DevPrivate_Des_s
{
415 } DEVPRIVATE_DES
, *PDEVPRIVATE_DES
;
417 #define PType_Range sizeof(DEVPRIVATE_RANGE)
419 typedef struct DevPrivate_Resource_s
{
420 DEVPRIVATE_DES PRV_Header
;
421 DEVPRIVATE_RANGE PRV_Data
[ANYSIZE_ARRAY
];
422 } DEVPRIVATE_RESOURCE
, *PDEVPRIVATE_RESOURCE
;
424 typedef struct CS_Des_s
{
425 DWORD CSD_SignatureLength
;
426 DWORD CSD_LegacyDataOffset
;
427 DWORD CSD_LegacyDataSize
;
430 BYTE CSD_Signature
[ANYSIZE_ARRAY
];
433 typedef struct CS_Resource_s
{
435 } CS_RESOURCE
, *PCS_RESOURCE
;
437 #define mPCD_IO_8_16 0x1
438 #define fPCD_IO_8 0x0
439 #define fPCD_IO_16 0x1
440 #define mPCD_MEM_8_16 0x2
441 #define fPCD_MEM_8 0x0
442 #define fPCD_MEM_16 0x2
443 #define mPCD_MEM_A_C 0xC
444 #define fPCD_MEM1_A 0x4
445 #define fPCD_MEM2_A 0x8
446 #define fPCD_IO_ZW_8 0x10
447 #define fPCD_IO_SRC_16 0x20
448 #define fPCD_IO_WS_16 0x40
449 #define mPCD_MEM_WS 0x300
450 #define fPCD_MEM_WS_ONE 0x100
451 #define fPCD_MEM_WS_TWO 0x200
452 #define fPCD_MEM_WS_THREE 0x300
454 #if (WINVER >= _WIN32_WINNT_WINXP)
456 #define fPCD_MEM_A 0x4
458 #define fPCD_ATTRIBUTES_PER_WINDOW 0x8000
460 #define fPCD_IO1_16 0x00010000
461 #define fPCD_IO1_ZW_8 0x00020000
462 #define fPCD_IO1_SRC_16 0x00040000
463 #define fPCD_IO1_WS_16 0x00080000
465 #define fPCD_IO2_16 0x00100000
466 #define fPCD_IO2_ZW_8 0x00200000
467 #define fPCD_IO2_SRC_16 0x00400000
468 #define fPCD_IO2_WS_16 0x00800000
470 #define mPCD_MEM1_WS 0x03000000
471 #define fPCD_MEM1_WS_ONE 0x01000000
472 #define fPCD_MEM1_WS_TWO 0x02000000
473 #define fPCD_MEM1_WS_THREE 0x03000000
474 #define fPCD_MEM1_16 0x04000000
476 #define mPCD_MEM2_WS 0x30000000
477 #define fPCD_MEM2_WS_ONE 0x10000000
478 #define fPCD_MEM2_WS_TWO 0x20000000
479 #define fPCD_MEM2_WS_THREE 0x30000000
480 #define fPCD_MEM2_16 0x40000000
482 #define PCD_MAX_MEMORY 2
485 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
487 typedef struct PcCard_Des_s
{
491 BYTE PCD_ConfigIndex
;
492 BYTE PCD_Reserved
[3];
493 DWORD PCD_MemoryCardBase1
;
494 DWORD PCD_MemoryCardBase2
;
495 #if (WINVER >= _WIN32_WINNT_WINXP)
496 DWORD PCD_MemoryCardBase
[PCD_MAX_MEMORY
];
497 WORD PCD_MemoryFlags
[PCD_MAX_MEMORY
];
498 BYTE PCD_IoFlags
[PCD_MAX_IO
];
500 } PCCARD_DES
, *PPCCARD_DES
;
502 typedef struct PcCard_Resource_s
{
503 PCCARD_DES PcCard_Header
;
504 } PCCARD_RESOURCE
, *PPCCARD_RESOURCE
;
506 /* MFCARD_DES.PMF_Flags constants */
507 #define fPMF_AUDIO_ENABLE 0x8
508 #define mPMF_AUDIO_ENABLE fPMF_AUDIO_ENABLE
510 typedef struct MfCard_Des_s
{
514 BYTE PMF_ConfigOptions
;
515 BYTE PMF_IoResourceIndex
;
516 BYTE PMF_Reserved
[2];
517 DWORD PMF_ConfigRegisterBase
;
518 } MFCARD_DES
, *PMFCARD_DES
;
520 typedef struct MfCard_Resource_s
{
521 MFCARD_DES MfCard_Header
;
522 } MFCARD_RESOURCE
, *PMFCARD_RESOURCE
;
524 typedef struct BusNumber_Des_s
{
528 ULONG BUSD_Alloc_Base
;
529 ULONG BUSD_Alloc_End
;
530 } BUSNUMBER_DES
, *PBUSNUMBER_DES
;
532 typedef struct BusNumber_Range_s
{
535 ULONG BUSR_nBusNumbers
;
537 } BUSNUMBER_RANGE
, *PBUSNUMBER_RANGE
;
539 #define BusNumberType_Range sizeof(BUSNUMBER_RANGE)
541 typedef struct BusNumber_Resource_s
{
542 BUSNUMBER_DES BusNumber_Header
;
543 BUSNUMBER_RANGE BusNumber_Data
[ANYSIZE_ARRAY
];
544 } BUSNUMBER_RESOURCE
, *PBUSNUMBER_RESOURCE
;
546 typedef struct IRQ_Resource_s
{
548 IRQ_RANGE IRQ_Data
[ANYSIZE_ARRAY
];
549 } IRQ_RESOURCE
, *PIRQ_RESOURCE
;
551 #define CM_HWPI_NOT_DOCKABLE 0x00000000
552 #define CM_HWPI_UNDOCKED 0x00000001
553 #define CM_HWPI_DOCKED 0x00000002
555 typedef struct HWProfileInfo_sA
{
556 ULONG HWPI_ulHWProfile
;
557 CHAR HWPI_szFriendlyName
[MAX_PROFILE_LEN
];
559 } HWPROFILEINFO_A
, *PHWPROFILEINFO_A
;
561 typedef struct HWProfileInfo_sW
{
562 ULONG HWPI_ulHWProfile
;
563 WCHAR HWPI_szFriendlyName
[MAX_PROFILE_LEN
];
565 } HWPROFILEINFO_W
, *PHWPROFILEINFO_W
;
568 typedef HWPROFILEINFO_W HWPROFILEINFO
;
569 typedef PHWPROFILEINFO_W PHWPROFILEINFO
;
571 typedef HWPROFILEINFO_A HWPROFILEINFO
;
572 typedef PHWPROFILEINFO_A PHWPROFILEINFO
;
577 #define ResType_All 0x00000000
578 #define ResType_None 0x00000000
579 #define ResType_Mem 0x00000001
580 #define ResType_IO 0x00000002
581 #define ResType_DMA 0x00000003
582 #define ResType_IRQ 0x00000004
583 #define ResType_DoNotUse 0x00000005
584 #define ResType_BusNumber 0x00000006
585 #define ResType_MemLarge 0x00000007
586 #define ResType_MAX 0x00000007
587 #define ResType_Ignored_Bit 0x00008000
588 #define ResType_ClassSpecific 0x0000FFFF
589 #define ResType_Reserved 0x00008000
590 #define ResType_DevicePrivate 0x00008001
591 #define ResType_PcCardConfig 0x00008002
592 #define ResType_MfCardConfig 0x00008003
594 #define CM_ADD_RANGE_ADDIFCONFLICT 0x00000000
595 #define CM_ADD_RANGE_DONOTADDIFCONFLICT 0x00000001
596 #define CM_ADD_RANGE_BITS 0x00000001
598 #define BASIC_LOG_CONF 0x00000000
599 #define FILTERED_LOG_CONF 0x00000001
600 #define ALLOC_LOG_CONF 0x00000002
601 #define BOOT_LOG_CONF 0x00000003
602 #define FORCED_LOG_CONF 0x00000004
603 #define OVERRIDE_LOG_CONF 0x00000005
604 #define NUM_LOG_CONF 0x00000006
605 #define LOG_CONF_BITS 0x00000007
607 #define PRIORITY_EQUAL_FIRST 0x00000008
608 #define PRIORITY_EQUAL_LAST 0x00000000
609 #define PRIORITY_BIT 0x00000008
611 #define RegDisposition_OpenAlways 0x00000000
612 #define RegDisposition_OpenExisting 0x00000001
613 #define RegDisposition_Bits 0x00000001
615 /* CM_Add_ID.ulFlags constants */
616 #define CM_ADD_ID_HARDWARE 0x00000000
617 #define CM_ADD_ID_COMPATIBLE 0x00000001
618 #define CM_ADD_ID_BITS 0x00000001
620 /* Flags for CM_Create_DevNode[_Ex].ulFlags constants */
621 #define CM_CREATE_DEVNODE_NORMAL 0x00000000
622 #define CM_CREATE_DEVNODE_NO_WAIT_INSTALL 0x00000001
623 #define CM_CREATE_DEVNODE_PHANTOM 0x00000002
624 #define CM_CREATE_DEVNODE_GENERATE_ID 0x00000004
625 #define CM_CREATE_DEVNODE_DO_NOT_INSTALL 0x00000008
626 #define CM_CREATE_DEVNODE_BITS 0x0000000F
628 #define CM_CREATE_DEVINST_NORMAL CM_CREATE_DEVNODE_NORMAL
629 #define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
630 #define CM_CREATE_DEVINST_PHANTOM CM_CREATE_DEVNODE_PHANTOM
631 #define CM_CREATE_DEVINST_GENERATE_ID CM_CREATE_DEVNODE_GENERATE_ID
632 #define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
633 #define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
635 /* Flags for CM_Delete_Class_Key.ulFlags constants */
636 #define CM_DELETE_CLASS_ONLY 0x00000000
637 #define CM_DELETE_CLASS_SUBKEYS 0x00000001
638 #if (WINVER >= _WIN32_WINNT_VISTA)
639 #define CM_DELETE_CLASS_INTERFACE 0x00000002
641 #define CM_DELETE_CLASS_BITS 0x00000003
643 /* CM_Run_Detection[_Ex].ulFlags constants */
644 #define CM_DETECT_NEW_PROFILE 0x00000001
645 #define CM_DETECT_CRASHED 0x00000002
646 #define CM_DETECT_HWPROF_FIRST_BOOT 0x00000004
647 #define CM_DETECT_RUN 0x80000000
648 #define CM_DETECT_BITS 0x80000007
650 #define CM_DISABLE_POLITE 0x00000000
651 #define CM_DISABLE_ABSOLUTE 0x00000001
652 #define CM_DISABLE_HARDWARE 0x00000002
653 #define CM_DISABLE_UI_NOT_OK 0x00000004
654 #define CM_DISABLE_BITS 0x00000007
656 #define CM_GETIDLIST_FILTER_NONE 0x00000000
657 #define CM_GETIDLIST_FILTER_ENUMERATOR 0x00000001
658 #define CM_GETIDLIST_FILTER_SERVICE 0x00000002
659 #define CM_GETIDLIST_FILTER_EJECTRELATIONS 0x00000004
660 #define CM_GETIDLIST_FILTER_REMOVALRELATIONS 0x00000008
661 #define CM_GETIDLIST_FILTER_POWERRELATIONS 0x00000010
662 #define CM_GETIDLIST_FILTER_BUSRELATIONS 0x00000020
663 #define CM_GETIDLIST_DONOTGENERATE 0x10000040
664 #if (WINVER <= _WIN32_WINNT_VISTA)
665 #define CM_GETIDLIST_FILTER_BITS 0x1000007F
667 #if (WINVER >= _WIN32_WINNT_WIN7)
668 #define CM_GETIDLIST_FILTER_TRANSPORTRELATIONS 0x00000080
669 #define CM_GETIDLIST_FILTER_PRESENT 0x00000100
670 #define CM_GETIDLIST_FILTER_CLASS 0x00000200
671 #define CM_GETIDLIST_FILTER_BITS 0x100003FF
674 #define CM_GET_DEVICE_INTERFACE_LIST_PRESENT 0x00000000
675 #define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES 0x00000001
676 #define CM_GET_DEVICE_INTERFACE_LIST_BITS 0x00000001
678 #define CM_DRP_DEVICEDESC 0x00000001
679 #define CM_DRP_HARDWAREID 0x00000002
680 #define CM_DRP_COMPATIBLEIDS 0x00000003
681 #define CM_DRP_UNUSED0 0x00000004
682 #define CM_DRP_SERVICE 0x00000005
683 #define CM_DRP_UNUSED1 0x00000006
684 #define CM_DRP_UNUSED2 0x00000007
685 #define CM_DRP_CLASS 0x00000008
686 #define CM_DRP_CLASSGUID 0x00000009
687 #define CM_DRP_DRIVER 0x0000000A
688 #define CM_DRP_CONFIGFLAGS 0x0000000B
689 #define CM_DRP_MFG 0x0000000C
690 #define CM_DRP_FRIENDLYNAME 0x0000000D
691 #define CM_DRP_LOCATION_INFORMATION 0x0000000E
692 #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F
693 #define CM_DRP_CAPABILITIES 0x00000010
694 #define CM_DRP_UI_NUMBER 0x00000011
695 #define CM_DRP_UPPERFILTERS 0x00000012
696 #if (WINVER >= _WIN32_WINNT_VISTA)
697 #define CM_CRP_UPPERFILTERS CM_DRP_UPPERFILTERS
699 #define CM_DRP_LOWERFILTERS 0x00000013
700 #if (WINVER >= _WIN32_WINNT_VISTA)
701 #define CM_CRP_LOWERFILTERS CM_DRP_LOWERFILTERS
703 #define CM_DRP_BUSTYPEGUID 0x00000014
704 #define CM_DRP_LEGACYBUSTYPE 0x00000015
705 #define CM_DRP_BUSNUMBER 0x00000016
706 #define CM_DRP_ENUMERATOR_NAME 0x00000017
707 #define CM_DRP_SECURITY 0x00000018
708 #define CM_CRP_SECURITY CM_DRP_SECURITY
709 #define CM_DRP_SECURITY_SDS 0x00000019
710 #define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS
711 #define CM_DRP_DEVTYPE 0x0000001A
712 #define CM_CRP_DEVTYPE CM_DRP_DEVTYPE
713 #define CM_DRP_EXCLUSIVE 0x0000001B
714 #define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE
715 #define CM_DRP_CHARACTERISTICS 0x0000001C
716 #define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS
717 #define CM_DRP_ADDRESS 0x0000001D
718 #define CM_DRP_UI_NUMBER_DESC_FORMAT 0x0000001E
719 #if (WINVER >= _WIN32_WINNT_WINXP)
720 #define CM_DRP_DEVICE_POWER_DATA 0x0000001F
721 #define CM_DRP_REMOVAL_POLICY 0x00000020
722 #define CM_DRP_REMOVAL_POLICY_HW_DEFAULT 0x00000021
723 #define CM_DRP_REMOVAL_POLICY_OVERRIDE 0x00000022
724 #define CM_DRP_INSTALL_STATE 0x00000023
726 #if (WINVER >= _WIN32_WINNT_WS03)
727 #define CM_DRP_LOCATION_PATHS 0x00000024
729 #if (WINVER >= _WIN32_WINNT_WIN7)
730 #define CM_DRP_BASE_CONTAINERID 0x00000025
732 #define CM_DRP_MIN 0x00000001
733 #define CM_CRP_MIN CM_DRP_MIN
734 #define CM_DRP_MAX 0x00000025
735 #define CM_CRP_MAX CM_DRP_MAX
737 #define CM_DEVCAP_LOCKSUPPORTED 0x00000001
738 #define CM_DEVCAP_EJECTSUPPORTED 0x00000002
739 #define CM_DEVCAP_REMOVABLE 0x00000004
740 #define CM_DEVCAP_DOCKDEVICE 0x00000008
741 #define CM_DEVCAP_UNIQUEID 0x00000010
742 #define CM_DEVCAP_SILENTINSTALL 0x00000020
743 #define CM_DEVCAP_RAWDEVICEOK 0x00000040
744 #define CM_DEVCAP_SURPRISEREMOVALOK 0x00000080
745 #define CM_DEVCAP_HARDWAREDISABLED 0x00000100
746 #define CM_DEVCAP_NONDYNAMIC 0x00000200
748 #if (WINVER >= _WIN32_WINNT_WINXP)
750 #define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
751 #define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
752 #define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
754 #define CM_INSTALL_STATE_INSTALLED 0
755 #define CM_INSTALL_STATE_NEEDS_REINSTALL 1
756 #define CM_INSTALL_STATE_FAILED_INSTALL 2
757 #define CM_INSTALL_STATE_FINISH_INSTALL 3
759 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
761 /* CM_Locate_DevNode.ulFlags constants */
762 #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
763 #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
764 #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
765 #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
766 #define CM_LOCATE_DEVNODE_BITS 0x00000007
768 #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
769 #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
770 #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
771 #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
772 #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
774 #define CM_OPEN_CLASS_KEY_INSTALLER 0x00000000
775 #define CM_OPEN_CLASS_KEY_INTERFACE 0x00000001
776 #define CM_OPEN_CLASS_KEY_BITS 0x00000001
778 /* CM_Query_And_Remove_SubTree.ulFlags constants */
779 #define CM_REMOVE_UI_OK 0x00000000
780 #define CM_REMOVE_UI_NOT_OK 0x00000001
781 #define CM_REMOVE_NO_RESTART 0x00000002
782 #define CM_REMOVE_BITS 0x00000003
784 #define CM_QUERY_REMOVE_UI_OK (CM_REMOVE_UI_OK)
785 #define CM_QUERY_REMOVE_UI_NOT_OK (CM_REMOVE_UI_NOT_OK)
786 #define CM_QUERY_REMOVE_BITS (CM_QUERY_REMOVE_UI_OK|CM_QUERY_REMOVE_UI_NOT_OK)
788 /* CM_Reenumerate_DevNode.ulFlags constants */
789 #define CM_REENUMERATE_NORMAL 0x00000000
790 #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
791 #if (WINVER >= _WIN32_WINNT_WINXP)
792 #define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
793 #define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
795 #define CM_REENUMERATE_BITS 0x00000007
797 #define CM_REGISTER_DEVICE_DRIVER_STATIC 0x00000000
798 #define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE 0x00000001
799 #define CM_REGISTER_DEVICE_DRIVER_REMOVABLE 0x00000002
800 #define CM_REGISTER_DEVICE_DRIVER_BITS 0x00000003
802 #define CM_REGISTRY_HARDWARE 0x00000000
803 #define CM_REGISTRY_SOFTWARE 0x00000001
804 #define CM_REGISTRY_USER 0x00000100
805 #define CM_REGISTRY_CONFIG 0x00000200
806 #define CM_REGISTRY_BITS 0x00000301
808 #define CM_SET_DEVNODE_PROBLEM_NORMAL 0x00000000
809 #define CM_SET_DEVNODE_PROBLEM_OVERRIDE 0x00000001
810 #define CM_SET_DEVNODE_PROBLEM_BITS 0x00000001
812 #define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
813 #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
814 #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
816 /* CM_Set_HW_Prof_Flags[_Ex].ulFlags constants */
817 #define CM_SET_HW_PROF_FLAGS_UI_NOT_OK 0x00000001
818 #define CM_SET_HW_PROF_FLAGS_BITS 0x00000001
820 /* CM_Setup_DevInst[_Ex].ulFlags constants */
821 #define CM_SETUP_DEVNODE_READY 0x00000000
822 #define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
823 #define CM_SETUP_DOWNLOAD 0x00000001
824 #define CM_SETUP_WRITE_LOG_CONFS 0x00000002
825 #define CM_SETUP_PROP_CHANGE 0x00000003
826 #if (WINVER >= _WIN32_WINNT_WINXP)
827 #define CM_SETUP_DEVNODE_RESET 0x00000004
828 #define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
830 #define CM_SETUP_BITS 0x00000007
832 #define CM_QUERY_ARBITRATOR_RAW 0x00000000
833 #define CM_QUERY_ARBITRATOR_TRANSLATED 0x00000001
834 #define CM_QUERY_ARBITRATOR_BITS 0x00000001
836 #if (WINVER >= _WIN32_WINNT_WINXP)
837 #define CM_CUSTOMDEVPROP_MERGE_MULTISZ 0x00000001
838 #define CM_CUSTOMDEVPROP_BITS 0x00000001
841 #define CM_NAME_ATTRIBUTE_NAME_RETRIEVED_FROM_DEVICE 0x1
842 #define CM_NAME_ATTRIBUTE_USER_ASSIGNED_NAME 0x2
844 #define CR_SUCCESS 0x00000000
845 #define CR_DEFAULT 0x00000001
846 #define CR_OUT_OF_MEMORY 0x00000002
847 #define CR_INVALID_POINTER 0x00000003
848 #define CR_INVALID_FLAG 0x00000004
849 #define CR_INVALID_DEVNODE 0x00000005
850 #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
851 #define CR_INVALID_RES_DES 0x00000006
852 #define CR_INVALID_LOG_CONF 0x00000007
853 #define CR_INVALID_ARBITRATOR 0x00000008
854 #define CR_INVALID_NODELIST 0x00000009
855 #define CR_DEVNODE_HAS_REQS 0x0000000A
856 #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
857 #define CR_INVALID_RESOURCEID 0x0000000B
858 #define CR_DLVXD_NOT_FOUND 0x0000000C
859 #define CR_NO_SUCH_DEVNODE 0x0000000D
860 #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
861 #define CR_NO_MORE_LOG_CONF 0x0000000E
862 #define CR_NO_MORE_RES_DES 0x0000000F
863 #define CR_ALREADY_SUCH_DEVNODE 0x00000010
864 #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
865 #define CR_INVALID_RANGE_LIST 0x00000011
866 #define CR_INVALID_RANGE 0x00000012
867 #define CR_FAILURE 0x00000013
868 #define CR_NO_SUCH_LOGICAL_DEV 0x00000014
869 #define CR_CREATE_BLOCKED 0x00000015
870 #define CR_NOT_SYSTEM_VM 0x00000016
871 #define CR_REMOVE_VETOED 0x00000017
872 #define CR_APM_VETOED 0x00000018
873 #define CR_INVALID_LOAD_TYPE 0x00000019
874 #define CR_BUFFER_SMALL 0x0000001A
875 #define CR_NO_ARBITRATOR 0x0000001B
876 #define CR_NO_REGISTRY_HANDLE 0x0000001C
877 #define CR_REGISTRY_ERROR 0x0000001D
878 #define CR_INVALID_DEVICE_ID 0x0000001E
879 #define CR_INVALID_DATA 0x0000001F
880 #define CR_INVALID_API 0x00000020
881 #define CR_DEVLOADER_NOT_READY 0x00000021
882 #define CR_NEED_RESTART 0x00000022
883 #define CR_NO_MORE_HW_PROFILES 0x00000023
884 #define CR_DEVICE_NOT_THERE 0x00000024
885 #define CR_NO_SUCH_VALUE 0x00000025
886 #define CR_WRONG_TYPE 0x00000026
887 #define CR_INVALID_PRIORITY 0x00000027
888 #define CR_NOT_DISABLEABLE 0x00000028
889 #define CR_FREE_RESOURCES 0x00000029
890 #define CR_QUERY_VETOED 0x0000002A
891 #define CR_CANT_SHARE_IRQ 0x0000002B
892 #define CR_NO_DEPENDENT 0x0000002C
893 #define CR_SAME_RESOURCES 0x0000002D
894 #define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
895 #define CR_INVALID_MACHINENAME 0x0000002F
896 #define CR_REMOTE_COMM_FAILURE 0x00000030
897 #define CR_MACHINE_UNAVAILABLE 0x00000031
898 #define CR_NO_CM_SERVICES 0x00000032
899 #define CR_ACCESS_DENIED 0x00000033
900 #define CR_CALL_NOT_IMPLEMENTED 0x00000034
901 #define CR_INVALID_PROPERTY 0x00000035
902 #define CR_DEVICE_INTERFACE_ACTIVE 0x00000036
903 #define CR_NO_SUCH_DEVICE_INTERFACE 0x00000037
904 #define CR_INVALID_REFERENCE_STRING 0x00000038
905 #define CR_INVALID_CONFLICT_LIST 0x00000039
906 #define CR_INVALID_INDEX 0x0000003A
907 #define CR_INVALID_STRUCTURE_SIZE 0x0000003B
908 #define NUM_CR_RESULTS 0x0000003C
910 #define CM_GLOBAL_STATE_CAN_DO_UI 0x00000001
911 #define CM_GLOBAL_STATE_ON_BIG_STACK 0x00000002
912 #define CM_GLOBAL_STATE_SERVICES_AVAILABLE 0x00000004
913 #define CM_GLOBAL_STATE_SHUTTING_DOWN 0x00000008
914 #define CM_GLOBAL_STATE_DETECTION_PENDING 0x00000010
915 #if (WINVER >= _WIN32_WINNT_WIN7)
916 #define CM_GLOBAL_STATE_REBOOT_REQUIRED 0x00000020
919 /* FIXME : These definitions don't exist in the official header
921 #define CMP_MAGIC 0x01234567
926 CMP_Init_Detection(IN DWORD dwMagic);
931 CMP_RegisterNotification(
932 IN HANDLE hRecipient,
933 IN LPVOID lpvNotificationFilter,
935 OUT PULONG pluhDevNotify);
942 IN DWORD dwProcessId);
947 CMP_UnregisterNotification(IN ULONG luhDevNotify);
954 CM_Add_Empty_Log_Conf(
955 OUT PLOG_CONF plcLogConf
,
956 IN DEVINST dnDevInst
,
957 IN PRIORITY Priority
,
963 CM_Add_Empty_Log_Conf_Ex(
964 OUT PLOG_CONF plcLogConf
,
965 IN DEVINST dnDevInst
,
966 IN PRIORITY Priority
,
968 IN HMACHINE hMachine
);
974 IN DEVINST dnDevInst
,
982 IN DEVINST dnDevInst
,
985 IN HMACHINE hMachine
);
991 IN DEVINST dnDevInst
,
994 IN HMACHINE hMachine
);
1000 IN DEVINST dnDevInst
,
1005 #define CM_Add_ID CM_Add_IDW
1006 #define CM_Add_ID_Ex CM_Add_ID_ExW
1008 #define CM_Add_ID CM_Add_IDA
1009 #define CM_Add_ID_Ex CM_Add_ID_ExA
1010 #endif /* UNICODE */
1016 IN DWORDLONG ullStartValue
,
1017 IN DWORDLONG ullEndValue
,
1025 OUT PRES_DES prdResDes OPTIONAL
,
1026 IN LOG_CONF lcLogConf
,
1027 IN RESOURCEID ResourceID
,
1028 IN PCVOID ResourceData
,
1029 IN ULONG ResourceLen
,
1036 OUT PRES_DES prdResDes OPTIONAL
,
1037 IN LOG_CONF lcLogConf
,
1038 IN RESOURCEID ResourceID
,
1039 IN PCVOID ResourceData
,
1040 IN ULONG ResourceLen
,
1042 IN HMACHINE hMachine
);
1047 CM_Connect_MachineA(
1048 IN PCSTR UNCServerName OPTIONAL
,
1049 OUT PHMACHINE phMachine
);
1054 CM_Connect_MachineW(
1055 IN PCWSTR UNCServerName OPTIONAL
,
1056 OUT PHMACHINE phMachine
);
1059 #define CM_Connect_Machine CM_Connect_MachineW
1061 #define CM_Connect_Machine CM_Connect_MachineA
1062 #endif /* UNICODE */
1068 OUT PDEVINST pdnDevInst
,
1069 IN DEVINSTID_A pDeviceID
,
1070 IN DEVINST dnParent
,
1077 OUT PDEVINST pdnDevInst
,
1078 IN DEVINSTID_W pDeviceID
,
1079 IN DEVINST dnParent
,
1085 CM_Create_DevNode_ExA(
1086 OUT PDEVINST pdnDevInst
,
1087 IN DEVINSTID_A pDeviceID
,
1088 IN DEVINST dnParent
,
1090 IN HANDLE hMachine
);
1095 CM_Create_DevNode_ExW(
1096 OUT PDEVINST pdnDevInst
,
1097 IN DEVINSTID_W pDeviceID
,
1098 IN DEVINST dnParent
,
1100 IN HANDLE hMachine
);
1102 #define CM_Create_DevInstW CM_Create_DevNodeW
1103 #define CM_Create_DevInstA CM_Create_DevNodeA
1104 #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
1105 #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
1107 #define CM_Create_DevNode CM_Create_DevNodeW
1108 #define CM_Create_DevInst CM_Create_DevNodeW
1109 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
1110 #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
1112 #define CM_Create_DevNode CM_Create_DevNodeA
1113 #define CM_Create_DevInst CM_Create_DevNodeA
1114 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
1115 #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
1116 #endif /* UNICODE */
1121 CM_Create_Range_List(
1122 OUT PRANGE_LIST prlh
,
1128 CM_Delete_Class_Key(
1129 IN LPGUID ClassGuid
,
1135 CM_Delete_Class_Key_Ex(
1136 IN LPGUID ClassGuid
,
1138 IN HANDLE hMachine
);
1143 CM_Delete_DevNode_Key(
1144 IN DEVNODE dnDevNode
,
1145 IN ULONG ulHardwareProfile
,
1151 CM_Delete_DevNode_Key_Ex(
1152 IN DEVNODE dnDevNode
,
1153 IN ULONG ulHardwareProfile
,
1155 IN HANDLE hMachine
);
1157 #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
1158 #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
1164 IN DWORDLONG ullStartValue
,
1165 IN DWORDLONG ullEndValue
,
1172 CM_Detect_Resource_Conflict(
1173 IN DEVINST dnDevInst
,
1174 IN RESOURCEID ResourceID
,
1175 IN PCVOID ResourceData
,
1176 IN ULONG ResourceLen
,
1177 OUT PBOOL pbConflictDetected
,
1183 CM_Detect_Resource_Conflict_Ex(
1184 IN DEVINST dnDevInst
,
1185 IN RESOURCEID ResourceID
,
1186 IN PCVOID ResourceData
,
1187 IN ULONG ResourceLen
,
1188 OUT PBOOL pbConflictDetected
,
1190 IN HMACHINE hMachine OPTIONAL
);
1196 IN DEVINST dnDevInst
,
1202 CM_Disable_DevNode_Ex(
1203 IN DEVINST dnDevInst
,
1205 IN HMACHINE hMachine OPTIONAL
);
1207 #define CM_Disable_DevInst CM_Disable_DevNode
1208 #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
1213 CM_Disconnect_Machine(
1214 IN HMACHINE hMachine OPTIONAL
);
1220 IN RANGE_LIST rlhOld
,
1221 IN RANGE_LIST rlhNew
,
1228 IN DEVINST dnDevInst
,
1234 CM_Enable_DevNode_Ex(
1235 IN DEVINST dnDevInst
,
1237 IN HMACHINE hMachine OPTIONAL
);
1239 #define CM_Enable_DevInst CM_Enable_DevNode
1240 #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
1245 CM_Enumerate_Classes(
1246 IN ULONG ulClassIndex
,
1247 OUT LPGUID ClassGuid
,
1253 CM_Enumerate_Classes_Ex(
1254 IN ULONG ulClassIndex
,
1255 OUT LPGUID ClassGuid
,
1257 IN HMACHINE hMachine OPTIONAL
);
1262 CM_Enumerate_EnumeratorsA(
1263 IN ULONG ulEnumIndex
,
1265 IN OUT PULONG pulLength
,
1271 CM_Enumerate_Enumerators_ExA(
1272 IN ULONG ulEnumIndex
,
1274 IN OUT PULONG pulLength
,
1276 IN HMACHINE hMachine OPTIONAL
);
1281 CM_Enumerate_Enumerators_ExW(
1282 IN ULONG ulEnumIndex
,
1284 IN OUT PULONG pulLength
,
1286 IN HMACHINE hMachine OPTIONAL
);
1291 CM_Enumerate_EnumeratorsW(
1292 IN ULONG ulEnumIndex
,
1294 IN OUT PULONG pulLength
,
1298 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
1299 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
1301 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
1302 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
1303 #endif /* UNICODE */
1309 OUT PDWORDLONG pullStart
,
1310 IN DWORDLONG ullStart
,
1312 IN DWORDLONG ullAlignment
,
1313 IN DWORDLONG ullEnd
,
1322 OUT PDWORDLONG pullStart
,
1323 OUT PDWORDLONG pullEnd
,
1324 OUT PRANGE_ELEMENT preElement
,
1331 IN LOG_CONF lcLogConfToBeFreed
,
1337 CM_Free_Log_Conf_Ex(
1338 IN LOG_CONF lcLogConfToBeFreed
,
1340 IN HMACHINE hMachine
);
1345 CM_Free_Log_Conf_Handle(
1346 IN LOG_CONF lcLogConf
);
1359 OUT PRES_DES prdResDes
,
1360 IN RES_DES rdResDes
,
1367 OUT PRES_DES prdResDes
,
1368 IN RES_DES rdResDes
,
1370 IN HMACHINE hMachine
);
1375 CM_Free_Res_Des_Handle(
1376 IN RES_DES rdResDes
);
1381 CM_Free_Resource_Conflict_Handle(
1382 IN CONFLICT_LIST clConflictList
);
1388 OUT PDEVINST pdnDevInst
,
1389 IN DEVINST dnDevInst
,
1396 OUT PDEVINST pdnDevInst
,
1397 IN DEVINST dnDevInst
,
1399 IN HMACHINE hMachine
);
1405 IN LPGUID ClassGuid
,
1407 IN OUT PULONG pulLength
,
1414 IN LPGUID ClassGuid
,
1416 IN OUT PULONG pulLength
,
1422 CM_Get_Class_Name_ExA(
1423 IN LPGUID ClassGuid
,
1425 IN OUT PULONG pulLength
,
1427 IN HMACHINE hMachine
);
1432 CM_Get_Class_Name_ExW(
1433 IN LPGUID ClassGuid
,
1435 IN OUT PULONG pulLength
,
1437 IN HMACHINE hMachine
);
1440 #define CM_Get_Class_Name CM_Get_Class_NameW
1441 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
1443 #define CM_Get_Class_Name CM_Get_Class_NameA
1444 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
1445 #endif /* UNICODE */
1450 CM_Get_Class_Key_NameA(
1451 IN LPGUID ClassGuid
,
1452 OUT LPSTR pszKeyName
,
1453 IN OUT PULONG pulLength
,
1459 CM_Get_Class_Key_NameW(
1460 IN LPGUID ClassGuid
,
1461 OUT LPWSTR pszKeyName
,
1462 IN OUT PULONG pulLength
,
1468 CM_Get_Class_Key_Name_ExA(
1469 IN LPGUID ClassGuid
,
1470 OUT LPSTR pszKeyName
,
1471 IN OUT PULONG pulLength
,
1473 IN HMACHINE hMachine
);
1478 CM_Get_Class_Key_Name_ExW(
1479 IN LPGUID ClassGuid
,
1480 OUT LPWSTR pszKeyName
,
1481 IN OUT PULONG pulLength
,
1483 IN HMACHINE hMachine
);
1486 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
1487 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
1489 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
1490 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
1491 #endif /* UNICODE */
1497 OUT PULONG pulDepth
,
1498 IN DEVINST dnDevInst
,
1505 OUT PULONG pulDepth
,
1506 IN DEVINST dnDevInst
,
1508 IN HMACHINE hMachine
);
1514 IN DEVINST dnDevInst
,
1522 CM_Get_Device_ID_ExA(
1523 IN DEVINST dnDevInst
,
1527 IN HMACHINE hMachine
);
1532 CM_Get_Device_ID_ExW(
1533 IN DEVINST dnDevInst
,
1537 IN HMACHINE hMachine
);
1543 IN DEVINST dnDevInst
,
1549 #define CM_Get_Device_ID CM_Get_Device_IDW
1550 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
1552 #define CM_Get_Device_ID CM_Get_Device_IDA
1553 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
1554 #endif /* UNICODE */
1559 CM_Get_Device_ID_ListA(
1560 IN PCSTR pszFilter OPTIONAL
,
1568 CM_Get_Device_ID_List_ExA(
1569 IN PCSTR pszFilter OPTIONAL
,
1573 IN HMACHINE hMachine
);
1578 CM_Get_Device_ID_List_ExW(
1579 IN PCWSTR pszFilter OPTIONAL
,
1583 IN HMACHINE hMachine
);
1588 CM_Get_Device_ID_ListW(
1589 IN PCWSTR pszFilter OPTIONAL
,
1595 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
1596 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
1598 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
1599 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
1600 #endif /* UNICODE */
1605 CM_Get_Device_ID_List_SizeA(
1607 IN PCSTR pszFilter OPTIONAL
,
1613 CM_Get_Device_ID_List_Size_ExA(
1615 IN PCSTR pszFilter OPTIONAL
,
1617 IN HMACHINE hMachine
);
1622 CM_Get_Device_ID_List_Size_ExW(
1624 IN PCWSTR pszFilter OPTIONAL
,
1626 IN HMACHINE hMachine
);
1631 CM_Get_Device_ID_List_SizeW(
1633 IN PCWSTR pszFilter OPTIONAL
,
1637 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
1638 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
1640 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
1641 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
1642 #endif /* UNICODE */
1647 CM_Get_Device_ID_Size(
1649 IN DEVINST dnDevInst
,
1655 CM_Get_Device_ID_Size_Ex(
1657 IN DEVINST dnDevInst
,
1659 IN HMACHINE hMachine
);
1664 CM_Get_DevNode_Registry_PropertyA(
1665 IN DEVINST dnDevInst
,
1666 IN ULONG ulProperty
,
1667 OUT PULONG pulRegDataType OPTIONAL
,
1668 OUT PVOID Buffer OPTIONAL
,
1669 IN OUT PULONG pulLength
,
1675 CM_Get_DevNode_Registry_PropertyW(
1676 IN DEVINST dnDevInst
,
1677 IN ULONG ulProperty
,
1678 OUT PULONG pulRegDataType OPTIONAL
,
1679 OUT PVOID Buffer OPTIONAL
,
1680 IN OUT PULONG pulLength
,
1686 CM_Get_DevNode_Registry_Property_ExA(
1687 IN DEVINST dnDevInst
,
1688 IN ULONG ulProperty
,
1689 OUT PULONG pulRegDataType OPTIONAL
,
1690 OUT PVOID Buffer OPTIONAL
,
1691 IN OUT PULONG pulLength
,
1693 IN HMACHINE hMachine
);
1698 CM_Get_DevNode_Registry_Property_ExW(
1699 IN DEVINST dnDevInst
,
1700 IN ULONG ulProperty
,
1701 OUT PULONG pulRegDataType OPTIONAL
,
1702 OUT PVOID Buffer OPTIONAL
,
1703 IN OUT PULONG pulLength
,
1705 IN HMACHINE hMachine
);
1707 #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
1708 #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
1709 #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
1710 #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
1713 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
1714 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1715 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
1716 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1718 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
1719 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1720 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
1721 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1722 #endif /* UNICODE */
1724 #if (WINVER >= _WIN32_WINNT_WINXP)
1729 CM_Get_DevNode_Custom_PropertyA(
1730 IN DEVINST dnDevInst
,
1731 IN PCSTR pszCustomPropertyName
,
1732 OUT PULONG pulRegDataType OPTIONAL
,
1733 OUT PVOID Buffer OPTIONAL
,
1734 IN OUT PULONG pulLength
,
1740 CM_Get_DevNode_Custom_PropertyW(
1741 IN DEVINST dnDevInst
,
1742 IN PCWSTR pszCustomPropertyName
,
1743 OUT PULONG pulRegDataType OPTIONAL
,
1744 OUT PVOID Buffer OPTIONAL
,
1745 IN OUT PULONG pulLength
,
1751 CM_Get_DevNode_Custom_Property_ExA(
1752 IN DEVINST dnDevInst
,
1753 IN PCSTR pszCustomPropertyName
,
1754 OUT PULONG pulRegDataType OPTIONAL
,
1755 OUT PVOID Buffer OPTIONAL
,
1756 IN OUT PULONG pulLength
,
1758 IN HMACHINE hMachine OPTIONAL
);
1763 CM_Get_DevNode_Custom_Property_ExW(
1764 IN DEVINST dnDevInst
,
1765 IN PCWSTR pszCustomPropertyName
,
1766 OUT PULONG pulRegDataType OPTIONAL
,
1767 OUT PVOID Buffer OPTIONAL
,
1768 IN OUT PULONG pulLength
,
1770 IN HMACHINE hMachine OPTIONAL
);
1772 #define CM_Get_DevInst_Custom_PropertyW CM_Get_DevNode_Custom_PropertyW
1773 #define CM_Get_DevInst_Custom_PropertyA CM_Get_DevNode_Custom_PropertyA
1774 #define CM_Get_DevInst_Custom_Property_ExW CM_Get_DevNode_Custom_Property_ExW
1775 #define CM_Get_DevInst_Custom_Property_ExA CM_Get_DevNode_Custom_Property_ExA
1777 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyW
1778 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1779 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyW
1780 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1782 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyA
1783 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1784 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyA
1785 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1788 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
1793 CM_Get_DevNode_Status(
1794 OUT PULONG pulStatus
,
1795 OUT PULONG pulProblemNumber
,
1796 IN DEVINST dnDevInst
,
1802 CM_Get_DevNode_Status_Ex(
1803 OUT PULONG pulStatus
,
1804 OUT PULONG pulProblemNumber
,
1805 IN DEVINST dnDevInst
,
1807 IN HMACHINE hMachine
);
1809 #define CM_Get_DevInst_Status CM_Get_DevNode_Status
1810 #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
1815 CM_Get_First_Log_Conf(
1816 OUT PLOG_CONF plcLogConf OPTIONAL
,
1817 IN DEVINST dnDevInst
,
1823 CM_Get_First_Log_Conf_Ex(
1824 OUT PLOG_CONF plcLogConf OPTIONAL
,
1825 IN DEVINST dnDevInst
,
1827 IN HMACHINE hMachine OPTIONAL
);
1832 CM_Get_Global_State(
1833 OUT PULONG pulState
,
1839 CM_Get_Global_State_Ex(
1840 OUT PULONG pulState
,
1842 IN HMACHINE hMachine
);
1847 CM_Get_Hardware_Profile_InfoA(
1849 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1855 CM_Get_Hardware_Profile_Info_ExA(
1857 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1859 IN HMACHINE hMachine OPTIONAL
);
1864 CM_Get_Hardware_Profile_InfoW(
1866 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1872 CM_Get_Hardware_Profile_Info_ExW(
1874 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1876 IN HMACHINE hMachine OPTIONAL
);
1879 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoW
1880 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExW
1882 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoA
1883 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExA
1889 CM_Get_HW_Prof_FlagsA(
1890 IN DEVINSTID_A szDevInstName
,
1891 IN ULONG ulHardwareProfile
,
1892 OUT PULONG pulValue
,
1898 CM_Get_HW_Prof_FlagsW(
1899 IN DEVINSTID_W szDevInstName
,
1900 IN ULONG ulHardwareProfile
,
1901 OUT PULONG pulValue
,
1907 CM_Get_HW_Prof_Flags_ExA(
1908 IN DEVINSTID_A szDevInstName
,
1909 IN ULONG ulHardwareProfile
,
1910 OUT PULONG pulValue
,
1912 IN HMACHINE hMachine
);
1917 CM_Get_HW_Prof_Flags_ExW(
1918 IN DEVINSTID_W szDevInstName
,
1919 IN ULONG ulHardwareProfile
,
1920 OUT PULONG pulValue
,
1922 IN HMACHINE hMachine
);
1925 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
1926 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
1928 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
1929 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
1935 CM_Get_Device_Interface_AliasA(
1936 IN LPCSTR pszDeviceInterface
,
1937 IN LPGUID AliasInterfaceGuid
,
1938 OUT LPSTR pszAliasDeviceInterface
,
1939 IN OUT PULONG pulLength
,
1945 CM_Get_Device_Interface_AliasW(
1946 IN LPCWSTR pszDeviceInterface
,
1947 IN LPGUID AliasInterfaceGuid
,
1948 OUT LPWSTR pszAliasDeviceInterface
,
1949 IN OUT PULONG pulLength
,
1955 CM_Get_Device_Interface_Alias_ExA(
1956 IN LPCSTR pszDeviceInterface
,
1957 IN LPGUID AliasInterfaceGuid
,
1958 OUT LPSTR pszAliasDeviceInterface
,
1959 IN OUT PULONG pulLength
,
1961 IN HMACHINE hMachine OPTIONAL
);
1966 CM_Get_Device_Interface_Alias_ExW(
1967 IN LPCWSTR pszDeviceInterface
,
1968 IN LPGUID AliasInterfaceGuid
,
1969 OUT LPWSTR pszAliasDeviceInterface
,
1970 IN OUT PULONG pulLength
,
1972 IN HMACHINE hMachine OPTIONAL
);
1975 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasW
1976 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExW
1978 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasA
1979 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExA
1985 CM_Get_Device_Interface_ListA(
1986 IN LPGUID InterfaceClassGuid
,
1987 IN DEVINSTID_A pDeviceID OPTIONAL
,
1995 CM_Get_Device_Interface_ListW(
1996 IN LPGUID InterfaceClassGuid
,
1997 IN DEVINSTID_W pDeviceID OPTIONAL
,
2005 CM_Get_Device_Interface_List_ExA(
2006 IN LPGUID InterfaceClassGuid
,
2007 IN DEVINSTID_A pDeviceID OPTIONAL
,
2011 IN HMACHINE hMachine OPTIONAL
);
2016 CM_Get_Device_Interface_List_ExW(
2017 IN LPGUID InterfaceClassGuid
,
2018 IN DEVINSTID_W pDeviceID OPTIONAL
,
2022 IN HMACHINE hMachine OPTIONAL
);
2025 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListW
2026 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExW
2028 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListA
2029 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExA
2035 CM_Get_Device_Interface_List_SizeA(
2037 IN LPGUID InterfaceClassGuid
,
2038 IN DEVINSTID_A pDeviceID OPTIONAL
,
2044 CM_Get_Device_Interface_List_SizeW(
2046 IN LPGUID InterfaceClassGuid
,
2047 IN DEVINSTID_W pDeviceID OPTIONAL
,
2053 CM_Get_Device_Interface_List_Size_ExA(
2055 IN LPGUID InterfaceClassGuid
,
2056 IN DEVINSTID_A pDeviceID OPTIONAL
,
2058 IN HMACHINE hMachine OPTIONAL
);
2063 CM_Get_Device_Interface_List_Size_ExW(
2065 IN LPGUID InterfaceClassGuid
,
2066 IN DEVINSTID_W pDeviceID OPTIONAL
,
2068 IN HMACHINE hMachine OPTIONAL
);
2071 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeW
2072 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExW
2074 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeA
2075 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExA
2081 CM_Get_Log_Conf_Priority(
2082 IN LOG_CONF lcLogConf
,
2083 OUT PPRIORITY pPriority
,
2089 CM_Get_Log_Conf_Priority_Ex(
2090 IN LOG_CONF lcLogConf
,
2091 OUT PPRIORITY pPriority
,
2093 IN HMACHINE hMachine
);
2098 CM_Get_Next_Log_Conf(
2099 OUT PLOG_CONF plcLogConf OPTIONAL
,
2100 IN LOG_CONF lcLogConf
,
2106 CM_Get_Next_Log_Conf_Ex(
2107 OUT PLOG_CONF plcLogConf OPTIONAL
,
2108 IN LOG_CONF lcLogConf
,
2110 IN HMACHINE hMachine
);
2115 CM_Get_Next_Res_Des(
2116 OUT PRES_DES prdResDes
,
2117 IN RES_DES rdResDes
,
2118 IN RESOURCEID ForResource
,
2119 OUT PRESOURCEID pResourceID
,
2125 CM_Get_Next_Res_Des_Ex(
2126 OUT PRES_DES prdResDes
,
2127 IN RES_DES rdResDes
,
2128 IN RESOURCEID ForResource
,
2129 OUT PRESOURCEID pResourceID
,
2131 IN HMACHINE hMachine
);
2137 OUT PDEVINST pdnDevInst
,
2138 IN DEVINST dnDevInst
,
2145 OUT PDEVINST pdnDevInst
,
2146 IN DEVINST dnDevInst
,
2148 IN HMACHINE hMachine
);
2153 CM_Get_Res_Des_Data(
2154 IN RES_DES rdResDes
,
2162 CM_Get_Res_Des_Data_Ex(
2163 IN RES_DES rdResDes
,
2167 IN HMACHINE hMachine
);
2172 CM_Get_Res_Des_Data_Size(
2174 IN RES_DES rdResDes
,
2180 CM_Get_Res_Des_Data_Size_Ex(
2182 IN RES_DES rdResDes
,
2184 IN HMACHINE hMachine
);
2189 CM_Get_Resource_Conflict_Count(
2190 IN CONFLICT_LIST clConflictList
,
2191 OUT PULONG pulCount
);
2196 CM_Get_Resource_Conflict_DetailsA(
2197 IN CONFLICT_LIST clConflictList
,
2199 IN OUT PCONFLICT_DETAILS_A pConflictDetails
);
2204 CM_Get_Resource_Conflict_DetailsW(
2205 IN CONFLICT_LIST clConflictList
,
2207 IN OUT PCONFLICT_DETAILS_W pConflictDetails
);
2210 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
2212 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
2213 #endif /* UNICODE */
2218 CM_Get_Class_Registry_PropertyW(
2219 IN LPGUID ClassGuid
,
2220 IN ULONG ulProperty
,
2221 OUT PULONG pulRegDataType OPTIONAL
,
2222 OUT PVOID Buffer OPTIONAL
,
2223 IN OUT PULONG pulLength
,
2225 IN HMACHINE hMachine OPTIONAL
);
2230 CM_Set_Class_Registry_PropertyW(
2231 IN LPGUID ClassGuid
,
2232 IN ULONG ulProperty
,
2233 IN PCVOID Buffer OPTIONAL
,
2236 IN HMACHINE hMachine OPTIONAL
);
2241 CM_Get_Class_Registry_PropertyA(
2242 IN LPGUID ClassGuid
,
2243 IN ULONG ulProperty
,
2244 OUT PULONG pulRegDataType OPTIONAL
,
2245 OUT PVOID Buffer OPTIONAL
,
2246 IN OUT PULONG pulLength
,
2248 IN HMACHINE hMachine OPTIONAL
);
2253 CM_Set_Class_Registry_PropertyA(
2254 IN LPGUID ClassGuid
,
2255 IN ULONG ulProperty
,
2256 IN PCVOID Buffer OPTIONAL
,
2259 IN HMACHINE hMachine OPTIONAL
);
2262 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyW
2263 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyW
2265 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyA
2266 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyA
2273 OUT PDEVINST pdnDevInst
,
2281 OUT PDEVINST pdnDevInst
,
2284 IN HMACHINE hMachine
);
2289 CM_Get_Version(VOID
);
2295 IN HMACHINE hMachine
);
2297 #if (WINVER >= _WIN32_WINNT_WINXP)
2302 CM_Is_Version_Available(
2308 CM_Is_Version_Available_Ex(
2310 IN HMACHINE hMachine OPTIONAL
);
2312 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
2317 CM_Intersect_Range_List(
2318 IN RANGE_LIST rlhOld1
,
2319 IN RANGE_LIST rlhOld2
,
2320 IN RANGE_LIST rlhNew
,
2326 CM_Invert_Range_List(
2327 IN RANGE_LIST rlhOld
,
2328 IN RANGE_LIST rlhNew
,
2329 IN DWORDLONG ullMaxValue
,
2335 CM_Is_Dock_Station_Present(
2336 OUT PBOOL pbPresent
);
2341 CM_Is_Dock_Station_Present_Ex(
2342 OUT PBOOL pbPresent
,
2343 IN HMACHINE hMachine OPTIONAL
);
2349 OUT PDEVINST pdnDevInst
,
2350 IN DEVINSTID_A pDeviceID OPTIONAL
,
2356 CM_Locate_DevNode_ExA(
2357 OUT PDEVINST pdnDevInst
,
2358 IN DEVINSTID_A pDeviceID OPTIONAL
,
2360 IN HMACHINE hMachine
);
2365 CM_Locate_DevNode_ExW(
2366 OUT PDEVINST pdnDevInst
,
2367 IN DEVINSTID_W pDeviceID OPTIONAL
,
2369 IN HMACHINE hMachine
);
2375 OUT PDEVINST pdnDevInst
,
2376 IN DEVINSTID_W pDeviceID OPTIONAL
,
2379 #define CM_Locate_DevInstA CM_Locate_DevNodeA
2380 #define CM_Locate_DevInstW CM_Locate_DevNodeW
2381 #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
2382 #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
2385 #define CM_Locate_DevNode CM_Locate_DevNodeW
2386 #define CM_Locate_DevInst CM_Locate_DevNodeW
2387 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
2388 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
2390 #define CM_Locate_DevNode CM_Locate_DevNodeA
2391 #define CM_Locate_DevInst CM_Locate_DevNodeA
2392 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
2393 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
2394 #endif /* UNICODE */
2399 CM_Merge_Range_List(
2400 IN RANGE_LIST rlhOld1
,
2401 IN RANGE_LIST rlhOld2
,
2402 IN RANGE_LIST rlhNew
,
2409 OUT PRES_DES prdResDes
,
2410 IN RES_DES rdResDes
,
2411 IN RESOURCEID ResourceID
,
2412 IN PCVOID ResourceData
,
2413 IN ULONG ResourceLen
,
2419 CM_Modify_Res_Des_Ex(
2420 OUT PRES_DES prdResDes
,
2421 IN RES_DES rdResDes
,
2422 IN RESOURCEID ResourceID
,
2423 IN PCVOID ResourceData
,
2424 IN ULONG ResourceLen
,
2426 IN HMACHINE hMachine
);
2432 IN DEVINST dnFromDevInst
,
2433 IN DEVINST dnToDevInst
,
2440 IN DEVINST dnFromDevInst
,
2441 IN DEVINST dnToDevInst
,
2443 IN HMACHINE hMachine OPTIONAL
);
2445 #define CM_Move_DevInst CM_Move_DevNode
2446 #define CM_Move_DevInst_Ex CM_Move_DevNode_Ex
2452 IN OUT PRANGE_ELEMENT preElement
,
2453 OUT PDWORDLONG pullStart
,
2454 OUT PDWORDLONG pullEnd
,
2461 IN LPGUID ClassGuid OPTIONAL
,
2462 IN LPCSTR pszClassName OPTIONAL
,
2463 IN REGSAM samDesired
,
2464 IN REGDISPOSITION Disposition
,
2472 IN LPGUID ClassGuid OPTIONAL
,
2473 IN LPCWSTR pszClassName OPTIONAL
,
2474 IN REGSAM samDesired
,
2475 IN REGDISPOSITION Disposition
,
2482 CM_Open_Class_Key_ExA(
2483 IN LPGUID pszClassGuid OPTIONAL
,
2484 IN LPCSTR pszClassName OPTIONAL
,
2485 IN REGSAM samDesired
,
2486 IN REGDISPOSITION Disposition
,
2489 IN HMACHINE hMachine
);
2494 CM_Open_Class_Key_ExW(
2495 IN LPGUID pszClassGuid OPTIONAL
,
2496 IN LPCWSTR pszClassName OPTIONAL
,
2497 IN REGSAM samDesired
,
2498 IN REGDISPOSITION Disposition
,
2501 IN HMACHINE hMachine
);
2504 #define CM_Open_Class_Key CM_Open_Class_KeyW
2505 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
2507 #define CM_Open_Class_Key CM_Open_Class_KeyA
2508 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
2509 #endif /* UNICODE */
2514 CM_Open_DevNode_Key(
2515 IN DEVINST dnDevNode
,
2516 IN REGSAM samDesired
,
2517 IN ULONG ulHardwareProfile
,
2518 IN REGDISPOSITION Disposition
,
2519 OUT PHKEY phkDevice
,
2525 CM_Open_DevNode_Key_Ex(
2526 IN DEVINST dnDevNode
,
2527 IN REGSAM samDesired
,
2528 IN ULONG ulHardwareProfile
,
2529 IN REGDISPOSITION Disposition
,
2530 OUT PHKEY phkDevice
,
2532 IN HMACHINE hMachine
);
2534 #define CM_Open_DevInst_Key CM_Open_DevNode_Key
2535 #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
2537 #if (WINVER >= _WIN32_WINNT_VISTA)
2542 CM_Open_Device_Interface_KeyA(
2543 IN LPCSTR pszDeviceInterface
,
2544 IN REGSAM samDesired
,
2545 IN REGDISPOSITION Disposition
,
2546 OUT PHKEY phkDeviceInterface
,
2552 CM_Open_Device_Interface_KeyW(
2553 IN LPCWSTR pszDeviceInterface
,
2554 IN REGSAM samDesired
,
2555 IN REGDISPOSITION Disposition
,
2556 OUT PHKEY phkDeviceInterface
,
2562 CM_Open_Device_Interface_Key_ExA(
2563 IN LPCSTR pszDeviceInterface
,
2564 IN REGSAM samDesired
,
2565 IN REGDISPOSITION Disposition
,
2566 OUT PHKEY phkDeviceInterface
,
2568 IN HMACHINE hMachine OPTIONAL
);
2573 CM_Open_Device_Interface_Key_ExW(
2574 IN LPCWSTR pszDeviceInterface
,
2575 IN REGSAM samDesired
,
2576 IN REGDISPOSITION Disposition
,
2577 OUT PHKEY phkDeviceInterface
,
2579 IN HMACHINE hMachine OPTIONAL
);
2582 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyW
2583 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExW
2585 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyA
2586 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExA
2592 CM_Delete_Device_Interface_KeyA(
2593 IN LPCSTR pszDeviceInterface
,
2599 CM_Delete_Device_Interface_KeyW(
2600 IN LPCWSTR pszDeviceInterface
,
2606 CM_Delete_Device_Interface_Key_ExA(
2607 IN LPCSTR pszDeviceInterface
,
2609 IN HMACHINE hMachine OPTIONAL
);
2614 CM_Delete_Device_Interface_Key_ExW(
2615 IN LPCWSTR pszDeviceInterface
,
2617 IN HMACHINE hMachine OPTIONAL
);
2620 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyW
2621 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExW
2623 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyA
2624 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExA
2627 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2632 CM_Query_Arbitrator_Free_Data(
2635 IN DEVINST dnDevInst
,
2636 IN RESOURCEID ResourceID
,
2642 CM_Query_Arbitrator_Free_Data_Ex(
2645 IN DEVINST dnDevInst
,
2646 IN RESOURCEID ResourceID
,
2648 IN HMACHINE hMachine OPTIONAL
);
2653 CM_Query_Arbitrator_Free_Size(
2655 IN DEVINST dnDevInst
,
2656 IN RESOURCEID ResourceID
,
2662 CM_Query_Arbitrator_Free_Size_Ex(
2664 IN DEVINST dnDevInst
,
2665 IN RESOURCEID ResourceID
,
2667 IN HMACHINE hMachine OPTIONAL
);
2672 CM_Query_Remove_SubTree(
2673 IN DEVINST dnAncestor
,
2679 CM_Query_Remove_SubTree_Ex(
2680 IN DEVINST dnAncestor
,
2682 IN HMACHINE hMachine OPTIONAL
);
2687 CM_Query_And_Remove_SubTreeA(
2688 IN DEVINST dnAncestor
,
2689 OUT PPNP_VETO_TYPE pVetoType
,
2690 OUT LPSTR pszVetoName
,
2691 IN ULONG ulNameLength
,
2697 CM_Query_And_Remove_SubTreeW(
2698 IN DEVINST dnAncestor
,
2699 OUT PPNP_VETO_TYPE pVetoType
,
2700 OUT LPWSTR pszVetoName
,
2701 IN ULONG ulNameLength
,
2707 CM_Query_And_Remove_SubTree_ExA(
2708 IN DEVINST dnAncestor
,
2709 OUT PPNP_VETO_TYPE pVetoType
,
2710 OUT LPSTR pszVetoName
,
2711 IN ULONG ulNameLength
,
2713 IN HMACHINE hMachine
);
2718 CM_Query_And_Remove_SubTree_ExW(
2719 IN DEVINST dnAncestor
,
2720 OUT PPNP_VETO_TYPE pVetoType
,
2721 OUT LPWSTR pszVetoName
,
2722 IN ULONG ulNameLength
,
2724 IN HMACHINE hMachine
);
2727 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeW
2728 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExW
2730 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeA
2731 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExA
2737 CM_Query_Resource_Conflict_List(
2738 OUT PCONFLICT_LIST pclConflictList
,
2739 IN DEVINST dnDevInst
,
2740 IN RESOURCEID ResourceID
,
2741 IN PCVOID ResourceData
,
2742 IN ULONG ResourceLen
,
2744 IN HMACHINE hMachine OPTIONAL
);
2749 CM_Reenumerate_DevNode(
2750 IN DEVINST dnDevInst
,
2756 CM_Reenumerate_DevNode_Ex(
2757 IN DEVINST dnDevInst
,
2759 IN HMACHINE hMachine
);
2761 #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
2762 #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
2767 CM_Register_Device_InterfaceA(
2768 IN DEVINST dnDevInst
,
2769 IN LPGUID InterfaceClassGuid
,
2770 IN LPCSTR pszReference OPTIONAL
,
2771 OUT LPSTR pszDeviceInterface
,
2772 IN OUT PULONG pulLength
,
2778 CM_Register_Device_InterfaceW(
2779 IN DEVINST dnDevInst
,
2780 IN LPGUID InterfaceClassGuid
,
2781 IN LPCWSTR pszReference OPTIONAL
,
2782 OUT LPWSTR pszDeviceInterface
,
2783 IN OUT PULONG pulLength
,
2789 CM_Register_Device_Interface_ExA(
2790 IN DEVINST dnDevInst
,
2791 IN LPGUID InterfaceClassGuid
,
2792 IN LPCSTR pszReference OPTIONAL
,
2793 OUT LPSTR pszDeviceInterface
,
2794 IN OUT PULONG pulLength
,
2796 IN HMACHINE hMachine OPTIONAL
);
2801 CM_Register_Device_Interface_ExW(
2802 IN DEVINST dnDevInst
,
2803 IN LPGUID InterfaceClassGuid
,
2804 IN LPCWSTR pszReference OPTIONAL
,
2805 OUT LPWSTR pszDeviceInterface
,
2806 IN OUT PULONG pulLength
,
2808 IN HMACHINE hMachine OPTIONAL
);
2811 #define CM_Register_Device_Interface CM_Register_Device_InterfaceW
2812 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExW
2814 #define CM_Register_Device_Interface CM_Register_Device_InterfaceA
2815 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExA
2821 CM_Request_Device_EjectA(
2822 IN DEVINST dnDevInst
,
2823 OUT PPNP_VETO_TYPE pVetoType
,
2824 OUT LPSTR pszVetoName
,
2825 IN ULONG ulNameLength
,
2831 CM_Request_Device_Eject_ExW(
2832 IN DEVINST dnDevInst
,
2833 OUT PPNP_VETO_TYPE pVetoType
,
2834 OUT LPWSTR pszVetoName
,
2835 IN ULONG ulNameLength
,
2837 IN HMACHINE hMachine
);
2842 CM_Request_Device_Eject_ExA(
2843 IN DEVINST dnDevInst
,
2844 OUT PPNP_VETO_TYPE pVetoType
,
2845 OUT LPSTR pszVetoName
,
2846 IN ULONG ulNameLength
,
2848 IN HMACHINE hMachine
);
2853 CM_Request_Device_EjectW(
2854 IN DEVINST dnDevInst
,
2855 OUT PPNP_VETO_TYPE pVetoType
,
2856 OUT LPWSTR pszVetoName
,
2857 IN ULONG ulNameLength
,
2861 #define CM_Request_Device_Eject CM_Request_Device_EjectW
2862 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
2864 #define CM_Request_Device_Eject CM_Request_Device_EjectA
2865 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
2871 CM_Request_Eject_PC(VOID
);
2876 CM_Request_Eject_PC_Ex(
2877 IN HMACHINE hMachine OPTIONAL
);
2888 CM_Run_Detection_Ex(
2890 IN HMACHINE hMachine OPTIONAL
);
2892 #if (WINVER >= _WIN32_WINNT_VISTA)
2895 CM_Apply_PowerScheme(VOID
);
2898 CM_Write_UserPowerKey(
2899 IN CONST GUID
*SchemeGuid OPTIONAL
,
2900 IN CONST GUID
*SubGroupOfPowerSettingsGuid OPTIONAL
,
2901 IN CONST GUID
*PowerSettingGuid OPTIONAL
,
2902 IN ULONG AccessFlags
,
2905 IN DWORD BufferSize
,
2909 CM_Set_ActiveScheme(
2910 IN CONST GUID
*SchemeGuid
,
2914 CM_Restore_DefaultPowerScheme(
2915 IN CONST GUID
*SchemeGuid
,
2919 CM_RestoreAll_DefaultPowerSchemes(
2923 CM_Duplicate_PowerScheme(
2924 IN CONST GUID
*SourceSchemeGuid
,
2925 IN GUID
**DestinationSchemeGuid
,
2929 CM_Delete_PowerScheme(
2930 IN CONST GUID
*SchemeGuid
,
2934 CM_Import_PowerScheme(
2935 IN LPCWSTR ImportFileNamePath
,
2936 IN OUT GUID
**DestinationSchemeGuid
,
2939 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2944 CM_Set_DevNode_Problem(
2945 IN DEVINST dnDevInst
,
2952 CM_Set_DevNode_Problem_Ex(
2953 IN DEVINST dnDevInst
,
2956 IN HMACHINE hMachine
);
2958 #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
2959 #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
2964 CM_Unregister_Device_InterfaceA(
2965 IN LPCSTR pszDeviceInterface
,
2971 CM_Unregister_Device_InterfaceW(
2972 IN LPCWSTR pszDeviceInterface
,
2978 CM_Unregister_Device_Interface_ExA(
2979 IN LPCSTR pszDeviceInterface
,
2981 IN HMACHINE hMachine OPTIONAL
);
2986 CM_Unregister_Device_Interface_ExW(
2987 IN LPCWSTR pszDeviceInterface
,
2989 IN HMACHINE hMachine OPTIONAL
);
2992 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceW
2993 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExW
2995 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceA
2996 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExA
3002 CM_Register_Device_Driver(
3003 IN DEVINST dnDevInst
,
3009 CM_Register_Device_Driver_Ex(
3010 IN DEVINST dnDevInst
,
3012 IN HMACHINE hMachine OPTIONAL
);
3018 IN DEVINST dnAncestor
,
3024 CM_Remove_SubTree_Ex(
3025 IN DEVINST dnAncestor
,
3027 IN HMACHINE hMachine OPTIONAL
);
3032 CM_Set_DevNode_Registry_PropertyA(
3033 IN DEVINST dnDevInst
,
3034 IN ULONG ulProperty
,
3035 IN PCVOID Buffer OPTIONAL
,
3042 CM_Set_DevNode_Registry_PropertyW(
3043 IN DEVINST dnDevInst
,
3044 IN ULONG ulProperty
,
3045 IN PCVOID Buffer OPTIONAL
,
3052 CM_Set_DevNode_Registry_Property_ExA(
3053 IN DEVINST dnDevInst
,
3054 IN ULONG ulProperty
,
3055 IN PCVOID Buffer OPTIONAL
,
3058 IN HMACHINE hMachine
);
3063 CM_Set_DevNode_Registry_Property_ExW(
3064 IN DEVINST dnDevInst
,
3065 IN ULONG ulProperty
,
3066 IN PCVOID Buffer OPTIONAL
,
3069 IN HMACHINE hMachine
);
3071 #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
3072 #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
3073 #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
3074 #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
3077 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
3078 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3079 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
3080 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3082 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
3083 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3084 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
3085 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3086 #endif /* UNICODE */
3092 IN ULONG ulHardwareProfile
,
3099 IN ULONG ulHardwareProfile
,
3101 IN HMACHINE hMachine
);
3106 CM_Set_HW_Prof_FlagsA(
3107 IN DEVINSTID_A szDevInstName
,
3115 CM_Set_HW_Prof_FlagsW(
3116 IN DEVINSTID_W szDevInstName
,
3124 CM_Set_HW_Prof_Flags_ExA(
3125 IN DEVINSTID_A szDevInstName
,
3129 IN HMACHINE hMachine
);
3134 CM_Set_HW_Prof_Flags_ExW(
3135 IN DEVINSTID_W szDevInstName
,
3139 IN HMACHINE hMachine
);
3142 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
3143 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
3145 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
3146 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
3147 #endif /* UNICODE */
3153 IN DEVINST dnDevInst
,
3159 CM_Setup_DevNode_Ex(
3160 IN DEVINST dnDevInst
,
3162 IN HMACHINE hMachine OPTIONAL
);
3164 #define CM_Setup_DevInst CM_Setup_DevNode
3165 #define CM_Setup_DevInst_Ex CM_Setup_DevNode_Ex
3170 CM_Test_Range_Available(
3171 IN DWORDLONG ullStartValue
,
3172 IN DWORDLONG ullEndValue
,
3179 CM_Uninstall_DevNode(
3180 IN DEVINST dnPhantom
,
3186 CM_Uninstall_DevNode_Ex(
3187 IN DEVINST dnPhantom
,
3189 IN HMACHINE hMachine
);
3191 #define CM_Uninstall_DevInst CM_Uninstall_DevNode
3192 #define CM_Uninstall_DevInst_Ex CM_Uninstall_DevNode_Ex
3195 #if (WINVER >= _WIN32_WINNT_WIN2K)
3197 #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
3202 CMP_WaitNoPendingInstallEvents(
3203 IN DWORD dwTimeout
);
3205 #endif /* (WINVER >= _WIN32_WINNT_WIN2K) */