-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfgmgr32.h
1275 lines (1133 loc) · 59.9 KB
/
cfgmgr32.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _CFGMGR32_H_
#define _CFGMGR32_H_
#include <_mingw_unicode.h>
#include <cfg.h>
#include <guiddef.h>
#include <apisetcconv.h>
#include <devpropdef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef DWORD RETURN_TYPE;
typedef RETURN_TYPE CONFIGRET;
typedef CHAR *DEVNODEID_A,*DEVINSTID_A;
typedef WCHAR *DEVNODEID_W,*DEVINSTID_W;
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
typedef CONST VOID *PCVOID;
#define MAX_DEVICE_ID_LEN 200
#define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
#define MAX_GUID_STRING_LEN 39
#define MAX_CLASS_NAME_LEN 32
#define MAX_PROFILE_LEN 80
#define MAX_CONFIG_VALUE 9999
#define MAX_INSTANCE_VALUE 9999
#define MAX_MEM_REGISTERS 9
#define MAX_IO_PORTS 20
#define MAX_IRQS 7
#define MAX_DMA_CHANNELS 7
#define DWORD_MAX 0xFFFFFFFF
#define DWORDLONG_MAX 0xFFFFFFFFFFFFFFFF
#define CONFIGMG_VERSION 0x0400
#ifdef NT_INCLUDED
__MINGW_EXTENSION typedef unsigned __int64 DWORDLONG;
typedef DWORDLONG *PDWORDLONG;
#endif
typedef DWORD DEVNODE,DEVINST;
typedef DEVNODE *PDEVNODE,*PDEVINST;
__MINGW_TYPEDEF_UAW(DEVNODEID)
__MINGW_TYPEDEF_UAW(DEVINSTID)
typedef DWORD_PTR LOG_CONF;
typedef LOG_CONF *PLOG_CONF;
typedef DWORD_PTR RES_DES;
typedef RES_DES *PRES_DES;
typedef ULONG RESOURCEID;
typedef RESOURCEID *PRESOURCEID;
typedef ULONG PRIORITY;
typedef PRIORITY *PPRIORITY;
typedef DWORD_PTR RANGE_LIST;
typedef RANGE_LIST *PRANGE_LIST;
typedef DWORD_PTR RANGE_ELEMENT;
typedef RANGE_ELEMENT *PRANGE_ELEMENT;
typedef HANDLE HMACHINE;
typedef HMACHINE *PHMACHINE;
typedef ULONG_PTR CONFLICT_LIST;
typedef CONFLICT_LIST *PCONFLICT_LIST;
typedef struct _CONFLICT_DETAILS_A {
ULONG CD_ulSize;
ULONG CD_ulMask;
DEVINST CD_dnDevInst;
RES_DES CD_rdResDes;
ULONG CD_ulFlags;
CHAR CD_szDescription[MAX_PATH];
} CONFLICT_DETAILS_A ,*PCONFLICT_DETAILS_A;
typedef struct _CONFLICT_DETAILS_W {
ULONG CD_ulSize;
ULONG CD_ulMask;
DEVINST CD_dnDevInst;
RES_DES CD_rdResDes;
ULONG CD_ulFlags;
WCHAR CD_szDescription[MAX_PATH];
} CONFLICT_DETAILS_W ,*PCONFLICT_DETAILS_W;
__MINGW_TYPEDEF_UAW(CONFLICT_DETAILS)
__MINGW_TYPEDEF_UAW(PCONFLICT_DETAILS)
#define CM_CDMASK_DEVINST (0x00000001)
#define CM_CDMASK_RESDES (0x00000002)
#define CM_CDMASK_FLAGS (0x00000004)
#define CM_CDMASK_DESCRIPTION (0x00000008)
#define CM_CDMASK_VALID (0x0000000F)
#define CM_CDFLAGS_DRIVER (0x00000001)
#define CM_CDFLAGS_ROOT_OWNED (0x00000002)
#define CM_CDFLAGS_RESERVED (0x00000004)
typedef ULONG REGDISPOSITION;
#include "pshpack1.h"
#define mMD_MemoryType (0x1)
#define fMD_MemoryType mMD_MemoryType
#define fMD_ROM (0x0)
#define fMD_RAM (0x1)
#define mMD_32_24 (0x2)
#define fMD_32_24 mMD_32_24
#define fMD_24 (0x0)
#define fMD_32 (0x2)
#define mMD_Prefetchable (0x4)
#define fMD_Prefetchable mMD_Prefetchable
#define fMD_Pref mMD_Prefetchable
#define fMD_PrefetchDisallowed (0x0)
#define fMD_PrefetchAllowed (0x4)
#define mMD_Readable (0x8)
#define fMD_Readable mMD_Readable
#define fMD_ReadAllowed (0x0)
#define fMD_ReadDisallowed (0x8)
#define mMD_CombinedWrite (0x10)
#define fMD_CombinedWrite mMD_CombinedWrite
#define fMD_CombinedWriteDisallowed (0x0)
#define fMD_CombinedWriteAllowed (0x10)
#define mMD_Cacheable (0x20)
#define fMD_NonCacheable (0x0)
#define fMD_Cacheable (0x20)
#define fMD_WINDOW_DECODE (0x40)
#define fMD_MEMORY_BAR (0x80)
typedef struct Mem_Range_s {
DWORDLONG MR_Align;
ULONG MR_nBytes;
DWORDLONG MR_Min;
DWORDLONG MR_Max;
DWORD MR_Flags;
DWORD MR_Reserved;
} MEM_RANGE,*PMEM_RANGE;
typedef struct Mem_Des_s {
DWORD MD_Count;
DWORD MD_Type;
DWORDLONG MD_Alloc_Base;
DWORDLONG MD_Alloc_End;
DWORD MD_Flags;
DWORD MD_Reserved;
} MEM_DES,*PMEM_DES;
typedef struct Mem_Resource_s {
MEM_DES MEM_Header;
MEM_RANGE MEM_Data[ANYSIZE_ARRAY];
} MEM_RESOURCE,*PMEM_RESOURCE;
#define MType_Range sizeof(struct Mem_Range_s)
typedef struct Mem_Large_Range_s {
DWORDLONG MLR_Align;
ULONGLONG MLR_nBytes;
DWORDLONG MLR_Min;
DWORDLONG MLR_Max;
DWORD MLR_Flags;
DWORD MLR_Reserved;
} MEM_LARGE_RANGE, *PMEM_LARGE_RANGE;
typedef struct Mem_Large_Des_s {
DWORD MLD_Count;
DWORD MLD_Type;
DWORDLONG MLD_Alloc_Base;
DWORDLONG MLD_Alloc_End;
DWORD MLD_Flags;
DWORD MLD_Reserved;
} MEM_LARGE_DES, *PMEM_LARGE_DES;
typedef struct Mem_Large_Resource_s {
MEM_LARGE_DES MEM_LARGE_Header;
MEM_LARGE_RANGE MEM_LARGE_Data[ANYSIZE_ARRAY];
} MEM_LARGE_RESOURCE, *PMEM_LARGE_RESOURCE;
#define MLType_Range sizeof(struct Mem_Large_Range_s)
#define fIOD_PortType (0x1)
#define fIOD_Memory (0x0)
#define fIOD_IO (0x1)
#define fIOD_DECODE (0x00fc)
#define fIOD_10_BIT_DECODE (0x0004)
#define fIOD_12_BIT_DECODE (0x0008)
#define fIOD_16_BIT_DECODE (0x0010)
#define fIOD_POSITIVE_DECODE (0x0020)
#define fIOD_PASSIVE_DECODE (0x0040)
#define fIOD_WINDOW_DECODE (0x0080)
#define fIOD_PORT_BAR (0x0100)
#define IO_ALIAS_10_BIT_DECODE (0x00000004)
#define IO_ALIAS_12_BIT_DECODE (0x00000010)
#define IO_ALIAS_16_BIT_DECODE (0x00000000)
#define IO_ALIAS_POSITIVE_DECODE (0x000000FF)
typedef struct IO_Range_s {
DWORDLONG IOR_Align;
DWORD IOR_nPorts;
DWORDLONG IOR_Min;
DWORDLONG IOR_Max;
DWORD IOR_RangeFlags;
DWORDLONG IOR_Alias;
} IO_RANGE,*PIO_RANGE;
typedef struct IO_Des_s {
DWORD IOD_Count;
DWORD IOD_Type;
DWORDLONG IOD_Alloc_Base;
DWORDLONG IOD_Alloc_End;
DWORD IOD_DesFlags;
} IO_DES,*PIO_DES;
typedef struct IO_Resource_s {
IO_DES IO_Header;
IO_RANGE IO_Data[ANYSIZE_ARRAY];
} IO_RESOURCE,*PIO_RESOURCE;
#define IOA_Local 0xff
#define IOType_Range sizeof(struct IO_Range_s)
#define mDD_Width (0x3)
#define fDD_BYTE (0x0)
#define fDD_WORD (0x1)
#define fDD_DWORD (0x2)
#define fDD_BYTE_AND_WORD (0x3)
#define mDD_BusMaster (0x4)
#define fDD_NoBusMaster (0x0)
#define fDD_BusMaster (0x4)
#define mDD_Type (0x18)
#define fDD_TypeStandard (0x00)
#define fDD_TypeA (0x08)
#define fDD_TypeB (0x10)
#define fDD_TypeF (0x18)
typedef struct DMA_Range_s {
ULONG DR_Min;
ULONG DR_Max;
ULONG DR_Flags;
} DMA_RANGE,*PDMA_RANGE;
typedef struct DMA_Des_s {
DWORD DD_Count;
DWORD DD_Type;
DWORD DD_Flags;
ULONG DD_Alloc_Chan;
} DMA_DES,*PDMA_DES;
typedef struct DMA_Resource_s {
DMA_DES DMA_Header;
DMA_RANGE DMA_Data[ANYSIZE_ARRAY];
} DMA_RESOURCE,*PDMA_RESOURCE;
#define DType_Range sizeof(struct DMA_Range_s)
#define mIRQD_Share (0x1)
#define fIRQD_Exclusive (0x0)
#define fIRQD_Share (0x1)
#define fIRQD_Share_Bit 0
#define fIRQD_Level_Bit 1
#define mIRQD_Edge_Level (0x2)
#define fIRQD_Level (0x0)
#define fIRQD_Edge (0x2)
typedef struct IRQ_Range_s {
ULONG IRQR_Min;
ULONG IRQR_Max;
#ifdef NT_PROCESSOR_GROUPS
USHORT IRQR_Flags;
USHORT IRQR_Rsvdz;
#else
ULONG IRQR_Flags;
#endif
} IRQ_RANGE,*PIRQ_RANGE;
typedef struct IRQ_Des_32_s {
DWORD IRQD_Count;
DWORD IRQD_Type;
#ifdef NT_PROCESSOR_GROUPS
USHORT IRQD_Flags;
USHORT IRQD_Group;
#else
DWORD IRQD_Flags;
#endif
ULONG IRQD_Alloc_Num;
ULONG32 IRQD_Affinity;
} IRQ_DES_32,*PIRQ_DES_32;
typedef struct IRQ_Des_64_s {
DWORD IRQD_Count;
DWORD IRQD_Type;
#if defined(NT_PROCESSOR_GROUPS)
USHORT IRQD_Flags;
USHORT IRQD_Group;
#else
DWORD IRQD_Flags;
#endif
ULONG IRQD_Alloc_Num;
ULONG64 IRQD_Affinity;
} IRQ_DES_64,*PIRQ_DES_64;
#ifdef _WIN64
typedef IRQ_DES_64 IRQ_DES;
typedef PIRQ_DES_64 PIRQ_DES;
#else
typedef IRQ_DES_32 IRQ_DES;
typedef PIRQ_DES_32 PIRQ_DES;
#endif
typedef struct IRQ_Resource_32_s {
IRQ_DES_32 IRQ_Header;
IRQ_RANGE IRQ_Data[ANYSIZE_ARRAY];
} IRQ_RESOURCE_32,*PIRQ_RESOURCE_32;
typedef struct IRQ_Resource_64_s {
IRQ_DES_64 IRQ_Header;
IRQ_RANGE IRQ_Data[ANYSIZE_ARRAY];
} IRQ_RESOURCE_64,*PIRQ_RESOURCE_64;
#ifdef _WIN64
typedef IRQ_RESOURCE_64 IRQ_RESOURCE;
typedef PIRQ_RESOURCE_64 PIRQ_RESOURCE;
#else
typedef IRQ_RESOURCE_32 IRQ_RESOURCE;
typedef PIRQ_RESOURCE_32 PIRQ_RESOURCE;
#endif
#define IRQType_Range sizeof(struct IRQ_Range_s)
#if WINVER >= _WIN32_WINNT_WINXP
#define CM_RESDES_WIDTH_DEFAULT (0x00000000)
#define CM_RESDES_WIDTH_32 (0x00000001)
#define CM_RESDES_WIDTH_64 (0x00000002)
#define CM_RESDES_WIDTH_BITS (0x00000003)
#endif
typedef struct DevPrivate_Range_s {
DWORD PR_Data1;
DWORD PR_Data2;
DWORD PR_Data3;
} DEVPRIVATE_RANGE,*PDEVPRIVATE_RANGE;
typedef struct DevPrivate_Des_s {
DWORD PD_Count;
DWORD PD_Type;
DWORD PD_Data1;
DWORD PD_Data2;
DWORD PD_Data3;
DWORD PD_Flags;
} DEVPRIVATE_DES,*PDEVPRIVATE_DES;
typedef struct DevPrivate_Resource_s {
DEVPRIVATE_DES PRV_Header;
DEVPRIVATE_RANGE PRV_Data[ANYSIZE_ARRAY];
} DEVPRIVATE_RESOURCE,*PDEVPRIVATE_RESOURCE;
#define PType_Range sizeof(struct DevPrivate_Range_s)
typedef struct CS_Des_s {
DWORD CSD_SignatureLength;
DWORD CSD_LegacyDataOffset;
DWORD CSD_LegacyDataSize;
DWORD CSD_Flags;
GUID CSD_ClassGuid;
BYTE CSD_Signature[ANYSIZE_ARRAY];
} CS_DES,*PCS_DES;
typedef struct CS_Resource_s {
CS_DES CS_Header;
} CS_RESOURCE,*PCS_RESOURCE;
#define mPCD_IO_8_16 (0x1)
#define fPCD_IO_8 (0x0)
#define fPCD_IO_16 (0x1)
#define mPCD_MEM_8_16 (0x2)
#define fPCD_MEM_8 (0x0)
#define fPCD_MEM_16 (0x2)
#define mPCD_MEM_A_C (0xC)
#define fPCD_MEM1_A (0x4)
#define fPCD_MEM2_A (0x8)
#define fPCD_IO_ZW_8 (0x10)
#define fPCD_IO_SRC_16 (0x20)
#define fPCD_IO_WS_16 (0x40)
#define mPCD_MEM_WS (0x300)
#define fPCD_MEM_WS_ONE (0x100)
#define fPCD_MEM_WS_TWO (0x200)
#define fPCD_MEM_WS_THREE (0x300)
#if WINVER >= _WIN32_WINNT_WINXP
#define fPCD_MEM_A (0x4)
#define fPCD_ATTRIBUTES_PER_WINDOW (0x8000)
#define fPCD_IO1_16 (0x00010000)
#define fPCD_IO1_ZW_8 (0x00020000)
#define fPCD_IO1_SRC_16 (0x00040000)
#define fPCD_IO1_WS_16 (0x00080000)
#define fPCD_IO2_16 (0x00100000)
#define fPCD_IO2_ZW_8 (0x00200000)
#define fPCD_IO2_SRC_16 (0x00400000)
#define fPCD_IO2_WS_16 (0x00800000)
#define mPCD_MEM1_WS (0x03000000)
#define fPCD_MEM1_WS_ONE (0x01000000)
#define fPCD_MEM1_WS_TWO (0x02000000)
#define fPCD_MEM1_WS_THREE (0x03000000)
#define fPCD_MEM1_16 (0x04000000)
#define mPCD_MEM2_WS (0x30000000)
#define fPCD_MEM2_WS_ONE (0x10000000)
#define fPCD_MEM2_WS_TWO (0x20000000)
#define fPCD_MEM2_WS_THREE (0x30000000)
#define fPCD_MEM2_16 (0x40000000)
#define PCD_MAX_MEMORY 2
#define PCD_MAX_IO 2
#endif
typedef struct PcCard_Des_s {
DWORD PCD_Count;
DWORD PCD_Type;
DWORD PCD_Flags;
BYTE PCD_ConfigIndex;
BYTE PCD_Reserved[3];
DWORD PCD_MemoryCardBase1;
DWORD PCD_MemoryCardBase2;
#if WINVER >= _WIN32_WINNT_WINXP
DWORD PCD_MemoryCardBase[PCD_MAX_MEMORY];
WORD PCD_MemoryFlags[PCD_MAX_MEMORY];
BYTE PCD_IoFlags[PCD_MAX_IO];
#endif
} PCCARD_DES,*PPCCARD_DES;
typedef struct PcCard_Resource_s {
PCCARD_DES PcCard_Header;
} PCCARD_RESOURCE,*PPCCARD_RESOURCE;
#define mPMF_AUDIO_ENABLE (0x8)
#define fPMF_AUDIO_ENABLE (0x8)
typedef struct MfCard_Des_s {
DWORD PMF_Count;
DWORD PMF_Type;
DWORD PMF_Flags;
BYTE PMF_ConfigOptions;
BYTE PMF_IoResourceIndex;
BYTE PMF_Reserved[2];
DWORD PMF_ConfigRegisterBase;
} MFCARD_DES,*PMFCARD_DES;
typedef struct MfCard_Resource_s {
MFCARD_DES MfCard_Header;
} MFCARD_RESOURCE,*PMFCARD_RESOURCE;
typedef struct BusNumber_Range_s {
ULONG BUSR_Min;
ULONG BUSR_Max;
ULONG BUSR_nBusNumbers;
ULONG BUSR_Flags;
} BUSNUMBER_RANGE,*PBUSNUMBER_RANGE;
typedef struct BusNumber_Des_s {
DWORD BUSD_Count;
DWORD BUSD_Type;
DWORD BUSD_Flags;
ULONG BUSD_Alloc_Base;
ULONG BUSD_Alloc_End;
} BUSNUMBER_DES,*PBUSNUMBER_DES;
typedef struct BusNumber_Resource_s {
BUSNUMBER_DES BusNumber_Header;
BUSNUMBER_RANGE BusNumber_Data[ANYSIZE_ARRAY];
} BUSNUMBER_RESOURCE,*PBUSNUMBER_RESOURCE;
#define BusNumberType_Range sizeof(struct BusNumber_Range_s)
#if WINVER >= _WIN32_WINNT_WIN8
typedef struct Connection_Des_s {
DWORD COND_Type;
DWORD COND_Flags;
BYTE COND_Class;
BYTE COND_ClassType;
BYTE COND_Reserved1;
BYTE COND_Reserved2;
LARGE_INTEGER COND_Id;
} CONNECTION_DES, *PCONNECTION_DES;
typedef struct Connection_Resource_s {
CONNECTION_DES Connection_Header;
} CONNECTION_RESOURCE, *PCONNECTION_RESOURCE;
#endif
#define CM_HWPI_NOT_DOCKABLE (0x00000000)
#define CM_HWPI_UNDOCKED (0x00000001)
#define CM_HWPI_DOCKED (0x00000002)
typedef struct HWProfileInfo_sA {
ULONG HWPI_ulHWProfile;
CHAR HWPI_szFriendlyName[MAX_PROFILE_LEN];
DWORD HWPI_dwFlags;
} HWPROFILEINFO_A,*PHWPROFILEINFO_A;
typedef struct HWProfileInfo_sW {
ULONG HWPI_ulHWProfile;
WCHAR HWPI_szFriendlyName[MAX_PROFILE_LEN];
DWORD HWPI_dwFlags;
} HWPROFILEINFO_W,*PHWPROFILEINFO_W;
__MINGW_TYPEDEF_UAW(HWPROFILEINFO)
__MINGW_TYPEDEF_UAW(PHWPROFILEINFO)
#include "poppack.h"
#define ResType_All (0x00000000)
#define ResType_None (0x00000000)
#define ResType_Mem (0x00000001)
#define ResType_IO (0x00000002)
#define ResType_DMA (0x00000003)
#define ResType_IRQ (0x00000004)
#define ResType_DoNotUse (0x00000005)
#define ResType_BusNumber (0x00000006)
#define ResType_MemLarge (0x00000007)
#define ResType_MAX (0x00000007)
#define ResType_Ignored_Bit (0x00008000)
#define ResType_ClassSpecific (0x0000FFFF)
#define ResType_Reserved (0x00008000)
#define ResType_DevicePrivate (0x00008001)
#define ResType_PcCardConfig (0x00008002)
#define ResType_MfCardConfig (0x00008003)
#if WINVER >= _WIN32_WINNT_WIN8
#define ResType_Connection (0x00008004)
#endif
#define CM_ADD_RANGE_ADDIFCONFLICT (0x00000000)
#define CM_ADD_RANGE_DONOTADDIFCONFLICT (0x00000001)
#define CM_ADD_RANGE_BITS (0x00000001)
#define BASIC_LOG_CONF 0x00000000
#define FILTERED_LOG_CONF 0x00000001
#define ALLOC_LOG_CONF 0x00000002
#define BOOT_LOG_CONF 0x00000003
#define FORCED_LOG_CONF 0x00000004
#define OVERRIDE_LOG_CONF 0x00000005
#define NUM_LOG_CONF 0x00000006
#define LOG_CONF_BITS 0x00000007
#define PRIORITY_EQUAL_FIRST (0x00000008)
#define PRIORITY_EQUAL_LAST (0x00000000)
#define PRIORITY_BIT (0x00000008)
#define RegDisposition_OpenAlways (0x00000000)
#define RegDisposition_OpenExisting (0x00000001)
#define RegDisposition_Bits (0x00000001)
#define CM_ADD_ID_HARDWARE (0x00000000)
#define CM_ADD_ID_COMPATIBLE (0x00000001)
#define CM_ADD_ID_BITS (0x00000001)
#define CM_CREATE_DEVNODE_NORMAL (0x00000000)
#define CM_CREATE_DEVNODE_NO_WAIT_INSTALL (0x00000001)
#define CM_CREATE_DEVNODE_PHANTOM (0x00000002)
#define CM_CREATE_DEVNODE_GENERATE_ID (0x00000004)
#define CM_CREATE_DEVNODE_DO_NOT_INSTALL (0x00000008)
#define CM_CREATE_DEVNODE_BITS (0x0000000F)
#define CM_CREATE_DEVINST_NORMAL CM_CREATE_DEVNODE_NORMAL
#define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
#define CM_CREATE_DEVINST_PHANTOM CM_CREATE_DEVNODE_PHANTOM
#define CM_CREATE_DEVINST_GENERATE_ID CM_CREATE_DEVNODE_GENERATE_ID
#define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
#define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
#define CM_DELETE_CLASS_ONLY (0x00000000)
#define CM_DELETE_CLASS_SUBKEYS (0x00000001)
#if WINVER >= _WIN32_WINNT_LONGHORN
#define CM_DELETE_CLASS_INTERFACE (0x00000002)
#endif
#define CM_DELETE_CLASS_BITS (0x00000003)
#if WINVER >= _WIN32_WINNT_WIN8
#define CM_ENUMERATE_CLASSES_INSTALLER (0x00000000)
#define CM_ENUMERATE_CLASSES_INTERFACE (0x00000001)
#define CM_ENUMERATE_CLASSES_BITS (0x00000001)
#endif
#define CM_DETECT_NEW_PROFILE (0x00000001)
#define CM_DETECT_CRASHED (0x00000002)
#define CM_DETECT_HWPROF_FIRST_BOOT (0x00000004)
#define CM_DETECT_RUN (0x80000000)
#define CM_DETECT_BITS (0x80000007)
#define CM_DISABLE_POLITE (0x00000000)
#define CM_DISABLE_ABSOLUTE (0x00000001)
#define CM_DISABLE_HARDWARE (0x00000002)
#define CM_DISABLE_UI_NOT_OK (0x00000004)
#define CM_DISABLE_PERSIST (0x00000008)
#define CM_DISABLE_BITS (0x00000007)
#define CM_GETIDLIST_FILTER_NONE (0x00000000)
#define CM_GETIDLIST_FILTER_ENUMERATOR (0x00000001)
#define CM_GETIDLIST_FILTER_SERVICE (0x00000002)
#define CM_GETIDLIST_FILTER_EJECTRELATIONS (0x00000004)
#define CM_GETIDLIST_FILTER_REMOVALRELATIONS (0x00000008)
#define CM_GETIDLIST_FILTER_POWERRELATIONS (0x00000010)
#define CM_GETIDLIST_FILTER_BUSRELATIONS (0x00000020)
#define CM_GETIDLIST_DONOTGENERATE (0x10000040)
#if WINVER <= _WIN32_WINNT_LONGHORN
#define CM_GETIDLIST_FILTER_BITS (0x1000007F)
#endif
#if WINVER >= _WIN32_WINNT_WIN7
#define CM_GETIDLIST_FILTER_TRANSPORTRELATIONS (0x00000080)
#define CM_GETIDLIST_FILTER_PRESENT (0x00000100)
#define CM_GETIDLIST_FILTER_CLASS (0x00000200)
#define CM_GETIDLIST_FILTER_BITS (0x100003FF)
#endif
#define CM_GET_DEVICE_INTERFACE_LIST_PRESENT (0x00000000)
#define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES (0x00000001)
#define CM_GET_DEVICE_INTERFACE_LIST_BITS (0x00000001)
#define CM_DRP_DEVICEDESC (0x00000001)
#define CM_DRP_HARDWAREID (0x00000002)
#define CM_DRP_COMPATIBLEIDS (0x00000003)
#define CM_DRP_UNUSED0 (0x00000004)
#define CM_DRP_SERVICE (0x00000005)
#define CM_DRP_UNUSED1 (0x00000006)
#define CM_DRP_UNUSED2 (0x00000007)
#define CM_DRP_CLASS (0x00000008)
#define CM_DRP_CLASSGUID (0x00000009)
#define CM_DRP_DRIVER (0x0000000A)
#define CM_DRP_CONFIGFLAGS (0x0000000B)
#define CM_DRP_MFG (0x0000000C)
#define CM_DRP_FRIENDLYNAME (0x0000000D)
#define CM_DRP_LOCATION_INFORMATION (0x0000000E)
#define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME (0x0000000F)
#define CM_DRP_CAPABILITIES (0x00000010)
#define CM_DRP_UI_NUMBER (0x00000011)
#define CM_DRP_UPPERFILTERS (0x00000012)
#if WINVER >= _WIN32_WINNT_LONGHORN
#define CM_CRP_UPPERFILTERS CM_DRP_UPPERFILTERS
#endif
#define CM_DRP_LOWERFILTERS (0x00000013)
#if WINVER >= _WIN32_WINNT_LONGHORN
#define CM_CRP_LOWERFILTERS CM_DRP_LOWERFILTERS
#endif
#define CM_DRP_BUSTYPEGUID (0x00000014)
#define CM_DRP_LEGACYBUSTYPE (0x00000015)
#define CM_DRP_BUSNUMBER (0x00000016)
#define CM_DRP_ENUMERATOR_NAME (0x00000017)
#define CM_DRP_SECURITY (0x00000018)
#define CM_CRP_SECURITY CM_DRP_SECURITY
#define CM_DRP_SECURITY_SDS (0x00000019)
#define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS
#define CM_DRP_DEVTYPE (0x0000001A)
#define CM_CRP_DEVTYPE CM_DRP_DEVTYPE
#define CM_DRP_EXCLUSIVE (0x0000001B)
#define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE
#define CM_DRP_CHARACTERISTICS (0x0000001C)
#define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS
#define CM_DRP_ADDRESS (0x0000001D)
#define CM_DRP_UI_NUMBER_DESC_FORMAT (0x0000001E)
#if WINVER >= _WIN32_WINNT_WINXP
#define CM_DRP_DEVICE_POWER_DATA (0x0000001F)
#define CM_DRP_REMOVAL_POLICY (0x00000020)
#define CM_DRP_REMOVAL_POLICY_HW_DEFAULT (0x00000021)
#define CM_DRP_REMOVAL_POLICY_OVERRIDE (0x00000022)
#define CM_DRP_INSTALL_STATE (0x00000023)
#endif
#if WINVER >= _WIN32_WINNT_WS03
#define CM_DRP_LOCATION_PATHS (0x00000024)
#endif
#if WINVER >= _WIN32_WINNT_WIN7
#define CM_DRP_BASE_CONTAINERID (0x00000025)
#endif
#define CM_DRP_MIN (0x00000001)
#define CM_CRP_MIN CM_DRP_MIN
#define CM_DRP_MAX (0x00000023)
#define CM_CRP_MAX CM_DRP_MAX
#define CM_DEVCAP_LOCKSUPPORTED (0x00000001)
#define CM_DEVCAP_EJECTSUPPORTED (0x00000002)
#define CM_DEVCAP_REMOVABLE (0x00000004)
#define CM_DEVCAP_DOCKDEVICE (0x00000008)
#define CM_DEVCAP_UNIQUEID (0x00000010)
#define CM_DEVCAP_SILENTINSTALL (0x00000020)
#define CM_DEVCAP_RAWDEVICEOK (0x00000040)
#define CM_DEVCAP_SURPRISEREMOVALOK (0x00000080)
#define CM_DEVCAP_HARDWAREDISABLED (0x00000100)
#define CM_DEVCAP_NONDYNAMIC (0x00000200)
#define CM_DEVCAP_SECUREDEVICE (0x00000400)
#if WINVER >= _WIN32_WINNT_WINXP
#define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
#define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
#define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
#define CM_INSTALL_STATE_INSTALLED 0
#define CM_INSTALL_STATE_NEEDS_REINSTALL 1
#define CM_INSTALL_STATE_FAILED_INSTALL 2
#define CM_INSTALL_STATE_FINISH_INSTALL 3
#endif
#define CM_LOCATE_DEVNODE_NORMAL 0x00000000
#define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
#define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
#define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
#define CM_LOCATE_DEVNODE_BITS 0x00000007
#define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
#define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
#define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
#define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
#define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
#define CM_OPEN_CLASS_KEY_INSTALLER (0x00000000)
#define CM_OPEN_CLASS_KEY_INTERFACE (0x00000001)
#define CM_OPEN_CLASS_KEY_BITS (0x00000001)
#define CM_REMOVE_UI_OK 0x00000000
#define CM_REMOVE_UI_NOT_OK 0x00000001
#define CM_REMOVE_NO_RESTART 0x00000002
#define CM_REMOVE_BITS 0x00000003
#define CM_QUERY_REMOVE_UI_OK (CM_REMOVE_UI_OK)
#define CM_QUERY_REMOVE_UI_NOT_OK (CM_REMOVE_UI_NOT_OK)
#define CM_QUERY_REMOVE_BITS (CM_QUERY_REMOVE_UI_OK|CM_QUERY_REMOVE_UI_NOT_OK)
#define CM_REENUMERATE_NORMAL 0x00000000
#define CM_REENUMERATE_SYNCHRONOUS 0x00000001
#if WINVER >= _WIN32_WINNT_WINXP
#define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
#define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
#endif
#define CM_REENUMERATE_BITS 0x00000007
#define CM_REGISTER_DEVICE_DRIVER_STATIC (0x00000000)
#define CM_REGISTER_DEVICE_DRIVER_DISABLEABLE (0x00000001)
#define CM_REGISTER_DEVICE_DRIVER_REMOVABLE (0x00000002)
#define CM_REGISTER_DEVICE_DRIVER_BITS (0x00000003)
#define CM_REGISTRY_HARDWARE (0x00000000)
#define CM_REGISTRY_SOFTWARE (0x00000001)
#define CM_REGISTRY_USER (0x00000100)
#define CM_REGISTRY_CONFIG (0x00000200)
#define CM_REGISTRY_BITS (0x00000301)
#define CM_SET_DEVNODE_PROBLEM_NORMAL (0x00000000)
#define CM_SET_DEVNODE_PROBLEM_OVERRIDE (0x00000001)
#define CM_SET_DEVNODE_PROBLEM_BITS (0x00000001)
#define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
#define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
#define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
#define CM_SET_HW_PROF_FLAGS_UI_NOT_OK (0x00000001)
#define CM_SET_HW_PROF_FLAGS_BITS (0x00000001)
#define CM_SETUP_DEVNODE_READY (0x00000000)
#define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
#define CM_SETUP_DOWNLOAD (0x00000001)
#define CM_SETUP_WRITE_LOG_CONFS (0x00000002)
#define CM_SETUP_PROP_CHANGE (0x00000003)
#if WINVER >= _WIN32_WINNT_WINXP
#define CM_SETUP_DEVNODE_RESET (0x00000004)
#define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
#endif
#if WINVER >= _WIN32_WINNT_WIN8
#define CM_SETUP_DEVNODE_CONFIG (0x00000005)
#define CM_SETUP_DEVINST_CONFIG CM_SETUP_DEVNODE_CONFIG
#define CM_SETUP_DEVNODE_CONFIG_CLASS (0x00000006)
#define CM_SETUP_DEVINST_CONFIG_CLASS CM_SETUP_DEVNODE_CONFIG_CLASS
#endif
#if WINVER >= _WIN32_WINNT_WINBLUE
#define CM_SETUP_DEVNODE_CONFIG_EXTENSIONS (0x00000007)
#define CM_SETUP_DEVINST_CONFIG_EXTENSIONS CM_SETUP_DEVNODE_CONFIG_EXTENSIONS
#endif
#if WINVER >= _WIN32_WINNT_WINTHRESHOLD
#define CM_SETUP_DEVNODE_CONFIG_RESET (0x00000008)
#define CM_SETUP_DEVINST_CONFIG_RESET CM_SETUP_DEVNODE_CONFIG_RESET
#endif
#define CM_SETUP_BITS (0x00000007)
#define CM_QUERY_ARBITRATOR_RAW (0x00000000)
#define CM_QUERY_ARBITRATOR_TRANSLATED (0x00000001)
#define CM_QUERY_ARBITRATOR_BITS (0x00000001)
#if WINVER >= _WIN32_WINNT_WINXP
#define CM_CUSTOMDEVPROP_MERGE_MULTISZ (0x00000001)
#define CM_CUSTOMDEVPROP_BITS (0x00000001)
#endif
#define CM_NAME_ATTRIBUTE_NAME_RETRIEVED_FROM_DEVICE (0x1)
#define CM_NAME_ATTRIBUTE_USER_ASSIGNED_NAME (0x2)
#if WINVER >= _WIN32_WINNT_LONGHORN
#define CM_CLASS_PROPERTY_INSTALLER (0x00000000)
#define CM_CLASS_PROPERTY_INTERFACE (0x00000001)
#define CM_CLASS_PROPERTY_BITS (0x00000001)
#endif
#if WINVER >= _WIN32_WINNT_WIN8
DECLARE_HANDLE(HCMNOTIFICATION);
typedef HCMNOTIFICATION *PHCMNOTIFICATION;
#define CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES 0x00000001
#define CM_NOTIFY_FILTER_FLAG_ALL_DEVICE_INSTANCES 0x00000002
#define CM_NOTIFY_FILTER_VALID_FLAGS (CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES | CM_NOTIFY_FILTER_FLAG_ALL_DEVICE_INSTANCES)
typedef enum _CM_NOTIFY_FILTER_TYPE {
CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE = 0,
CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE,
CM_NOTIFY_FILTER_TYPE_DEVICEINSTANCE,
CM_NOTIFY_FILTER_TYPE_MAX
} CM_NOTIFY_FILTER_TYPE, *PCM_NOTIFY_FILTER_TYPE;
typedef struct _CM_NOTIFY_FILTER {
DWORD cbSize;
DWORD Flags;
CM_NOTIFY_FILTER_TYPE FilterType;
DWORD Reserved;
union {
struct {
GUID ClassGuid;
} DeviceInterface;
struct {
HANDLE hTarget;
} DeviceHandle;
struct {
WCHAR InstanceId[MAX_DEVICE_ID_LEN];
} DeviceInstance;
} u;
} CM_NOTIFY_FILTER, *PCM_NOTIFY_FILTER;
typedef enum _CM_NOTIFY_ACTION {
CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL = 0,
CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL,
CM_NOTIFY_ACTION_DEVICEQUERYREMOVE,
CM_NOTIFY_ACTION_DEVICEQUERYREMOVEFAILED,
CM_NOTIFY_ACTION_DEVICEREMOVEPENDING,
CM_NOTIFY_ACTION_DEVICEREMOVECOMPLETE,
CM_NOTIFY_ACTION_DEVICECUSTOMEVENT,
CM_NOTIFY_ACTION_DEVICEINSTANCEENUMERATED,
CM_NOTIFY_ACTION_DEVICEINSTANCESTARTED,
CM_NOTIFY_ACTION_DEVICEINSTANCEREMOVED,
CM_NOTIFY_ACTION_MAX
} CM_NOTIFY_ACTION, *PCM_NOTIFY_ACTION;
typedef struct _CM_NOTIFY_EVENT_DATA {
CM_NOTIFY_FILTER_TYPE FilterType;
DWORD Reserved;
union {
struct {
GUID ClassGuid;
WCHAR SymbolicLink[ANYSIZE_ARRAY];
} DeviceInterface;
struct {
GUID EventGuid;
LONG NameOffset;
DWORD DataSize;
BYTE Data[ANYSIZE_ARRAY];
} DeviceHandle;
struct {
WCHAR InstanceId[ANYSIZE_ARRAY];
} DeviceInstance;
} u;
} CM_NOTIFY_EVENT_DATA, *PCM_NOTIFY_EVENT_DATA;
typedef DWORD (CALLBACK *PCM_NOTIFY_CALLBACK)(HCMNOTIFICATION hNotify, PVOID Context, CM_NOTIFY_ACTION Action, PCM_NOTIFY_EVENT_DATA EventData, DWORD EventDataSize);
#endif /* WINVER >= _WIN32_WINNT_WIN8 */
#define CM_Add_ID __MINGW_NAME_AW(CM_Add_ID)
#define CM_Add_ID_Ex __MINGW_NAME_AW(CM_Add_ID_Ex)
#define CM_Connect_Machine __MINGW_NAME_AW(CM_Connect_Machine)
#define CM_Create_DevNode __MINGW_NAME_AW(CM_Create_DevNode)
#define CM_Create_DevInst __MINGW_NAME_AW(CM_Create_DevNode)
#define CM_Create_DevNode_Ex __MINGW_NAME_AW(CM_Create_DevNode_Ex)
#define CM_Create_DevInst_Ex __MINGW_NAME_AW(CM_Create_DevInst_Ex)
#define CM_Enumerate_Enumerators __MINGW_NAME_AW(CM_Enumerate_Enumerators)
#define CM_Enumerate_Enumerators_Ex __MINGW_NAME_AW(CM_Enumerate_Enumerators_Ex)
#define CM_Get_Class_Name __MINGW_NAME_AW(CM_Get_Class_Name)
#define CM_Get_Class_Name_Ex __MINGW_NAME_AW(CM_Get_Class_Name_Ex)
#define CM_Get_Class_Key_Name __MINGW_NAME_AW(CM_Get_Class_Key_Name)
#define CM_Get_Class_Key_Name_Ex __MINGW_NAME_AW(CM_Get_Class_Key_Name_Ex)
#define CM_Get_Device_ID __MINGW_NAME_AW(CM_Get_Device_ID)
#define CM_Get_Device_ID_Ex __MINGW_NAME_AW(CM_Get_Device_ID_Ex)
#define CM_Get_Device_ID_List __MINGW_NAME_AW(CM_Get_Device_ID_List)
#define CM_Get_Device_ID_List_Ex __MINGW_NAME_AW(CM_Get_Device_ID_List_Ex)
#define CM_Get_Device_ID_List_Size __MINGW_NAME_AW(CM_Get_Device_ID_List_Size)
#define CM_Get_Device_ID_List_Size_Ex __MINGW_NAME_AW(CM_Get_Device_ID_List_Size_Ex)
#define CM_Get_DevInst_Registry_Property __MINGW_NAME_AW(CM_Get_DevNode_Registry_Property)
#define CM_Get_DevInst_Registry_Property_Ex __MINGW_NAME_AW(CM_Get_DevNode_Registry_Property_Ex)
#define CM_Get_DevNode_Registry_Property __MINGW_NAME_AW(CM_Get_DevNode_Registry_Property)
#define CM_Get_DevNode_Registry_Property_Ex __MINGW_NAME_AW(CM_Get_DevNode_Registry_Property_Ex)
#define CM_Get_DevInst_Custom_Property __MINGW_NAME_AW(CM_Get_DevNode_Custom_Property)
#define CM_Get_DevInst_Custom_Property_Ex __MINGW_NAME_AW(CM_Get_DevNode_Custom_Property_Ex)
#define CM_Get_DevNode_Custom_Property __MINGW_NAME_AW(CM_Get_DevNode_Custom_Property)
#define CM_Get_DevNode_Custom_Property_Ex __MINGW_NAME_AW(CM_Get_DevNode_Custom_Property_Ex)
#define CM_Get_Hardware_Profile_Info __MINGW_NAME_AW(CM_Get_Hardware_Profile_Info)
#define CM_Get_Hardware_Profile_Info_Ex __MINGW_NAME_AW(CM_Get_Hardware_Profile_Info_Ex)
#define CM_Get_HW_Prof_Flags __MINGW_NAME_AW(CM_Get_HW_Prof_Flags)
#define CM_Get_HW_Prof_Flags_Ex __MINGW_NAME_AW(CM_Get_HW_Prof_Flags_Ex)
#define CM_Get_Device_Interface_Alias __MINGW_NAME_AW(CM_Get_Device_Interface_Alias)
#define CM_Get_Device_Interface_Alias_Ex __MINGW_NAME_AW(CM_Get_Device_Interface_Alias_Ex)
#define CM_Get_Device_Interface_List_Ex __MINGW_NAME_AW(CM_Get_Device_Interface_List_Ex)
#define CM_Get_Device_Interface_List_Size_Ex __MINGW_NAME_AW(CM_Get_Device_Interface_List_Size_Ex)
#define CM_Locate_DevNode __MINGW_NAME_AW(CM_Locate_DevNode)
#define CM_Locate_DevInst __MINGW_NAME_AW(CM_Locate_DevNode)
#define CM_Locate_DevNode_Ex __MINGW_NAME_AW(CM_Locate_DevNode_Ex)
#define CM_Locate_DevInst_Ex __MINGW_NAME_AW(CM_Locate_DevNode_Ex)
#define CM_Open_Class_Key __MINGW_NAME_AW(CM_Open_Class_Key)
#define CM_Open_Class_Key_Ex __MINGW_NAME_AW(CM_Open_Class_Key_Ex)
#define CM_Query_And_Remove_SubTree __MINGW_NAME_AW(CM_Query_And_Remove_SubTree)
#define CM_Query_And_Remove_SubTree_Ex __MINGW_NAME_AW(CM_Query_And_Remove_SubTree_Ex)
#define CM_Request_Device_Eject __MINGW_NAME_AW(CM_Request_Device_Eject)
#define CM_Request_Device_Eject_Ex __MINGW_NAME_AW(CM_Request_Device_Eject_Ex)
#define CM_Register_Device_Interface __MINGW_NAME_AW(CM_Register_Device_Interface)
#define CM_Register_Device_Interface_Ex __MINGW_NAME_AW(CM_Register_Device_Interface_Ex)
#define CM_Unregister_Device_Interface __MINGW_NAME_AW(CM_Unregister_Device_Interface)
#define CM_Unregister_Device_Interface_Ex __MINGW_NAME_AW(CM_Unregister_Device_Interface_Ex)
#define CM_Set_DevInst_Registry_Property __MINGW_NAME_AW(CM_Set_DevNode_Registry_Property)
#define CM_Set_DevInst_Registry_Property_Ex __MINGW_NAME_AW(CM_Set_DevNode_Registry_Property_Ex)
#define CM_Set_DevNode_Registry_Property __MINGW_NAME_AW(CM_Set_DevNode_Registry_Property)
#define CM_Set_DevNode_Registry_Property_Ex __MINGW_NAME_AW(CM_Set_DevNode_Registry_Property_Ex)
#define CM_Set_HW_Prof_Flags __MINGW_NAME_AW(CM_Set_HW_Prof_Flags)
#define CM_Set_HW_Prof_Flags_Ex __MINGW_NAME_AW(CM_Set_HW_Prof_Flags_Ex)
#define CM_Get_Resource_Conflict_Details __MINGW_NAME_AW(CM_Get_Resource_Conflict_Details)
#define CM_Get_Class_Registry_Property __MINGW_NAME_AW(CM_Get_Class_Registry_Property)
#define CM_Set_Class_Registry_Property __MINGW_NAME_AW(CM_Set_Class_Registry_Property)
CMAPI CONFIGRET WINAPI CM_Add_Empty_Log_Conf(PLOG_CONF plcLogConf,DEVINST dnDevInst,PRIORITY Priority,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Add_Empty_Log_Conf_Ex(PLOG_CONF plcLogConf,DEVINST dnDevInst,PRIORITY Priority,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Add_IDA(DEVINST dnDevInst,PSTR pszID,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Add_IDW(DEVINST dnDevInst,PWSTR pszID,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Add_ID_ExA(DEVINST dnDevInst,PSTR pszID,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Add_ID_ExW(DEVINST dnDevInst,PWSTR pszID,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Add_Range(DWORDLONG ullStartValue,DWORDLONG ullEndValue,RANGE_LIST rlh,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Add_Res_Des(PRES_DES prdResDes,LOG_CONF lcLogConf,RESOURCEID ResourceID,PCVOID ResourceData,ULONG ResourceLen,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Add_Res_Des_Ex(PRES_DES prdResDes,LOG_CONF lcLogConf,RESOURCEID ResourceID,PCVOID ResourceData,ULONG ResourceLen,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Connect_MachineA(PCSTR UNCServerName,PHMACHINE phMachine);
CMAPI CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR UNCServerName,PHMACHINE phMachine);
CMAPI CONFIGRET WINAPI CM_Create_DevNodeA(PDEVINST pdnDevInst,DEVINSTID_A pDeviceID,DEVINST dnParent,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Create_DevNodeW(PDEVINST pdnDevInst,DEVINSTID_W pDeviceID,DEVINST dnParent,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Create_DevNode_ExA(PDEVINST pdnDevInst,DEVINSTID_A pDeviceID,DEVINST dnParent,ULONG ulFlags,HANDLE hMachine);
CMAPI CONFIGRET WINAPI CM_Create_DevNode_ExW(PDEVINST pdnDevInst,DEVINSTID_W pDeviceID,DEVINST dnParent,ULONG ulFlags,HANDLE hMachine);
#define CM_Create_DevInstW CM_Create_DevNodeW
#define CM_Create_DevInstA CM_Create_DevNodeA
#define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
#define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
CMAPI CONFIGRET WINAPI CM_Create_Range_List(PRANGE_LIST prlh,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Delete_Class_Key(LPGUID ClassGuid,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Delete_Class_Key_Ex(LPGUID ClassGuid,ULONG ulFlags,HANDLE hMachine);
CMAPI CONFIGRET WINAPI CM_Delete_DevNode_Key(DEVNODE dnDevNode,ULONG ulHardwareProfile,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Delete_DevNode_Key_Ex(DEVNODE dnDevNode,ULONG ulHardwareProfile,ULONG ulFlags,HANDLE hMachine);
#define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
#define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
CMAPI CONFIGRET WINAPI CM_Delete_Range(DWORDLONG ullStartValue,DWORDLONG ullEndValue,RANGE_LIST rlh,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Detect_Resource_Conflict(DEVINST dnDevInst,RESOURCEID ResourceID,PCVOID ResourceData,ULONG ResourceLen,PBOOL pbConflictDetected,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Detect_Resource_Conflict_Ex(DEVINST dnDevInst,RESOURCEID ResourceID,PCVOID ResourceData,ULONG ResourceLen,PBOOL pbConflictDetected,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Disable_DevNode(DEVINST dnDevInst,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Disable_DevNode_Ex(DEVINST dnDevInst,ULONG ulFlags,HMACHINE hMachine);
#define CM_Disable_DevInst CM_Disable_DevNode
#define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
CMAPI CONFIGRET WINAPI CM_Disconnect_Machine(HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Dup_Range_List(RANGE_LIST rlhOld,RANGE_LIST rlhNew,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Enable_DevNode(DEVINST dnDevInst,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Enable_DevNode_Ex(DEVINST dnDevInst,ULONG ulFlags,HMACHINE hMachine);
#define CM_Enable_DevInst CM_Enable_DevNode
#define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
CMAPI CONFIGRET WINAPI CM_Enumerate_Classes(ULONG ulClassIndex,LPGUID ClassGuid,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Enumerate_Classes_Ex(ULONG ulClassIndex,LPGUID ClassGuid,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Enumerate_EnumeratorsA(ULONG ulEnumIndex,PCHAR Buffer,PULONG pulLength,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Enumerate_EnumeratorsW(ULONG ulEnumIndex,PWCHAR Buffer,PULONG pulLength,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA(ULONG ulEnumIndex,PCHAR Buffer,PULONG pulLength,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW(ULONG ulEnumIndex,PWCHAR Buffer,PULONG pulLength,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Find_Range(PDWORDLONG pullStart,DWORDLONG ullStart,ULONG ulLength,DWORDLONG ullAlignment,DWORDLONG ullEnd,RANGE_LIST rlh,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_First_Range(RANGE_LIST rlh,PDWORDLONG pullStart,PDWORDLONG pullEnd,PRANGE_ELEMENT preElement,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Free_Log_Conf(LOG_CONF lcLogConfToBeFreed,ULONG ulFlags);
CMAPI CONFIGRET WINAPI CM_Free_Log_Conf_Ex(LOG_CONF lcLogConfToBeFreed,ULONG ulFlags,HMACHINE hMachine);
CMAPI CONFIGRET WINAPI CM_Free_Log_Conf_Handle(LOG_CONF lcLogConf);