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 #define CM_HWPI_NOT_DOCKABLE 0x00000000
547 #define CM_HWPI_UNDOCKED 0x00000001
548 #define CM_HWPI_DOCKED 0x00000002
550 typedef struct HWProfileInfo_sA
{
551 ULONG HWPI_ulHWProfile
;
552 CHAR HWPI_szFriendlyName
[MAX_PROFILE_LEN
];
554 } HWPROFILEINFO_A
, *PHWPROFILEINFO_A
;
556 typedef struct HWProfileInfo_sW
{
557 ULONG HWPI_ulHWProfile
;
558 WCHAR HWPI_szFriendlyName
[MAX_PROFILE_LEN
];
560 } HWPROFILEINFO_W
, *PHWPROFILEINFO_W
;
563 typedef HWPROFILEINFO_W HWPROFILEINFO
;
564 typedef PHWPROFILEINFO_W PHWPROFILEINFO
;
566 typedef HWPROFILEINFO_A HWPROFILEINFO
;
567 typedef PHWPROFILEINFO_A PHWPROFILEINFO
;
572 #define ResType_All 0x00000000
573 #define ResType_None 0x00000000
574 #define ResType_Mem 0x00000001
575 #define ResType_IO 0x00000002
576 #define ResType_DMA 0x00000003
577 #define ResType_IRQ 0x00000004
578 #define ResType_DoNotUse 0x00000005
579 #define ResType_BusNumber 0x00000006
580 #define ResType_MemLarge 0x00000007
581 #define ResType_MAX 0x00000007
582 #define ResType_Ignored_Bit 0x00008000
583 #define ResType_ClassSpecific 0x0000FFFF
584 #define ResType_Reserved 0x00008000
585 #define ResType_DevicePrivate 0x00008001
586 #define ResType_PcCardConfig 0x00008002
587 #define ResType_MfCardConfig 0x00008003
589 #define CM_ADD_RANGE_ADDIFCONFLICT 0x00000000
590 #define CM_ADD_RANGE_DONOTADDIFCONFLICT 0x00000001
591 #define CM_ADD_RANGE_BITS 0x00000001
593 #define BASIC_LOG_CONF 0x00000000
594 #define FILTERED_LOG_CONF 0x00000001
595 #define ALLOC_LOG_CONF 0x00000002
596 #define BOOT_LOG_CONF 0x00000003
597 #define FORCED_LOG_CONF 0x00000004
598 #define OVERRIDE_LOG_CONF 0x00000005
599 #define NUM_LOG_CONF 0x00000006
600 #define LOG_CONF_BITS 0x00000007
602 #define PRIORITY_EQUAL_FIRST 0x00000008
603 #define PRIORITY_EQUAL_LAST 0x00000000
604 #define PRIORITY_BIT 0x00000008
606 #define RegDisposition_OpenAlways 0x00000000
607 #define RegDisposition_OpenExisting 0x00000001
608 #define RegDisposition_Bits 0x00000001
610 /* CM_Add_ID.ulFlags constants */
611 #define CM_ADD_ID_HARDWARE 0x00000000
612 #define CM_ADD_ID_COMPATIBLE 0x00000001
613 #define CM_ADD_ID_BITS 0x00000001
615 /* Flags for CM_Create_DevNode[_Ex].ulFlags constants */
616 #define CM_CREATE_DEVNODE_NORMAL 0x00000000
617 #define CM_CREATE_DEVNODE_NO_WAIT_INSTALL 0x00000001
618 #define CM_CREATE_DEVNODE_PHANTOM 0x00000002
619 #define CM_CREATE_DEVNODE_GENERATE_ID 0x00000004
620 #define CM_CREATE_DEVNODE_DO_NOT_INSTALL 0x00000008
621 #define CM_CREATE_DEVNODE_BITS 0x0000000F
623 #define CM_CREATE_DEVINST_NORMAL CM_CREATE_DEVNODE_NORMAL
624 #define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
625 #define CM_CREATE_DEVINST_PHANTOM CM_CREATE_DEVNODE_PHANTOM
626 #define CM_CREATE_DEVINST_GENERATE_ID CM_CREATE_DEVNODE_GENERATE_ID
627 #define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
628 #define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
630 /* Flags for CM_Delete_Class_Key.ulFlags constants */
631 #define CM_DELETE_CLASS_ONLY 0x00000000
632 #define CM_DELETE_CLASS_SUBKEYS 0x00000001
633 #if (WINVER >= _WIN32_WINNT_VISTA)
634 #define CM_DELETE_CLASS_INTERFACE 0x00000002
636 #define CM_DELETE_CLASS_BITS 0x00000003
638 /* CM_Run_Detection[_Ex].ulFlags constants */
639 #define CM_DETECT_NEW_PROFILE 0x00000001
640 #define CM_DETECT_CRASHED 0x00000002
641 #define CM_DETECT_HWPROF_FIRST_BOOT 0x00000004
642 #define CM_DETECT_RUN 0x80000000
643 #define CM_DETECT_BITS 0x80000007
645 #define CM_DISABLE_POLITE 0x00000000
646 #define CM_DISABLE_ABSOLUTE 0x00000001
647 #define CM_DISABLE_HARDWARE 0x00000002
648 #define CM_DISABLE_UI_NOT_OK 0x00000004
649 #define CM_DISABLE_BITS 0x00000007
651 #define CM_GETIDLIST_FILTER_NONE 0x00000000
652 #define CM_GETIDLIST_FILTER_ENUMERATOR 0x00000001
653 #define CM_GETIDLIST_FILTER_SERVICE 0x00000002
654 #define CM_GETIDLIST_FILTER_EJECTRELATIONS 0x00000004
655 #define CM_GETIDLIST_FILTER_REMOVALRELATIONS 0x00000008
656 #define CM_GETIDLIST_FILTER_POWERRELATIONS 0x00000010
657 #define CM_GETIDLIST_FILTER_BUSRELATIONS 0x00000020
658 #define CM_GETIDLIST_DONOTGENERATE 0x10000040
659 #if (WINVER <= _WIN32_WINNT_VISTA)
660 #define CM_GETIDLIST_FILTER_BITS 0x1000007F
662 #if (WINVER >= _WIN32_WINNT_WIN7)
663 #define CM_GETIDLIST_FILTER_TRANSPORTRELATIONS 0x00000080
664 #define CM_GETIDLIST_FILTER_PRESENT 0x00000100
665 #define CM_GETIDLIST_FILTER_CLASS 0x00000200
666 #define CM_GETIDLIST_FILTER_BITS 0x100003FF
669 #define CM_GET_DEVICE_INTERFACE_LIST_PRESENT 0x00000000
670 #define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES 0x00000001
671 #define CM_GET_DEVICE_INTERFACE_LIST_BITS 0x00000001
673 #define CM_DRP_DEVICEDESC 0x00000001
674 #define CM_DRP_HARDWAREID 0x00000002
675 #define CM_DRP_COMPATIBLEIDS 0x00000003
676 #define CM_DRP_UNUSED0 0x00000004
677 #define CM_DRP_SERVICE 0x00000005
678 #define CM_DRP_UNUSED1 0x00000006
679 #define CM_DRP_UNUSED2 0x00000007
680 #define CM_DRP_CLASS 0x00000008
681 #define CM_DRP_CLASSGUID 0x00000009
682 #define CM_DRP_DRIVER 0x0000000A
683 #define CM_DRP_CONFIGFLAGS 0x0000000B
684 #define CM_DRP_MFG 0x0000000C
685 #define CM_DRP_FRIENDLYNAME 0x0000000D
686 #define CM_DRP_LOCATION_INFORMATION 0x0000000E
687 #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F
688 #define CM_DRP_CAPABILITIES 0x00000010
689 #define CM_DRP_UI_NUMBER 0x00000011
690 #define CM_DRP_UPPERFILTERS 0x00000012
691 #if (WINVER >= _WIN32_WINNT_VISTA)
692 #define CM_CRP_UPPERFILTERS CM_DRP_UPPERFILTERS
694 #define CM_DRP_LOWERFILTERS 0x00000013
695 #if (WINVER >= _WIN32_WINNT_VISTA)
696 #define CM_CRP_LOWERFILTERS CM_DRP_LOWERFILTERS
698 #define CM_DRP_BUSTYPEGUID 0x00000014
699 #define CM_DRP_LEGACYBUSTYPE 0x00000015
700 #define CM_DRP_BUSNUMBER 0x00000016
701 #define CM_DRP_ENUMERATOR_NAME 0x00000017
702 #define CM_DRP_SECURITY 0x00000018
703 #define CM_CRP_SECURITY CM_DRP_SECURITY
704 #define CM_DRP_SECURITY_SDS 0x00000019
705 #define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS
706 #define CM_DRP_DEVTYPE 0x0000001A
707 #define CM_CRP_DEVTYPE CM_DRP_DEVTYPE
708 #define CM_DRP_EXCLUSIVE 0x0000001B
709 #define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE
710 #define CM_DRP_CHARACTERISTICS 0x0000001C
711 #define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS
712 #define CM_DRP_ADDRESS 0x0000001D
713 #define CM_DRP_UI_NUMBER_DESC_FORMAT 0x0000001E
714 #if (WINVER >= _WIN32_WINNT_WINXP)
715 #define CM_DRP_DEVICE_POWER_DATA 0x0000001F
716 #define CM_DRP_REMOVAL_POLICY 0x00000020
717 #define CM_DRP_REMOVAL_POLICY_HW_DEFAULT 0x00000021
718 #define CM_DRP_REMOVAL_POLICY_OVERRIDE 0x00000022
719 #define CM_DRP_INSTALL_STATE 0x00000023
721 #if (WINVER >= _WIN32_WINNT_WS03)
722 #define CM_DRP_LOCATION_PATHS 0x00000024
724 #if (WINVER >= _WIN32_WINNT_WIN7)
725 #define CM_DRP_BASE_CONTAINERID 0x00000025
727 #define CM_DRP_MIN 0x00000001
728 #define CM_CRP_MIN CM_DRP_MIN
729 #define CM_DRP_MAX 0x00000025
730 #define CM_CRP_MAX CM_DRP_MAX
732 #define CM_DEVCAP_LOCKSUPPORTED 0x00000001
733 #define CM_DEVCAP_EJECTSUPPORTED 0x00000002
734 #define CM_DEVCAP_REMOVABLE 0x00000004
735 #define CM_DEVCAP_DOCKDEVICE 0x00000008
736 #define CM_DEVCAP_UNIQUEID 0x00000010
737 #define CM_DEVCAP_SILENTINSTALL 0x00000020
738 #define CM_DEVCAP_RAWDEVICEOK 0x00000040
739 #define CM_DEVCAP_SURPRISEREMOVALOK 0x00000080
740 #define CM_DEVCAP_HARDWAREDISABLED 0x00000100
741 #define CM_DEVCAP_NONDYNAMIC 0x00000200
743 #if (WINVER >= _WIN32_WINNT_WINXP)
745 #define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
746 #define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
747 #define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
749 #define CM_INSTALL_STATE_INSTALLED 0
750 #define CM_INSTALL_STATE_NEEDS_REINSTALL 1
751 #define CM_INSTALL_STATE_FAILED_INSTALL 2
752 #define CM_INSTALL_STATE_FINISH_INSTALL 3
754 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
756 /* CM_Locate_DevNode.ulFlags constants */
757 #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
758 #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
759 #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
760 #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
761 #define CM_LOCATE_DEVNODE_BITS 0x00000007
763 #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
764 #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
765 #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
766 #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
767 #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
769 #define CM_OPEN_CLASS_KEY_INSTALLER 0x00000000
770 #define CM_OPEN_CLASS_KEY_INTERFACE 0x00000001
771 #define CM_OPEN_CLASS_KEY_BITS 0x00000001
773 /* CM_Query_And_Remove_SubTree.ulFlags constants */
774 #define CM_REMOVE_UI_OK 0x00000000
775 #define CM_REMOVE_UI_NOT_OK 0x00000001
776 #define CM_REMOVE_NO_RESTART 0x00000002
777 #define CM_REMOVE_BITS 0x00000003
779 #define CM_QUERY_REMOVE_UI_OK (CM_REMOVE_UI_OK)
780 #define CM_QUERY_REMOVE_UI_NOT_OK (CM_REMOVE_UI_NOT_OK)
781 #define CM_QUERY_REMOVE_BITS (CM_QUERY_REMOVE_UI_OK|CM_QUERY_REMOVE_UI_NOT_OK)
783 /* CM_Reenumerate_DevNode.ulFlags constants */
784 #define CM_REENUMERATE_NORMAL 0x00000000
785 #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
786 #if (WINVER >= _WIN32_WINNT_WINXP)
787 #define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
788 #define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
790 #define CM_REENUMERATE_BITS 0x00000007
792 #define CM_REGISTER_DEVICE_DRIVER_STATIC 0x00000000
793 #define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE 0x00000001
794 #define CM_REGISTER_DEVICE_DRIVER_REMOVABLE 0x00000002
795 #define CM_REGISTER_DEVICE_DRIVER_BITS 0x00000003
797 #define CM_REGISTRY_HARDWARE 0x00000000
798 #define CM_REGISTRY_SOFTWARE 0x00000001
799 #define CM_REGISTRY_USER 0x00000100
800 #define CM_REGISTRY_CONFIG 0x00000200
801 #define CM_REGISTRY_BITS 0x00000301
803 #define CM_SET_DEVNODE_PROBLEM_NORMAL 0x00000000
804 #define CM_SET_DEVNODE_PROBLEM_OVERRIDE 0x00000001
805 #define CM_SET_DEVNODE_PROBLEM_BITS 0x00000001
807 #define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
808 #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
809 #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
811 /* CM_Set_HW_Prof_Flags[_Ex].ulFlags constants */
812 #define CM_SET_HW_PROF_FLAGS_UI_NOT_OK 0x00000001
813 #define CM_SET_HW_PROF_FLAGS_BITS 0x00000001
815 /* CM_Setup_DevInst[_Ex].ulFlags constants */
816 #define CM_SETUP_DEVNODE_READY 0x00000000
817 #define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
818 #define CM_SETUP_DOWNLOAD 0x00000001
819 #define CM_SETUP_WRITE_LOG_CONFS 0x00000002
820 #define CM_SETUP_PROP_CHANGE 0x00000003
821 #if (WINVER >= _WIN32_WINNT_WINXP)
822 #define CM_SETUP_DEVNODE_RESET 0x00000004
823 #define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
825 #define CM_SETUP_BITS 0x00000007
827 #define CM_QUERY_ARBITRATOR_RAW 0x00000000
828 #define CM_QUERY_ARBITRATOR_TRANSLATED 0x00000001
829 #define CM_QUERY_ARBITRATOR_BITS 0x00000001
831 #if (WINVER >= _WIN32_WINNT_WINXP)
832 #define CM_CUSTOMDEVPROP_MERGE_MULTISZ 0x00000001
833 #define CM_CUSTOMDEVPROP_BITS 0x00000001
836 #define CM_NAME_ATTRIBUTE_NAME_RETRIEVED_FROM_DEVICE 0x1
837 #define CM_NAME_ATTRIBUTE_USER_ASSIGNED_NAME 0x2
839 #define CR_SUCCESS 0x00000000
840 #define CR_DEFAULT 0x00000001
841 #define CR_OUT_OF_MEMORY 0x00000002
842 #define CR_INVALID_POINTER 0x00000003
843 #define CR_INVALID_FLAG 0x00000004
844 #define CR_INVALID_DEVNODE 0x00000005
845 #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
846 #define CR_INVALID_RES_DES 0x00000006
847 #define CR_INVALID_LOG_CONF 0x00000007
848 #define CR_INVALID_ARBITRATOR 0x00000008
849 #define CR_INVALID_NODELIST 0x00000009
850 #define CR_DEVNODE_HAS_REQS 0x0000000A
851 #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
852 #define CR_INVALID_RESOURCEID 0x0000000B
853 #define CR_DLVXD_NOT_FOUND 0x0000000C
854 #define CR_NO_SUCH_DEVNODE 0x0000000D
855 #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
856 #define CR_NO_MORE_LOG_CONF 0x0000000E
857 #define CR_NO_MORE_RES_DES 0x0000000F
858 #define CR_ALREADY_SUCH_DEVNODE 0x00000010
859 #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
860 #define CR_INVALID_RANGE_LIST 0x00000011
861 #define CR_INVALID_RANGE 0x00000012
862 #define CR_FAILURE 0x00000013
863 #define CR_NO_SUCH_LOGICAL_DEV 0x00000014
864 #define CR_CREATE_BLOCKED 0x00000015
865 #define CR_NOT_SYSTEM_VM 0x00000016
866 #define CR_REMOVE_VETOED 0x00000017
867 #define CR_APM_VETOED 0x00000018
868 #define CR_INVALID_LOAD_TYPE 0x00000019
869 #define CR_BUFFER_SMALL 0x0000001A
870 #define CR_NO_ARBITRATOR 0x0000001B
871 #define CR_NO_REGISTRY_HANDLE 0x0000001C
872 #define CR_REGISTRY_ERROR 0x0000001D
873 #define CR_INVALID_DEVICE_ID 0x0000001E
874 #define CR_INVALID_DATA 0x0000001F
875 #define CR_INVALID_API 0x00000020
876 #define CR_DEVLOADER_NOT_READY 0x00000021
877 #define CR_NEED_RESTART 0x00000022
878 #define CR_NO_MORE_HW_PROFILES 0x00000023
879 #define CR_DEVICE_NOT_THERE 0x00000024
880 #define CR_NO_SUCH_VALUE 0x00000025
881 #define CR_WRONG_TYPE 0x00000026
882 #define CR_INVALID_PRIORITY 0x00000027
883 #define CR_NOT_DISABLEABLE 0x00000028
884 #define CR_FREE_RESOURCES 0x00000029
885 #define CR_QUERY_VETOED 0x0000002A
886 #define CR_CANT_SHARE_IRQ 0x0000002B
887 #define CR_NO_DEPENDENT 0x0000002C
888 #define CR_SAME_RESOURCES 0x0000002D
889 #define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
890 #define CR_INVALID_MACHINENAME 0x0000002F
891 #define CR_REMOTE_COMM_FAILURE 0x00000030
892 #define CR_MACHINE_UNAVAILABLE 0x00000031
893 #define CR_NO_CM_SERVICES 0x00000032
894 #define CR_ACCESS_DENIED 0x00000033
895 #define CR_CALL_NOT_IMPLEMENTED 0x00000034
896 #define CR_INVALID_PROPERTY 0x00000035
897 #define CR_DEVICE_INTERFACE_ACTIVE 0x00000036
898 #define CR_NO_SUCH_DEVICE_INTERFACE 0x00000037
899 #define CR_INVALID_REFERENCE_STRING 0x00000038
900 #define CR_INVALID_CONFLICT_LIST 0x00000039
901 #define CR_INVALID_INDEX 0x0000003A
902 #define CR_INVALID_STRUCTURE_SIZE 0x0000003B
903 #define NUM_CR_RESULTS 0x0000003C
905 #define CM_GLOBAL_STATE_CAN_DO_UI 0x00000001
906 #define CM_GLOBAL_STATE_ON_BIG_STACK 0x00000002
907 #define CM_GLOBAL_STATE_SERVICES_AVAILABLE 0x00000004
908 #define CM_GLOBAL_STATE_SHUTTING_DOWN 0x00000008
909 #define CM_GLOBAL_STATE_DETECTION_PENDING 0x00000010
910 #if (WINVER >= _WIN32_WINNT_WIN7)
911 #define CM_GLOBAL_STATE_REBOOT_REQUIRED 0x00000020
914 /* FIXME : These definitions don't exist in the official header
916 #define CMP_MAGIC 0x01234567
921 CMP_Init_Detection(IN DWORD dwMagic);
926 CMP_RegisterNotification(
927 IN HANDLE hRecipient,
928 IN LPVOID lpvNotificationFilter,
930 OUT PULONG pluhDevNotify);
937 IN DWORD dwProcessId);
942 CMP_UnregisterNotification(IN ULONG luhDevNotify);
949 CM_Add_Empty_Log_Conf(
950 OUT PLOG_CONF plcLogConf
,
951 IN DEVINST dnDevInst
,
952 IN PRIORITY Priority
,
958 CM_Add_Empty_Log_Conf_Ex(
959 OUT PLOG_CONF plcLogConf
,
960 IN DEVINST dnDevInst
,
961 IN PRIORITY Priority
,
963 IN HMACHINE hMachine
);
969 IN DEVINST dnDevInst
,
977 IN DEVINST dnDevInst
,
980 IN HMACHINE hMachine
);
986 IN DEVINST dnDevInst
,
989 IN HMACHINE hMachine
);
995 IN DEVINST dnDevInst
,
1000 #define CM_Add_ID CM_Add_IDW
1001 #define CM_Add_ID_Ex CM_Add_ID_ExW
1003 #define CM_Add_ID CM_Add_IDA
1004 #define CM_Add_ID_Ex CM_Add_ID_ExA
1005 #endif /* UNICODE */
1011 IN DWORDLONG ullStartValue
,
1012 IN DWORDLONG ullEndValue
,
1020 OUT PRES_DES prdResDes OPTIONAL
,
1021 IN LOG_CONF lcLogConf
,
1022 IN RESOURCEID ResourceID
,
1023 IN PCVOID ResourceData
,
1024 IN ULONG ResourceLen
,
1031 OUT PRES_DES prdResDes OPTIONAL
,
1032 IN LOG_CONF lcLogConf
,
1033 IN RESOURCEID ResourceID
,
1034 IN PCVOID ResourceData
,
1035 IN ULONG ResourceLen
,
1037 IN HMACHINE hMachine
);
1042 CM_Connect_MachineA(
1043 IN PCSTR UNCServerName OPTIONAL
,
1044 OUT PHMACHINE phMachine
);
1049 CM_Connect_MachineW(
1050 IN PCWSTR UNCServerName OPTIONAL
,
1051 OUT PHMACHINE phMachine
);
1054 #define CM_Connect_Machine CM_Connect_MachineW
1056 #define CM_Connect_Machine CM_Connect_MachineA
1057 #endif /* UNICODE */
1063 OUT PDEVINST pdnDevInst
,
1064 IN DEVINSTID_A pDeviceID
,
1065 IN DEVINST dnParent
,
1072 OUT PDEVINST pdnDevInst
,
1073 IN DEVINSTID_W pDeviceID
,
1074 IN DEVINST dnParent
,
1080 CM_Create_DevNode_ExA(
1081 OUT PDEVINST pdnDevInst
,
1082 IN DEVINSTID_A pDeviceID
,
1083 IN DEVINST dnParent
,
1085 IN HANDLE hMachine
);
1090 CM_Create_DevNode_ExW(
1091 OUT PDEVINST pdnDevInst
,
1092 IN DEVINSTID_W pDeviceID
,
1093 IN DEVINST dnParent
,
1095 IN HANDLE hMachine
);
1097 #define CM_Create_DevInstW CM_Create_DevNodeW
1098 #define CM_Create_DevInstA CM_Create_DevNodeA
1099 #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
1100 #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
1102 #define CM_Create_DevNode CM_Create_DevNodeW
1103 #define CM_Create_DevInst CM_Create_DevNodeW
1104 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
1105 #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
1107 #define CM_Create_DevNode CM_Create_DevNodeA
1108 #define CM_Create_DevInst CM_Create_DevNodeA
1109 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
1110 #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
1111 #endif /* UNICODE */
1116 CM_Create_Range_List(
1117 OUT PRANGE_LIST prlh
,
1123 CM_Delete_Class_Key(
1124 IN LPGUID ClassGuid
,
1130 CM_Delete_Class_Key_Ex(
1131 IN LPGUID ClassGuid
,
1133 IN HANDLE hMachine
);
1138 CM_Delete_DevNode_Key(
1139 IN DEVNODE dnDevNode
,
1140 IN ULONG ulHardwareProfile
,
1146 CM_Delete_DevNode_Key_Ex(
1147 IN DEVNODE dnDevNode
,
1148 IN ULONG ulHardwareProfile
,
1150 IN HANDLE hMachine
);
1152 #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
1153 #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
1159 IN DWORDLONG ullStartValue
,
1160 IN DWORDLONG ullEndValue
,
1167 CM_Detect_Resource_Conflict(
1168 IN DEVINST dnDevInst
,
1169 IN RESOURCEID ResourceID
,
1170 IN PCVOID ResourceData
,
1171 IN ULONG ResourceLen
,
1172 OUT PBOOL pbConflictDetected
,
1178 CM_Detect_Resource_Conflict_Ex(
1179 IN DEVINST dnDevInst
,
1180 IN RESOURCEID ResourceID
,
1181 IN PCVOID ResourceData
,
1182 IN ULONG ResourceLen
,
1183 OUT PBOOL pbConflictDetected
,
1185 IN HMACHINE hMachine OPTIONAL
);
1191 IN DEVINST dnDevInst
,
1197 CM_Disable_DevNode_Ex(
1198 IN DEVINST dnDevInst
,
1200 IN HMACHINE hMachine OPTIONAL
);
1202 #define CM_Disable_DevInst CM_Disable_DevNode
1203 #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
1208 CM_Disconnect_Machine(
1209 IN HMACHINE hMachine OPTIONAL
);
1215 IN RANGE_LIST rlhOld
,
1216 IN RANGE_LIST rlhNew
,
1223 IN DEVINST dnDevInst
,
1229 CM_Enable_DevNode_Ex(
1230 IN DEVINST dnDevInst
,
1232 IN HMACHINE hMachine OPTIONAL
);
1234 #define CM_Enable_DevInst CM_Enable_DevNode
1235 #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
1240 CM_Enumerate_Classes(
1241 IN ULONG ulClassIndex
,
1242 OUT LPGUID ClassGuid
,
1248 CM_Enumerate_Classes_Ex(
1249 IN ULONG ulClassIndex
,
1250 OUT LPGUID ClassGuid
,
1252 IN HMACHINE hMachine OPTIONAL
);
1257 CM_Enumerate_EnumeratorsA(
1258 IN ULONG ulEnumIndex
,
1260 IN OUT PULONG pulLength
,
1266 CM_Enumerate_Enumerators_ExA(
1267 IN ULONG ulEnumIndex
,
1269 IN OUT PULONG pulLength
,
1271 IN HMACHINE hMachine OPTIONAL
);
1276 CM_Enumerate_Enumerators_ExW(
1277 IN ULONG ulEnumIndex
,
1279 IN OUT PULONG pulLength
,
1281 IN HMACHINE hMachine OPTIONAL
);
1286 CM_Enumerate_EnumeratorsW(
1287 IN ULONG ulEnumIndex
,
1289 IN OUT PULONG pulLength
,
1293 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
1294 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
1296 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
1297 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
1298 #endif /* UNICODE */
1304 OUT PDWORDLONG pullStart
,
1305 IN DWORDLONG ullStart
,
1307 IN DWORDLONG ullAlignment
,
1308 IN DWORDLONG ullEnd
,
1317 OUT PDWORDLONG pullStart
,
1318 OUT PDWORDLONG pullEnd
,
1319 OUT PRANGE_ELEMENT preElement
,
1326 IN LOG_CONF lcLogConfToBeFreed
,
1332 CM_Free_Log_Conf_Ex(
1333 IN LOG_CONF lcLogConfToBeFreed
,
1335 IN HMACHINE hMachine
);
1340 CM_Free_Log_Conf_Handle(
1341 IN LOG_CONF lcLogConf
);
1354 OUT PRES_DES prdResDes
,
1355 IN RES_DES rdResDes
,
1362 OUT PRES_DES prdResDes
,
1363 IN RES_DES rdResDes
,
1365 IN HMACHINE hMachine
);
1370 CM_Free_Res_Des_Handle(
1371 IN RES_DES rdResDes
);
1376 CM_Free_Resource_Conflict_Handle(
1377 IN CONFLICT_LIST clConflictList
);
1383 OUT PDEVINST pdnDevInst
,
1384 IN DEVINST dnDevInst
,
1391 OUT PDEVINST pdnDevInst
,
1392 IN DEVINST dnDevInst
,
1394 IN HMACHINE hMachine
);
1400 IN LPGUID ClassGuid
,
1402 IN OUT PULONG pulLength
,
1409 IN LPGUID ClassGuid
,
1411 IN OUT PULONG pulLength
,
1417 CM_Get_Class_Name_ExA(
1418 IN LPGUID ClassGuid
,
1420 IN OUT PULONG pulLength
,
1422 IN HMACHINE hMachine
);
1427 CM_Get_Class_Name_ExW(
1428 IN LPGUID ClassGuid
,
1430 IN OUT PULONG pulLength
,
1432 IN HMACHINE hMachine
);
1435 #define CM_Get_Class_Name CM_Get_Class_NameW
1436 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
1438 #define CM_Get_Class_Name CM_Get_Class_NameA
1439 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
1440 #endif /* UNICODE */
1445 CM_Get_Class_Key_NameA(
1446 IN LPGUID ClassGuid
,
1447 OUT LPSTR pszKeyName
,
1448 IN OUT PULONG pulLength
,
1454 CM_Get_Class_Key_NameW(
1455 IN LPGUID ClassGuid
,
1456 OUT LPWSTR pszKeyName
,
1457 IN OUT PULONG pulLength
,
1463 CM_Get_Class_Key_Name_ExA(
1464 IN LPGUID ClassGuid
,
1465 OUT LPSTR pszKeyName
,
1466 IN OUT PULONG pulLength
,
1468 IN HMACHINE hMachine
);
1473 CM_Get_Class_Key_Name_ExW(
1474 IN LPGUID ClassGuid
,
1475 OUT LPWSTR pszKeyName
,
1476 IN OUT PULONG pulLength
,
1478 IN HMACHINE hMachine
);
1481 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
1482 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
1484 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
1485 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
1486 #endif /* UNICODE */
1492 OUT PULONG pulDepth
,
1493 IN DEVINST dnDevInst
,
1500 OUT PULONG pulDepth
,
1501 IN DEVINST dnDevInst
,
1503 IN HMACHINE hMachine
);
1509 IN DEVINST dnDevInst
,
1517 CM_Get_Device_ID_ExA(
1518 IN DEVINST dnDevInst
,
1522 IN HMACHINE hMachine
);
1527 CM_Get_Device_ID_ExW(
1528 IN DEVINST dnDevInst
,
1532 IN HMACHINE hMachine
);
1538 IN DEVINST dnDevInst
,
1544 #define CM_Get_Device_ID CM_Get_Device_IDW
1545 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
1547 #define CM_Get_Device_ID CM_Get_Device_IDA
1548 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
1549 #endif /* UNICODE */
1554 CM_Get_Device_ID_ListA(
1555 IN PCSTR pszFilter OPTIONAL
,
1563 CM_Get_Device_ID_List_ExA(
1564 IN PCSTR pszFilter OPTIONAL
,
1568 IN HMACHINE hMachine
);
1573 CM_Get_Device_ID_List_ExW(
1574 IN PCWSTR pszFilter OPTIONAL
,
1578 IN HMACHINE hMachine
);
1583 CM_Get_Device_ID_ListW(
1584 IN PCWSTR pszFilter OPTIONAL
,
1590 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
1591 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
1593 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
1594 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
1595 #endif /* UNICODE */
1600 CM_Get_Device_ID_List_SizeA(
1602 IN PCSTR pszFilter OPTIONAL
,
1608 CM_Get_Device_ID_List_Size_ExA(
1610 IN PCSTR pszFilter OPTIONAL
,
1612 IN HMACHINE hMachine
);
1617 CM_Get_Device_ID_List_Size_ExW(
1619 IN PCWSTR pszFilter OPTIONAL
,
1621 IN HMACHINE hMachine
);
1626 CM_Get_Device_ID_List_SizeW(
1628 IN PCWSTR pszFilter OPTIONAL
,
1632 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
1633 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
1635 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
1636 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
1637 #endif /* UNICODE */
1642 CM_Get_Device_ID_Size(
1644 IN DEVINST dnDevInst
,
1650 CM_Get_Device_ID_Size_Ex(
1652 IN DEVINST dnDevInst
,
1654 IN HMACHINE hMachine
);
1659 CM_Get_DevNode_Registry_PropertyA(
1660 IN DEVINST dnDevInst
,
1661 IN ULONG ulProperty
,
1662 OUT PULONG pulRegDataType OPTIONAL
,
1663 OUT PVOID Buffer OPTIONAL
,
1664 IN OUT PULONG pulLength
,
1670 CM_Get_DevNode_Registry_PropertyW(
1671 IN DEVINST dnDevInst
,
1672 IN ULONG ulProperty
,
1673 OUT PULONG pulRegDataType OPTIONAL
,
1674 OUT PVOID Buffer OPTIONAL
,
1675 IN OUT PULONG pulLength
,
1681 CM_Get_DevNode_Registry_Property_ExA(
1682 IN DEVINST dnDevInst
,
1683 IN ULONG ulProperty
,
1684 OUT PULONG pulRegDataType OPTIONAL
,
1685 OUT PVOID Buffer OPTIONAL
,
1686 IN OUT PULONG pulLength
,
1688 IN HMACHINE hMachine
);
1693 CM_Get_DevNode_Registry_Property_ExW(
1694 IN DEVINST dnDevInst
,
1695 IN ULONG ulProperty
,
1696 OUT PULONG pulRegDataType OPTIONAL
,
1697 OUT PVOID Buffer OPTIONAL
,
1698 IN OUT PULONG pulLength
,
1700 IN HMACHINE hMachine
);
1702 #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
1703 #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
1704 #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
1705 #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
1708 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
1709 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1710 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
1711 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1713 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
1714 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1715 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
1716 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1717 #endif /* UNICODE */
1719 #if (WINVER >= _WIN32_WINNT_WINXP)
1724 CM_Get_DevNode_Custom_PropertyA(
1725 IN DEVINST dnDevInst
,
1726 IN PCSTR pszCustomPropertyName
,
1727 OUT PULONG pulRegDataType OPTIONAL
,
1728 OUT PVOID Buffer OPTIONAL
,
1729 IN OUT PULONG pulLength
,
1735 CM_Get_DevNode_Custom_PropertyW(
1736 IN DEVINST dnDevInst
,
1737 IN PCWSTR pszCustomPropertyName
,
1738 OUT PULONG pulRegDataType OPTIONAL
,
1739 OUT PVOID Buffer OPTIONAL
,
1740 IN OUT PULONG pulLength
,
1746 CM_Get_DevNode_Custom_Property_ExA(
1747 IN DEVINST dnDevInst
,
1748 IN PCSTR pszCustomPropertyName
,
1749 OUT PULONG pulRegDataType OPTIONAL
,
1750 OUT PVOID Buffer OPTIONAL
,
1751 IN OUT PULONG pulLength
,
1753 IN HMACHINE hMachine OPTIONAL
);
1758 CM_Get_DevNode_Custom_Property_ExW(
1759 IN DEVINST dnDevInst
,
1760 IN PCWSTR pszCustomPropertyName
,
1761 OUT PULONG pulRegDataType OPTIONAL
,
1762 OUT PVOID Buffer OPTIONAL
,
1763 IN OUT PULONG pulLength
,
1765 IN HMACHINE hMachine OPTIONAL
);
1767 #define CM_Get_DevInst_Custom_PropertyW CM_Get_DevNode_Custom_PropertyW
1768 #define CM_Get_DevInst_Custom_PropertyA CM_Get_DevNode_Custom_PropertyA
1769 #define CM_Get_DevInst_Custom_Property_ExW CM_Get_DevNode_Custom_Property_ExW
1770 #define CM_Get_DevInst_Custom_Property_ExA CM_Get_DevNode_Custom_Property_ExA
1772 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyW
1773 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1774 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyW
1775 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExW
1777 #define CM_Get_DevInst_Custom_Property CM_Get_DevNode_Custom_PropertyA
1778 #define CM_Get_DevInst_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1779 #define CM_Get_DevNode_Custom_Property CM_Get_DevNode_Custom_PropertyA
1780 #define CM_Get_DevNode_Custom_Property_Ex CM_Get_DevNode_Custom_Property_ExA
1783 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
1788 CM_Get_DevNode_Status(
1789 OUT PULONG pulStatus
,
1790 OUT PULONG pulProblemNumber
,
1791 IN DEVINST dnDevInst
,
1797 CM_Get_DevNode_Status_Ex(
1798 OUT PULONG pulStatus
,
1799 OUT PULONG pulProblemNumber
,
1800 IN DEVINST dnDevInst
,
1802 IN HMACHINE hMachine
);
1804 #define CM_Get_DevInst_Status CM_Get_DevNode_Status
1805 #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
1810 CM_Get_First_Log_Conf(
1811 OUT PLOG_CONF plcLogConf OPTIONAL
,
1812 IN DEVINST dnDevInst
,
1818 CM_Get_First_Log_Conf_Ex(
1819 OUT PLOG_CONF plcLogConf OPTIONAL
,
1820 IN DEVINST dnDevInst
,
1822 IN HMACHINE hMachine OPTIONAL
);
1827 CM_Get_Global_State(
1828 OUT PULONG pulState
,
1834 CM_Get_Global_State_Ex(
1835 OUT PULONG pulState
,
1837 IN HMACHINE hMachine
);
1842 CM_Get_Hardware_Profile_InfoA(
1844 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1850 CM_Get_Hardware_Profile_Info_ExA(
1852 OUT PHWPROFILEINFO_A pHWProfileInfo
,
1854 IN HMACHINE hMachine OPTIONAL
);
1859 CM_Get_Hardware_Profile_InfoW(
1861 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1867 CM_Get_Hardware_Profile_Info_ExW(
1869 OUT PHWPROFILEINFO_W pHWProfileInfo
,
1871 IN HMACHINE hMachine OPTIONAL
);
1874 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoW
1875 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExW
1877 #define CM_Get_Hardware_Profile_Info CM_Get_Hardware_Profile_InfoA
1878 #define CM_Get_Hardware_Profile_Info_Ex CM_Get_Hardware_Profile_Info_ExA
1884 CM_Get_HW_Prof_FlagsA(
1885 IN DEVINSTID_A szDevInstName
,
1886 IN ULONG ulHardwareProfile
,
1887 OUT PULONG pulValue
,
1893 CM_Get_HW_Prof_FlagsW(
1894 IN DEVINSTID_W szDevInstName
,
1895 IN ULONG ulHardwareProfile
,
1896 OUT PULONG pulValue
,
1902 CM_Get_HW_Prof_Flags_ExA(
1903 IN DEVINSTID_A szDevInstName
,
1904 IN ULONG ulHardwareProfile
,
1905 OUT PULONG pulValue
,
1907 IN HMACHINE hMachine
);
1912 CM_Get_HW_Prof_Flags_ExW(
1913 IN DEVINSTID_W szDevInstName
,
1914 IN ULONG ulHardwareProfile
,
1915 OUT PULONG pulValue
,
1917 IN HMACHINE hMachine
);
1920 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
1921 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
1923 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
1924 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
1930 CM_Get_Device_Interface_AliasA(
1931 IN LPCSTR pszDeviceInterface
,
1932 IN LPGUID AliasInterfaceGuid
,
1933 OUT LPSTR pszAliasDeviceInterface
,
1934 IN OUT PULONG pulLength
,
1940 CM_Get_Device_Interface_AliasW(
1941 IN LPCWSTR pszDeviceInterface
,
1942 IN LPGUID AliasInterfaceGuid
,
1943 OUT LPWSTR pszAliasDeviceInterface
,
1944 IN OUT PULONG pulLength
,
1950 CM_Get_Device_Interface_Alias_ExA(
1951 IN LPCSTR pszDeviceInterface
,
1952 IN LPGUID AliasInterfaceGuid
,
1953 OUT LPSTR pszAliasDeviceInterface
,
1954 IN OUT PULONG pulLength
,
1956 IN HMACHINE hMachine OPTIONAL
);
1961 CM_Get_Device_Interface_Alias_ExW(
1962 IN LPCWSTR pszDeviceInterface
,
1963 IN LPGUID AliasInterfaceGuid
,
1964 OUT LPWSTR pszAliasDeviceInterface
,
1965 IN OUT PULONG pulLength
,
1967 IN HMACHINE hMachine OPTIONAL
);
1970 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasW
1971 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExW
1973 #define CM_Get_Device_Interface_Alias CM_Get_Device_Interface_AliasA
1974 #define CM_Get_Device_Interface_Alias_Ex CM_Get_Device_Interface_Alias_ExA
1980 CM_Get_Device_Interface_ListA(
1981 IN LPGUID InterfaceClassGuid
,
1982 IN DEVINSTID_A pDeviceID OPTIONAL
,
1990 CM_Get_Device_Interface_ListW(
1991 IN LPGUID InterfaceClassGuid
,
1992 IN DEVINSTID_W pDeviceID OPTIONAL
,
2000 CM_Get_Device_Interface_List_ExA(
2001 IN LPGUID InterfaceClassGuid
,
2002 IN DEVINSTID_A pDeviceID OPTIONAL
,
2006 IN HMACHINE hMachine OPTIONAL
);
2011 CM_Get_Device_Interface_List_ExW(
2012 IN LPGUID InterfaceClassGuid
,
2013 IN DEVINSTID_W pDeviceID OPTIONAL
,
2017 IN HMACHINE hMachine OPTIONAL
);
2020 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListW
2021 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExW
2023 #define CM_Get_Device_Interface_List CM_Get_Device_Interface_ListA
2024 #define CM_Get_Device_Interface_List_Ex CM_Get_Device_Interface_List_ExA
2030 CM_Get_Device_Interface_List_SizeA(
2032 IN LPGUID InterfaceClassGuid
,
2033 IN DEVINSTID_A pDeviceID OPTIONAL
,
2039 CM_Get_Device_Interface_List_SizeW(
2041 IN LPGUID InterfaceClassGuid
,
2042 IN DEVINSTID_W pDeviceID OPTIONAL
,
2048 CM_Get_Device_Interface_List_Size_ExA(
2050 IN LPGUID InterfaceClassGuid
,
2051 IN DEVINSTID_A pDeviceID OPTIONAL
,
2053 IN HMACHINE hMachine OPTIONAL
);
2058 CM_Get_Device_Interface_List_Size_ExW(
2060 IN LPGUID InterfaceClassGuid
,
2061 IN DEVINSTID_W pDeviceID OPTIONAL
,
2063 IN HMACHINE hMachine OPTIONAL
);
2066 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeW
2067 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExW
2069 #define CM_Get_Device_Interface_List_Size CM_Get_Device_Interface_List_SizeA
2070 #define CM_Get_Device_Interface_List_Size_Ex CM_Get_Device_Interface_List_Size_ExA
2076 CM_Get_Log_Conf_Priority(
2077 IN LOG_CONF lcLogConf
,
2078 OUT PPRIORITY pPriority
,
2084 CM_Get_Log_Conf_Priority_Ex(
2085 IN LOG_CONF lcLogConf
,
2086 OUT PPRIORITY pPriority
,
2088 IN HMACHINE hMachine
);
2093 CM_Get_Next_Log_Conf(
2094 OUT PLOG_CONF plcLogConf OPTIONAL
,
2095 IN LOG_CONF lcLogConf
,
2101 CM_Get_Next_Log_Conf_Ex(
2102 OUT PLOG_CONF plcLogConf OPTIONAL
,
2103 IN LOG_CONF lcLogConf
,
2105 IN HMACHINE hMachine
);
2110 CM_Get_Next_Res_Des(
2111 OUT PRES_DES prdResDes
,
2112 IN RES_DES rdResDes
,
2113 IN RESOURCEID ForResource
,
2114 OUT PRESOURCEID pResourceID
,
2120 CM_Get_Next_Res_Des_Ex(
2121 OUT PRES_DES prdResDes
,
2122 IN RES_DES rdResDes
,
2123 IN RESOURCEID ForResource
,
2124 OUT PRESOURCEID pResourceID
,
2126 IN HMACHINE hMachine
);
2132 OUT PDEVINST pdnDevInst
,
2133 IN DEVINST dnDevInst
,
2140 OUT PDEVINST pdnDevInst
,
2141 IN DEVINST dnDevInst
,
2143 IN HMACHINE hMachine
);
2148 CM_Get_Res_Des_Data(
2149 IN RES_DES rdResDes
,
2157 CM_Get_Res_Des_Data_Ex(
2158 IN RES_DES rdResDes
,
2162 IN HMACHINE hMachine
);
2167 CM_Get_Res_Des_Data_Size(
2169 IN RES_DES rdResDes
,
2175 CM_Get_Res_Des_Data_Size_Ex(
2177 IN RES_DES rdResDes
,
2179 IN HMACHINE hMachine
);
2184 CM_Get_Resource_Conflict_Count(
2185 IN CONFLICT_LIST clConflictList
,
2186 OUT PULONG pulCount
);
2191 CM_Get_Resource_Conflict_DetailsA(
2192 IN CONFLICT_LIST clConflictList
,
2194 IN OUT PCONFLICT_DETAILS_A pConflictDetails
);
2199 CM_Get_Resource_Conflict_DetailsW(
2200 IN CONFLICT_LIST clConflictList
,
2202 IN OUT PCONFLICT_DETAILS_W pConflictDetails
);
2205 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
2207 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
2208 #endif /* UNICODE */
2213 CM_Get_Class_Registry_PropertyW(
2214 IN LPGUID ClassGuid
,
2215 IN ULONG ulProperty
,
2216 OUT PULONG pulRegDataType OPTIONAL
,
2217 OUT PVOID Buffer OPTIONAL
,
2218 IN OUT PULONG pulLength
,
2220 IN HMACHINE hMachine OPTIONAL
);
2225 CM_Set_Class_Registry_PropertyW(
2226 IN LPGUID ClassGuid
,
2227 IN ULONG ulProperty
,
2228 IN PCVOID Buffer OPTIONAL
,
2231 IN HMACHINE hMachine OPTIONAL
);
2236 CM_Get_Class_Registry_PropertyA(
2237 IN LPGUID ClassGuid
,
2238 IN ULONG ulProperty
,
2239 OUT PULONG pulRegDataType OPTIONAL
,
2240 OUT PVOID Buffer OPTIONAL
,
2241 IN OUT PULONG pulLength
,
2243 IN HMACHINE hMachine OPTIONAL
);
2248 CM_Set_Class_Registry_PropertyA(
2249 IN LPGUID ClassGuid
,
2250 IN ULONG ulProperty
,
2251 IN PCVOID Buffer OPTIONAL
,
2254 IN HMACHINE hMachine OPTIONAL
);
2257 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyW
2258 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyW
2260 #define CM_Get_Class_Registry_Property CM_Get_Class_Registry_PropertyA
2261 #define CM_Set_Class_Registry_Property CM_Set_Class_Registry_PropertyA
2268 OUT PDEVINST pdnDevInst
,
2276 OUT PDEVINST pdnDevInst
,
2279 IN HMACHINE hMachine
);
2284 CM_Get_Version(VOID
);
2290 IN HMACHINE hMachine
);
2292 #if (WINVER >= _WIN32_WINNT_WINXP)
2297 CM_Is_Version_Available(
2303 CM_Is_Version_Available_Ex(
2305 IN HMACHINE hMachine OPTIONAL
);
2307 #endif /* (WINVER >= _WIN32_WINNT_WINXP) */
2312 CM_Intersect_Range_List(
2313 IN RANGE_LIST rlhOld1
,
2314 IN RANGE_LIST rlhOld2
,
2315 IN RANGE_LIST rlhNew
,
2321 CM_Invert_Range_List(
2322 IN RANGE_LIST rlhOld
,
2323 IN RANGE_LIST rlhNew
,
2324 IN DWORDLONG ullMaxValue
,
2330 CM_Is_Dock_Station_Present(
2331 OUT PBOOL pbPresent
);
2336 CM_Is_Dock_Station_Present_Ex(
2337 OUT PBOOL pbPresent
,
2338 IN HMACHINE hMachine OPTIONAL
);
2344 OUT PDEVINST pdnDevInst
,
2345 IN DEVINSTID_A pDeviceID OPTIONAL
,
2351 CM_Locate_DevNode_ExA(
2352 OUT PDEVINST pdnDevInst
,
2353 IN DEVINSTID_A pDeviceID OPTIONAL
,
2355 IN HMACHINE hMachine
);
2360 CM_Locate_DevNode_ExW(
2361 OUT PDEVINST pdnDevInst
,
2362 IN DEVINSTID_W pDeviceID OPTIONAL
,
2364 IN HMACHINE hMachine
);
2370 OUT PDEVINST pdnDevInst
,
2371 IN DEVINSTID_W pDeviceID OPTIONAL
,
2374 #define CM_Locate_DevInstA CM_Locate_DevNodeA
2375 #define CM_Locate_DevInstW CM_Locate_DevNodeW
2376 #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
2377 #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
2380 #define CM_Locate_DevNode CM_Locate_DevNodeW
2381 #define CM_Locate_DevInst CM_Locate_DevNodeW
2382 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
2383 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
2385 #define CM_Locate_DevNode CM_Locate_DevNodeA
2386 #define CM_Locate_DevInst CM_Locate_DevNodeA
2387 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
2388 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
2389 #endif /* UNICODE */
2394 CM_Merge_Range_List(
2395 IN RANGE_LIST rlhOld1
,
2396 IN RANGE_LIST rlhOld2
,
2397 IN RANGE_LIST rlhNew
,
2404 OUT PRES_DES prdResDes
,
2405 IN RES_DES rdResDes
,
2406 IN RESOURCEID ResourceID
,
2407 IN PCVOID ResourceData
,
2408 IN ULONG ResourceLen
,
2414 CM_Modify_Res_Des_Ex(
2415 OUT PRES_DES prdResDes
,
2416 IN RES_DES rdResDes
,
2417 IN RESOURCEID ResourceID
,
2418 IN PCVOID ResourceData
,
2419 IN ULONG ResourceLen
,
2421 IN HMACHINE hMachine
);
2427 IN DEVINST dnFromDevInst
,
2428 IN DEVINST dnToDevInst
,
2435 IN DEVINST dnFromDevInst
,
2436 IN DEVINST dnToDevInst
,
2438 IN HMACHINE hMachine OPTIONAL
);
2440 #define CM_Move_DevInst CM_Move_DevNode
2441 #define CM_Move_DevInst_Ex CM_Move_DevNode_Ex
2447 IN OUT PRANGE_ELEMENT preElement
,
2448 OUT PDWORDLONG pullStart
,
2449 OUT PDWORDLONG pullEnd
,
2456 IN LPGUID ClassGuid OPTIONAL
,
2457 IN LPCSTR pszClassName OPTIONAL
,
2458 IN REGSAM samDesired
,
2459 IN REGDISPOSITION Disposition
,
2467 IN LPGUID ClassGuid OPTIONAL
,
2468 IN LPCWSTR pszClassName OPTIONAL
,
2469 IN REGSAM samDesired
,
2470 IN REGDISPOSITION Disposition
,
2477 CM_Open_Class_Key_ExA(
2478 IN LPGUID pszClassGuid OPTIONAL
,
2479 IN LPCSTR pszClassName OPTIONAL
,
2480 IN REGSAM samDesired
,
2481 IN REGDISPOSITION Disposition
,
2484 IN HMACHINE hMachine
);
2489 CM_Open_Class_Key_ExW(
2490 IN LPGUID pszClassGuid OPTIONAL
,
2491 IN LPCWSTR pszClassName OPTIONAL
,
2492 IN REGSAM samDesired
,
2493 IN REGDISPOSITION Disposition
,
2496 IN HMACHINE hMachine
);
2499 #define CM_Open_Class_Key CM_Open_Class_KeyW
2500 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
2502 #define CM_Open_Class_Key CM_Open_Class_KeyA
2503 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
2504 #endif /* UNICODE */
2509 CM_Open_DevNode_Key(
2510 IN DEVINST dnDevNode
,
2511 IN REGSAM samDesired
,
2512 IN ULONG ulHardwareProfile
,
2513 IN REGDISPOSITION Disposition
,
2514 OUT PHKEY phkDevice
,
2520 CM_Open_DevNode_Key_Ex(
2521 IN DEVINST dnDevNode
,
2522 IN REGSAM samDesired
,
2523 IN ULONG ulHardwareProfile
,
2524 IN REGDISPOSITION Disposition
,
2525 OUT PHKEY phkDevice
,
2527 IN HMACHINE hMachine
);
2529 #define CM_Open_DevInst_Key CM_Open_DevNode_Key
2530 #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
2532 #if (WINVER >= _WIN32_WINNT_VISTA)
2537 CM_Open_Device_Interface_KeyA(
2538 IN LPCSTR pszDeviceInterface
,
2539 IN REGSAM samDesired
,
2540 IN REGDISPOSITION Disposition
,
2541 OUT PHKEY phkDeviceInterface
,
2547 CM_Open_Device_Interface_KeyW(
2548 IN LPCWSTR pszDeviceInterface
,
2549 IN REGSAM samDesired
,
2550 IN REGDISPOSITION Disposition
,
2551 OUT PHKEY phkDeviceInterface
,
2557 CM_Open_Device_Interface_Key_ExA(
2558 IN LPCSTR pszDeviceInterface
,
2559 IN REGSAM samDesired
,
2560 IN REGDISPOSITION Disposition
,
2561 OUT PHKEY phkDeviceInterface
,
2563 IN HMACHINE hMachine OPTIONAL
);
2568 CM_Open_Device_Interface_Key_ExW(
2569 IN LPCWSTR pszDeviceInterface
,
2570 IN REGSAM samDesired
,
2571 IN REGDISPOSITION Disposition
,
2572 OUT PHKEY phkDeviceInterface
,
2574 IN HMACHINE hMachine OPTIONAL
);
2577 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyW
2578 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExW
2580 #define CM_Open_Device_Interface_Key CM_Open_Device_Interface_KeyA
2581 #define CM_Open_Device_Interface_Key_Ex CM_Open_Device_Interface_Key_ExA
2587 CM_Delete_Device_Interface_KeyA(
2588 IN LPCSTR pszDeviceInterface
,
2594 CM_Delete_Device_Interface_KeyW(
2595 IN LPCWSTR pszDeviceInterface
,
2601 CM_Delete_Device_Interface_Key_ExA(
2602 IN LPCSTR pszDeviceInterface
,
2604 IN HMACHINE hMachine OPTIONAL
);
2609 CM_Delete_Device_Interface_Key_ExW(
2610 IN LPCWSTR pszDeviceInterface
,
2612 IN HMACHINE hMachine OPTIONAL
);
2615 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyW
2616 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExW
2618 #define CM_Delete_Device_Interface_Key CM_Delete_Device_Interface_KeyA
2619 #define CM_Delete_Device_Interface_Key_Ex CM_Delete_Device_Interface_Key_ExA
2622 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2627 CM_Query_Arbitrator_Free_Data(
2630 IN DEVINST dnDevInst
,
2631 IN RESOURCEID ResourceID
,
2637 CM_Query_Arbitrator_Free_Data_Ex(
2640 IN DEVINST dnDevInst
,
2641 IN RESOURCEID ResourceID
,
2643 IN HMACHINE hMachine OPTIONAL
);
2648 CM_Query_Arbitrator_Free_Size(
2650 IN DEVINST dnDevInst
,
2651 IN RESOURCEID ResourceID
,
2657 CM_Query_Arbitrator_Free_Size_Ex(
2659 IN DEVINST dnDevInst
,
2660 IN RESOURCEID ResourceID
,
2662 IN HMACHINE hMachine OPTIONAL
);
2667 CM_Query_Remove_SubTree(
2668 IN DEVINST dnAncestor
,
2674 CM_Query_Remove_SubTree_Ex(
2675 IN DEVINST dnAncestor
,
2677 IN HMACHINE hMachine OPTIONAL
);
2682 CM_Query_And_Remove_SubTreeA(
2683 IN DEVINST dnAncestor
,
2684 OUT PPNP_VETO_TYPE pVetoType
,
2685 OUT LPSTR pszVetoName
,
2686 IN ULONG ulNameLength
,
2692 CM_Query_And_Remove_SubTreeW(
2693 IN DEVINST dnAncestor
,
2694 OUT PPNP_VETO_TYPE pVetoType
,
2695 OUT LPWSTR pszVetoName
,
2696 IN ULONG ulNameLength
,
2702 CM_Query_And_Remove_SubTree_ExA(
2703 IN DEVINST dnAncestor
,
2704 OUT PPNP_VETO_TYPE pVetoType
,
2705 OUT LPSTR pszVetoName
,
2706 IN ULONG ulNameLength
,
2708 IN HMACHINE hMachine
);
2713 CM_Query_And_Remove_SubTree_ExW(
2714 IN DEVINST dnAncestor
,
2715 OUT PPNP_VETO_TYPE pVetoType
,
2716 OUT LPWSTR pszVetoName
,
2717 IN ULONG ulNameLength
,
2719 IN HMACHINE hMachine
);
2722 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeW
2723 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExW
2725 #define CM_Query_And_Remove_SubTree CM_Query_And_Remove_SubTreeA
2726 #define CM_Query_And_Remove_SubTree_Ex CM_Query_And_Remove_SubTree_ExA
2732 CM_Query_Resource_Conflict_List(
2733 OUT PCONFLICT_LIST pclConflictList
,
2734 IN DEVINST dnDevInst
,
2735 IN RESOURCEID ResourceID
,
2736 IN PCVOID ResourceData
,
2737 IN ULONG ResourceLen
,
2739 IN HMACHINE hMachine OPTIONAL
);
2744 CM_Reenumerate_DevNode(
2745 IN DEVINST dnDevInst
,
2751 CM_Reenumerate_DevNode_Ex(
2752 IN DEVINST dnDevInst
,
2754 IN HMACHINE hMachine
);
2756 #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
2757 #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
2762 CM_Register_Device_InterfaceA(
2763 IN DEVINST dnDevInst
,
2764 IN LPGUID InterfaceClassGuid
,
2765 IN LPCSTR pszReference OPTIONAL
,
2766 OUT LPSTR pszDeviceInterface
,
2767 IN OUT PULONG pulLength
,
2773 CM_Register_Device_InterfaceW(
2774 IN DEVINST dnDevInst
,
2775 IN LPGUID InterfaceClassGuid
,
2776 IN LPCWSTR pszReference OPTIONAL
,
2777 OUT LPWSTR pszDeviceInterface
,
2778 IN OUT PULONG pulLength
,
2784 CM_Register_Device_Interface_ExA(
2785 IN DEVINST dnDevInst
,
2786 IN LPGUID InterfaceClassGuid
,
2787 IN LPCSTR pszReference OPTIONAL
,
2788 OUT LPSTR pszDeviceInterface
,
2789 IN OUT PULONG pulLength
,
2791 IN HMACHINE hMachine OPTIONAL
);
2796 CM_Register_Device_Interface_ExW(
2797 IN DEVINST dnDevInst
,
2798 IN LPGUID InterfaceClassGuid
,
2799 IN LPCWSTR pszReference OPTIONAL
,
2800 OUT LPWSTR pszDeviceInterface
,
2801 IN OUT PULONG pulLength
,
2803 IN HMACHINE hMachine OPTIONAL
);
2806 #define CM_Register_Device_Interface CM_Register_Device_InterfaceW
2807 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExW
2809 #define CM_Register_Device_Interface CM_Register_Device_InterfaceA
2810 #define CM_Register_Device_Interface_Ex CM_Register_Device_Interface_ExA
2816 CM_Request_Device_EjectA(
2817 IN DEVINST dnDevInst
,
2818 OUT PPNP_VETO_TYPE pVetoType
,
2819 OUT LPSTR pszVetoName
,
2820 IN ULONG ulNameLength
,
2826 CM_Request_Device_Eject_ExW(
2827 IN DEVINST dnDevInst
,
2828 OUT PPNP_VETO_TYPE pVetoType
,
2829 OUT LPWSTR pszVetoName
,
2830 IN ULONG ulNameLength
,
2832 IN HMACHINE hMachine
);
2837 CM_Request_Device_Eject_ExA(
2838 IN DEVINST dnDevInst
,
2839 OUT PPNP_VETO_TYPE pVetoType
,
2840 OUT LPSTR pszVetoName
,
2841 IN ULONG ulNameLength
,
2843 IN HMACHINE hMachine
);
2848 CM_Request_Device_EjectW(
2849 IN DEVINST dnDevInst
,
2850 OUT PPNP_VETO_TYPE pVetoType
,
2851 OUT LPWSTR pszVetoName
,
2852 IN ULONG ulNameLength
,
2856 #define CM_Request_Device_Eject CM_Request_Device_EjectW
2857 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
2859 #define CM_Request_Device_Eject CM_Request_Device_EjectA
2860 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
2866 CM_Request_Eject_PC(VOID
);
2871 CM_Request_Eject_PC_Ex(
2872 IN HMACHINE hMachine OPTIONAL
);
2883 CM_Run_Detection_Ex(
2885 IN HMACHINE hMachine OPTIONAL
);
2887 #if (WINVER >= _WIN32_WINNT_VISTA)
2890 CM_Apply_PowerScheme(VOID
);
2893 CM_Write_UserPowerKey(
2894 IN CONST GUID
*SchemeGuid OPTIONAL
,
2895 IN CONST GUID
*SubGroupOfPowerSettingsGuid OPTIONAL
,
2896 IN CONST GUID
*PowerSettingGuid OPTIONAL
,
2897 IN ULONG AccessFlags
,
2900 IN DWORD BufferSize
,
2904 CM_Set_ActiveScheme(
2905 IN CONST GUID
*SchemeGuid
,
2909 CM_Restore_DefaultPowerScheme(
2910 IN CONST GUID
*SchemeGuid
,
2914 CM_RestoreAll_DefaultPowerSchemes(
2918 CM_Duplicate_PowerScheme(
2919 IN CONST GUID
*SourceSchemeGuid
,
2920 IN GUID
**DestinationSchemeGuid
,
2924 CM_Delete_PowerScheme(
2925 IN CONST GUID
*SchemeGuid
,
2929 CM_Import_PowerScheme(
2930 IN LPCWSTR ImportFileNamePath
,
2931 IN OUT GUID
**DestinationSchemeGuid
,
2934 #endif /* (WINVER >= _WIN32_WINNT_VISTA) */
2939 CM_Set_DevNode_Problem(
2940 IN DEVINST dnDevInst
,
2947 CM_Set_DevNode_Problem_Ex(
2948 IN DEVINST dnDevInst
,
2951 IN HMACHINE hMachine
);
2953 #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
2954 #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
2959 CM_Unregister_Device_InterfaceA(
2960 IN LPCSTR pszDeviceInterface
,
2966 CM_Unregister_Device_InterfaceW(
2967 IN LPCWSTR pszDeviceInterface
,
2973 CM_Unregister_Device_Interface_ExA(
2974 IN LPCSTR pszDeviceInterface
,
2976 IN HMACHINE hMachine OPTIONAL
);
2981 CM_Unregister_Device_Interface_ExW(
2982 IN LPCWSTR pszDeviceInterface
,
2984 IN HMACHINE hMachine OPTIONAL
);
2987 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceW
2988 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExW
2990 #define CM_Unregister_Device_Interface CM_Unregister_Device_InterfaceA
2991 #define CM_Unregister_Device_Interface_Ex CM_Unregister_Device_Interface_ExA
2997 CM_Register_Device_Driver(
2998 IN DEVINST dnDevInst
,
3004 CM_Register_Device_Driver_Ex(
3005 IN DEVINST dnDevInst
,
3007 IN HMACHINE hMachine OPTIONAL
);
3013 IN DEVINST dnAncestor
,
3019 CM_Remove_SubTree_Ex(
3020 IN DEVINST dnAncestor
,
3022 IN HMACHINE hMachine OPTIONAL
);
3027 CM_Set_DevNode_Registry_PropertyA(
3028 IN DEVINST dnDevInst
,
3029 IN ULONG ulProperty
,
3030 IN PCVOID Buffer OPTIONAL
,
3037 CM_Set_DevNode_Registry_PropertyW(
3038 IN DEVINST dnDevInst
,
3039 IN ULONG ulProperty
,
3040 IN PCVOID Buffer OPTIONAL
,
3047 CM_Set_DevNode_Registry_Property_ExA(
3048 IN DEVINST dnDevInst
,
3049 IN ULONG ulProperty
,
3050 IN PCVOID Buffer OPTIONAL
,
3053 IN HMACHINE hMachine
);
3058 CM_Set_DevNode_Registry_Property_ExW(
3059 IN DEVINST dnDevInst
,
3060 IN ULONG ulProperty
,
3061 IN PCVOID Buffer OPTIONAL
,
3064 IN HMACHINE hMachine
);
3066 #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
3067 #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
3068 #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
3069 #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
3072 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
3073 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3074 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
3075 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
3077 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
3078 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3079 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
3080 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
3081 #endif /* UNICODE */
3087 IN ULONG ulHardwareProfile
,
3094 IN ULONG ulHardwareProfile
,
3096 IN HMACHINE hMachine
);
3101 CM_Set_HW_Prof_FlagsA(
3102 IN DEVINSTID_A szDevInstName
,
3110 CM_Set_HW_Prof_FlagsW(
3111 IN DEVINSTID_W szDevInstName
,
3119 CM_Set_HW_Prof_Flags_ExA(
3120 IN DEVINSTID_A szDevInstName
,
3124 IN HMACHINE hMachine
);
3129 CM_Set_HW_Prof_Flags_ExW(
3130 IN DEVINSTID_W szDevInstName
,
3134 IN HMACHINE hMachine
);
3137 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
3138 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
3140 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
3141 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
3142 #endif /* UNICODE */
3148 IN DEVINST dnDevInst
,
3154 CM_Setup_DevNode_Ex(
3155 IN DEVINST dnDevInst
,
3157 IN HMACHINE hMachine OPTIONAL
);
3159 #define CM_Setup_DevInst CM_Setup_DevNode
3160 #define CM_Setup_DevInst_Ex CM_Setup_DevNode_Ex
3165 CM_Test_Range_Available(
3166 IN DWORDLONG ullStartValue
,
3167 IN DWORDLONG ullEndValue
,
3174 CM_Uninstall_DevNode(
3175 IN DEVINST dnPhantom
,
3181 CM_Uninstall_DevNode_Ex(
3182 IN DEVINST dnPhantom
,
3184 IN HMACHINE hMachine
);
3186 #define CM_Uninstall_DevInst CM_Uninstall_DevNode
3187 #define CM_Uninstall_DevInst_Ex CM_Uninstall_DevNode_Ex
3190 #if (WINVER >= _WIN32_WINNT_WIN2K)
3192 #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
3197 CMP_WaitNoPendingInstallEvents(
3198 IN DWORD dwTimeout
);
3200 #endif /* (WINVER >= _WIN32_WINNT_WIN2K) */