54133469bc13bcfa1628d637977c936a5742e8c8
[reactos.git] / reactos / include / ddk / cfgmgr32.h
1 /*
2 * cfgmgr32.h
3 *
4 * PnP configuration manager
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
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.
20 *
21 */
22
23 #ifndef _CFGMGR32_H_
24 #define _CFGMGR32_H_
25
26 #include "cfg.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #if defined(_CFGMGR32_)
33 #define CMAPI
34 #else
35 #define CMAPI DECLSPEC_IMPORT
36 #endif
37
38 #include <pshpack1.h>
39
40 #define CR_SUCCESS 0x00000000
41 #define CR_DEFAULT 0x00000001
42 #define CR_OUT_OF_MEMORY 0x00000002
43 #define CR_INVALID_POINTER 0x00000003
44 #define CR_INVALID_FLAG 0x00000004
45 #define CR_INVALID_DEVNODE 0x00000005
46 #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
47 #define CR_INVALID_RES_DES 0x00000006
48 #define CR_INVALID_LOG_CONF 0x00000007
49 #define CR_INVALID_ARBITRATOR 0x00000008
50 #define CR_INVALID_NODELIST 0x00000009
51 #define CR_DEVNODE_HAS_REQS 0x0000000A
52 #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
53 #define CR_INVALID_RESOURCEID 0x0000000B
54 #define CR_DLVXD_NOT_FOUND 0x0000000C
55 #define CR_NO_SUCH_DEVNODE 0x0000000D
56 #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
57 #define CR_NO_MORE_LOG_CONF 0x0000000E
58 #define CR_NO_MORE_RES_DES 0x0000000F
59 #define CR_ALREADY_SUCH_DEVNODE 0x00000010
60 #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
61 #define CR_INVALID_RANGE_LIST 0x00000011
62 #define CR_INVALID_RANGE 0x00000012
63 #define CR_FAILURE 0x00000013
64 #define CR_NO_SUCH_LOGICAL_DEV 0x00000014
65 #define CR_CREATE_BLOCKED 0x00000015
66 #define CR_NOT_SYSTEM_VM 0x00000016
67 #define CR_REMOVE_VETOED 0x00000017
68 #define CR_APM_VETOED 0x00000018
69 #define CR_INVALID_LOAD_TYPE 0x00000019
70 #define CR_BUFFER_SMALL 0x0000001A
71 #define CR_NO_ARBITRATOR 0x0000001B
72 #define CR_NO_REGISTRY_HANDLE 0x0000001C
73 #define CR_REGISTRY_ERROR 0x0000001D
74 #define CR_INVALID_DEVICE_ID 0x0000001E
75 #define CR_INVALID_DATA 0x0000001F
76 #define CR_INVALID_API 0x00000020
77 #define CR_DEVLOADER_NOT_READY 0x00000021
78 #define CR_NEED_RESTART 0x00000022
79 #define CR_NO_MORE_HW_PROFILES 0x00000023
80 #define CR_DEVICE_NOT_THERE 0x00000024
81 #define CR_NO_SUCH_VALUE 0x00000025
82 #define CR_WRONG_TYPE 0x00000026
83 #define CR_INVALID_PRIORITY 0x00000027
84 #define CR_NOT_DISABLEABLE 0x00000028
85 #define CR_FREE_RESOURCES 0x00000029
86 #define CR_QUERY_VETOED 0x0000002A
87 #define CR_CANT_SHARE_IRQ 0x0000002B
88 #define CR_NO_DEPENDENT 0x0000002C
89 #define CR_SAME_RESOURCES 0x0000002D
90 #define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
91 #define CR_INVALID_MACHINENAME 0x0000002F
92 #define CR_REMOTE_COMM_FAILURE 0x00000030
93 #define CR_MACHINE_UNAVAILABLE 0x00000031
94 #define CR_NO_CM_SERVICES 0x00000032
95 #define CR_ACCESS_DENIED 0x00000033
96 #define CR_CALL_NOT_IMPLEMENTED 0x00000034
97 #define CR_INVALID_PROPERTY 0x00000035
98 #define CR_DEVICE_INTERFACE_ACTIVE 0x00000036
99 #define CR_NO_SUCH_DEVICE_INTERFACE 0x00000037
100 #define CR_INVALID_REFERENCE_STRING 0x00000038
101 #define CR_INVALID_CONFLICT_LIST 0x00000039
102 #define CR_INVALID_INDEX 0x0000003A
103 #define CR_INVALID_STRUCTURE_SIZE 0x0000003B
104
105 #define RegDisposition_OpenAlways 0x00000000
106 #define RegDisposition_OpenExisting 0x00000001
107 #define RegDisposition_Bits 0x00000001
108
109
110 typedef DWORD RETURN_TYPE;
111 typedef RETURN_TYPE CONFIGRET;
112
113 typedef HANDLE HMACHINE;
114 typedef HMACHINE *PHMACHINE;
115
116 typedef DWORD_PTR RES_DES;
117 typedef RES_DES *PRES_DES;
118
119 typedef DWORD_PTR RANGE_ELEMENT;
120 typedef RANGE_ELEMENT *PRANGE_ELEMENT;
121
122 typedef ULONG_PTR CONFLICT_LIST;
123 typedef CONFLICT_LIST *PCONFLICT_LIST;
124
125 typedef DWORD_PTR LOG_CONF;
126 typedef LOG_CONF *PLOG_CONF;
127
128 typedef ULONG PRIORITY;
129 typedef PRIORITY *PPRIORITY;
130
131 typedef DWORD_PTR RANGE_LIST;
132 typedef RANGE_LIST *PRANGE_LIST;
133
134 typedef DWORD DEVNODE, DEVINST;
135 typedef DEVNODE *PDEVNODE, *PDEVINST;
136
137 typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
138 typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
139
140 #ifdef UNICODE
141 typedef DEVNODEID_W DEVNODEID;
142 typedef DEVINSTID_W DEVINSTID;
143 #else
144 typedef DEVNODEID_A DEVNODEID;
145 typedef DEVINSTID_A DEVINSTID;
146 #endif
147
148 typedef ULONG REGDISPOSITION;
149
150 typedef ULONG RESOURCEID;
151 typedef RESOURCEID *PRESOURCEID;
152
153 #define CM_RESDES_WIDTH_DEFAULT 0x00000000
154 #define CM_RESDES_WIDTH_32 0x00000001
155 #define CM_RESDES_WIDTH_64 0x00000002
156 #define CM_RESDES_WIDTH_BITS 0x00000003
157
158
159 #define MAX_CONFIG_VALUE 9999
160 #define MAX_INSTANCE_VALUE 9999
161
162 #define MAX_DEVICE_ID_LEN 200
163 #define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
164
165 #define MAX_CLASS_NAME_LEN 32
166 #define MAX_GUID_STRING_LEN 39
167 #define MAX_PROFILE_LEN 80
168
169
170 #define ResType_All 0x00000000
171 #define ResType_None 0x00000000
172 #define ResType_Mem 0x00000001
173 #define ResType_IO 0x00000002
174 #define ResType_DMA 0x00000003
175 #define ResType_IRQ 0x00000004
176 #define ResType_DoNotUse 0x00000005
177 #define ResType_BusNumber 0x00000006
178 #define ResType_MAX 0x00000006
179 #define ResType_Ignored_Bit 0x00008000
180 #define ResType_ClassSpecific 0x0000FFFF
181 #define ResType_Reserved 0x00008000
182 #define ResType_DevicePrivate 0x00008001
183 #define ResType_PcCardConfig 0x00008002
184 #define ResType_MfCardConfig 0x00008003
185
186 #define CM_GETIDLIST_FILTER_NONE 0x00000000
187 #define CM_GETIDLIST_FILTER_ENUMERATOR 0x00000001
188 #define CM_GETIDLIST_FILTER_SERVICE 0x00000002
189 #define CM_GETIDLIST_FILTER_EJECTRELATIONS 0x00000004
190 #define CM_GETIDLIST_FILTER_REMOVALRELATIONS 0x00000008
191 #define CM_GETIDLIST_FILTER_POWERRELATIONS 0x00000010
192 #define CM_GETIDLIST_FILTER_BUSRELATIONS 0x00000020
193 #define CM_GETIDLIST_DONOTGENERATE 0x10000040
194 #define CM_GETIDLIST_FILTER_BITS 0x1000007F
195
196 #define CM_GET_DEVICE_INTERFACE_LIST_PRESENT 0x00000000
197 #define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES 0x00000001
198 #define CM_GET_DEVICE_INTERFACE_LIST_BITS 0x00000001
199
200 #define CM_DRP_DEVICEDESC 0x00000001
201 #define CM_DRP_HARDWAREID 0x00000002
202 #define CM_DRP_COMPATIBLEIDS 0x00000003
203 #define CM_DRP_UNUSED0 0x00000004
204 #define CM_DRP_SERVICE 0x00000005
205 #define CM_DRP_UNUSED1 0x00000006
206 #define CM_DRP_UNUSED2 0x00000007
207 #define CM_DRP_CLASS 0x00000008
208 #define CM_DRP_CLASSGUID 0x00000009
209 #define CM_DRP_DRIVER 0x0000000A
210 #define CM_DRP_CONFIGFLAGS 0x0000000B
211 #define CM_DRP_MFG 0x0000000C
212 #define CM_DRP_FRIENDLYNAME 0x0000000D
213 #define CM_DRP_LOCATION_INFORMATION 0x0000000E
214 #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F
215 #define CM_DRP_CAPABILITIES 0x00000010
216 #define CM_DRP_UI_NUMBER 0x00000011
217 #define CM_DRP_UPPERFILTERS 0x00000012
218 #define CM_DRP_LOWERFILTERS 0x00000013
219 #define CM_DRP_BUSTYPEGUID 0x00000014
220 #define CM_DRP_LEGACYBUSTYPE 0x00000015
221 #define CM_DRP_BUSNUMBER 0x00000016
222 #define CM_DRP_ENUMERATOR_NAME 0x00000017
223
224 #define CM_DRP_MIN 0x00000001
225 #define CM_DRP_MAX 0x00000017
226
227 #define CM_REGISTRY_HARDWARE 0x00000000
228 #define CM_REGISTRY_SOFTWARE 0x00000001
229 #define CM_REGISTRY_USER 0x00000100
230 #define CM_REGISTRY_CONFIG 0x00000200
231 #define CM_REGISTRY_BITS 0x00000301
232
233 #define CM_DEVCAP_LOCKSUPPORTED 0x00000001
234 #define CM_DEVCAP_EJECTSUPPORTED 0x00000002
235 #define CM_DEVCAP_REMOVABLE 0x00000004
236 #define CM_DEVCAP_DOCKDEVICE 0x00000008
237 #define CM_DEVCAP_UNIQUEID 0x00000010
238 #define CM_DEVCAP_SILENTINSTALL 0x00000020
239 #define CM_DEVCAP_RAWDEVICEOK 0x00000040
240 #define CM_DEVCAP_SURPRISEREMOVALOK 0x00000080
241 #define CM_DEVCAP_HARDWAREDISABLED 0x00000100
242 #define CM_DEVCAP_NONDYNAMIC 0x00000200
243
244 typedef struct BusNumber_Des_s {
245 DWORD BUSD_Count;
246 DWORD BUSD_Type;
247 DWORD BUSD_Flags;
248 ULONG BUSD_Alloc_Base;
249 ULONG BUSD_Alloc_End;
250 } BUSNUMBER_DES, *PBUSNUMBER_DES;
251
252 typedef struct BusNumber_Range_s {
253 ULONG BUSR_Min;
254 ULONG BUSR_Max;
255 ULONG BUSR_nBusNumbers;
256 ULONG BUSR_Flags;
257 } BUSNUMBER_RANGE, *PBUSNUMBER_RANGE;
258
259 #define BusNumberType_Range sizeof(BUSNUMBER_RANGE)
260
261 typedef struct BusNumber_Resource_s {
262 BUSNUMBER_DES BusNumber_Header;
263 BUSNUMBER_RANGE BusNumber_Data[ANYSIZE_ARRAY];
264 } BUSNUMBER_RESOURCE, *PBUSNUMBER_RESOURCE;
265
266 typedef struct CS_Des_s {
267 DWORD CSD_SignatureLength;
268 DWORD CSD_LegacyDataOffset;
269 DWORD CSD_LegacyDataSize;
270 DWORD CSD_Flags;
271 GUID CSD_ClassGuid;
272 BYTE CSD_Signature[ANYSIZE_ARRAY];
273 } CS_DES, *PCS_DES;
274
275 typedef struct CS_Resource_s {
276 CS_DES CS_Header;
277 } CS_RESOURCE, *PCS_RESOURCE;
278
279 typedef struct DevPrivate_Des_s {
280 DWORD PD_Count;
281 DWORD PD_Type;
282 DWORD PD_Data1;
283 DWORD PD_Data2;
284 DWORD PD_Data3;
285 DWORD PD_Flags;
286 } DEVPRIVATE_DES, *PDEVPRIVATE_DES;
287
288 typedef struct DevPrivate_Range_s {
289 DWORD PR_Data1;
290 DWORD PR_Data2;
291 DWORD PR_Data3;
292 } DEVPRIVATE_RANGE, *PDEVPRIVATE_RANGE;
293
294 #define PType_Range sizeof(DEVPRIVATE_RANGE)
295
296 typedef struct DevPrivate_Resource_s {
297 DEVPRIVATE_DES PRV_Header;
298 DEVPRIVATE_RANGE PRV_Data[ANYSIZE_ARRAY];
299 } DEVPRIVATE_RESOURCE, *PDEVPRIVATE_RESOURCE;
300
301 /* DMA_DES.DD_Flags constants and masks */
302 #define mDD_Width 0x3
303 #define fDD_BYTE 0x0
304 #define fDD_WORD 0x1
305 #define fDD_DWORD 0x2
306 #define fDD_BYTE_AND_WORD 0x3
307
308 #define mDD_BusMaster 0x4
309 #define fDD_NoBusMaster 0x0
310 #define fDD_BusMaster 0x4
311
312 #define mDD_Type 0x18
313 #define fDD_TypeStandard 0x00
314 #define fDD_TypeA 0x08
315 #define fDD_TypeB 0x10
316 #define fDD_TypeF 0x18
317
318 typedef struct DMA_Des_s {
319 DWORD DD_Count;
320 DWORD DD_Type;
321 DWORD DD_Flags;
322 ULONG DD_Alloc_Chan;
323 } DMA_DES, *PDMA_DES;
324
325 typedef struct DMA_Range_s {
326 ULONG DR_Min;
327 ULONG DR_Max;
328 ULONG DR_Flags;
329 } DMA_RANGE, *PDMA_RANGE;
330
331 #define DType_Range sizeof(DMA_RANGE)
332
333 typedef struct DMA_Resource_s {
334 DMA_DES DMA_Header;
335 DMA_RANGE DMA_Data[ANYSIZE_ARRAY];
336 } DMA_RESOURCE, *PDMA_RESOURCE;
337
338 /* IO_DES.Type constants and masks */
339 #define fIOD_PortType 0x1
340 #define fIOD_Memory 0x0
341 #define fIOD_IO 0x1
342 #define fIOD_DECODE 0x00fc
343 #define fIOD_10_BIT_DECODE 0x0004
344 #define fIOD_12_BIT_DECODE 0x0008
345 #define fIOD_16_BIT_DECODE 0x0010
346 #define fIOD_POSITIVE_DECODE 0x0020
347 #define fIOD_PASSIVE_DECODE 0x0040
348 #define fIOD_WINDOW_DECODE 0x0080
349
350 typedef struct IO_Des_s {
351 DWORD IOD_Count;
352 DWORD IOD_Type;
353 DWORDLONG IOD_Alloc_Base;
354 DWORDLONG IOD_Alloc_End;
355 DWORD IOD_DesFlags;
356 } IO_DES, *PIO_DES;
357
358 /* IO_RANGE.IOR_Alias constants */
359 #define IO_ALIAS_10_BIT_DECODE 0x00000004
360 #define IO_ALIAS_12_BIT_DECODE 0x00000010
361 #define IO_ALIAS_16_BIT_DECODE 0x00000000
362 #define IO_ALIAS_POSITIVE_DECODE 0x000000FF
363
364 typedef struct IO_Range_s {
365 DWORDLONG IOR_Align;
366 DWORD IOR_nPorts;
367 DWORDLONG IOR_Min;
368 DWORDLONG IOR_Max;
369 DWORD IOR_RangeFlags;
370 DWORDLONG IOR_Alias;
371 } IO_RANGE, *PIO_RANGE;
372
373 #define IOType_Range sizeof(IO_RANGE)
374
375 typedef struct IO_Resource_s {
376 IO_DES IO_Header;
377 IO_RANGE IO_Data[ANYSIZE_ARRAY];
378 } IO_RESOURCE, *PIO_RESOURCE;
379
380 /* IRQ_DES.IRQD_flags constants */
381 #define mIRQD_Share 0x1
382 #define fIRQD_Exclusive 0x0
383 #define fIRQD_Share 0x1
384
385 #define fIRQD_Share_Bit 0
386 #define fIRQD_Level_Bit 1
387
388 #define mIRQD_Edge_Level 0x2
389 #define fIRQD_Level 0x0
390 #define fIRQD_Edge 0x2
391
392 typedef struct IRQ_Des_32_s {
393 DWORD IRQD_Count;
394 DWORD IRQD_Type;
395 DWORD IRQD_Flags;
396 ULONG IRQD_Alloc_Num;
397 ULONG32 IRQD_Affinity;
398 } IRQ_DES_32, *PIRQ_DES_32;
399
400 typedef struct IRQ_Des_64_s {
401 DWORD IRQD_Count;
402 DWORD IRQD_Type;
403 DWORD IRQD_Flags;
404 ULONG IRQD_Alloc_Num;
405 ULONG64 IRQD_Affinity;
406 } IRQ_DES_64, *PIRQ_DES_64;
407
408 #ifdef _WIN64
409 typedef IRQ_DES_64 IRQ_DES;
410 typedef PIRQ_DES_64 PIRQ_DES;
411 #else
412 typedef IRQ_DES_32 IRQ_DES;
413 typedef PIRQ_DES_32 PIRQ_DES;
414 #endif
415
416 typedef struct IRQ_Range_s {
417 ULONG IRQR_Min;
418 ULONG IRQR_Max;
419 ULONG IRQR_Flags;
420 } IRQ_RANGE, *PIRQ_RANGE;
421
422 #define IRQType_Range sizeof(IRQ_RANGE)
423
424 typedef struct IRQ_Resource_s {
425 IRQ_DES IRQ_Header;
426 IRQ_RANGE IRQ_Data[ANYSIZE_ARRAY];
427 } IRQ_RESOURCE, *PIRQ_RESOURCE;
428
429 /* MEM_DES.MD_Flags constants */
430 #define mMD_MemoryType 0x1
431 #define fMD_MemoryType mMD_MemoryType
432 #define fMD_ROM 0x0
433 #define fMD_RAM 0x1
434
435 #define mMD_32_24 0x2
436 #define fMD_32_24 mMD_32_24
437 #define fMD_24 0x0
438 #define fMD_32 0x2
439
440 #define mMD_Prefetchable 0x4
441 #define fMD_Prefetchable mMD_Prefetchable
442 #define fMD_Pref mMD_Prefetchable
443 #define fMD_PrefetchDisallowed 0x0
444 #define fMD_PrefetchAllowed 0x4
445
446 #define mMD_Readable 0x8
447 #define fMD_Readable mMD_Readable
448 #define fMD_ReadAllowed 0x0
449 #define fMD_ReadDisallowed 0x8
450
451 #define mMD_CombinedWrite 0x10
452 #define fMD_CombinedWrite mMD_CombinedWrite
453 #define fMD_CombinedWriteDisallowed 0x0
454 #define fMD_CombinedWriteAllowed 0x10
455
456 #define mMD_Cacheable 0x20
457 #define fMD_NonCacheable 0x0
458 #define fMD_Cacheable 0x20
459
460 typedef struct Mem_Des_s {
461 DWORD MD_Count;
462 DWORD MD_Type;
463 DWORDLONG MD_Alloc_Base;
464 DWORDLONG MD_Alloc_End;
465 DWORD MD_Flags;
466 DWORD MD_Reserved;
467 } MEM_DES, *PMEM_DES;
468
469 typedef struct Mem_Range_s {
470 DWORDLONG MR_Align;
471 ULONG MR_nBytes;
472 DWORDLONG MR_Min;
473 DWORDLONG MR_Max;
474 DWORD MR_Flags;
475 DWORD MR_Reserved;
476 } MEM_RANGE, *PMEM_RANGE;
477
478 #define MType_Range sizeof(MEM_RANGE)
479
480 typedef struct Mem_Resource_s {
481 MEM_DES MEM_Header;
482 MEM_RANGE MEM_Data[ANYSIZE_ARRAY];
483 } MEM_RESOURCE, *PMEM_RESOURCE;
484
485 /* MFCARD_DES.PMF_Flags constants */
486 #define fPMF_AUDIO_ENABLE 0x8
487 #define mPMF_AUDIO_ENABLE fPMF_AUDIO_ENABLE
488
489 typedef struct MfCard_Des_s {
490 DWORD PMF_Count;
491 DWORD PMF_Type;
492 DWORD PMF_Flags;
493 BYTE PMF_ConfigOptions;
494 BYTE PMF_IoResourceIndex;
495 BYTE PMF_Reserved[2];
496 DWORD PMF_ConfigRegisterBase;
497 } MFCARD_DES, *PMFCARD_DES;
498
499 typedef struct MfCard_Resource_s {
500 MFCARD_DES MfCard_Header;
501 } MFCARD_RESOURCE, *PMFCARD_RESOURCE;
502
503 /* PCCARD_DES.PCD_Flags constants */
504
505 typedef struct PcCard_Des_s {
506 DWORD PCD_Count;
507 DWORD PCD_Type;
508 DWORD PCD_Flags;
509 BYTE PCD_ConfigIndex;
510 BYTE PCD_Reserved[3];
511 DWORD PCD_MemoryCardBase1;
512 DWORD PCD_MemoryCardBase2;
513 } PCCARD_DES, *PPCCARD_DES;
514
515 #define mPCD_IO_8_16 0x1
516 #define fPCD_IO_8 0x0
517 #define fPCD_IO_16 0x1
518 #define mPCD_MEM_8_16 0x2
519 #define fPCD_MEM_8 0x0
520 #define fPCD_MEM_16 0x2
521 #define mPCD_MEM_A_C 0xC
522 #define fPCD_MEM1_A 0x4
523 #define fPCD_MEM2_A 0x8
524 #define fPCD_IO_ZW_8 0x10
525 #define fPCD_IO_SRC_16 0x20
526 #define fPCD_IO_WS_16 0x40
527 #define mPCD_MEM_WS 0x300
528 #define fPCD_MEM_WS_ONE 0x100
529 #define fPCD_MEM_WS_TWO 0x200
530 #define fPCD_MEM_WS_THREE 0x300
531
532 #define fPCD_MEM_A 0x4
533
534 #define fPCD_ATTRIBUTES_PER_WINDOW 0x8000
535
536 #define fPCD_IO1_16 0x00010000
537 #define fPCD_IO1_ZW_8 0x00020000
538 #define fPCD_IO1_SRC_16 0x00040000
539 #define fPCD_IO1_WS_16 0x00080000
540
541 #define fPCD_IO2_16 0x00100000
542 #define fPCD_IO2_ZW_8 0x00200000
543 #define fPCD_IO2_SRC_16 0x00400000
544 #define fPCD_IO2_WS_16 0x00800000
545
546 #define mPCD_MEM1_WS 0x03000000
547 #define fPCD_MEM1_WS_ONE 0x01000000
548 #define fPCD_MEM1_WS_TWO 0x02000000
549 #define fPCD_MEM1_WS_THREE 0x03000000
550 #define fPCD_MEM1_16 0x04000000
551
552 #define mPCD_MEM2_WS 0x30000000
553 #define fPCD_MEM2_WS_ONE 0x10000000
554 #define fPCD_MEM2_WS_TWO 0x20000000
555 #define fPCD_MEM2_WS_THREE 0x30000000
556 #define fPCD_MEM2_16 0x40000000
557
558 #define PCD_MAX_MEMORY 2
559 #define PCD_MAX_IO 2
560
561 typedef struct PcCard_Resource_s {
562 PCCARD_DES PcCard_Header;
563 } PCCARD_RESOURCE, *PPCCARD_RESOURCE;
564
565
566 /* CONFLICT_DETAILS.CD.ulMask constants */
567 #define CM_CDMASK_DEVINST 0x00000001
568 #define CM_CDMASK_RESDES 0x00000002
569 #define CM_CDMASK_FLAGS 0x00000004
570 #define CM_CDMASK_DESCRIPTION 0x00000008
571 #define CM_CDMASK_VALID 0x0000000F
572
573 /* CONFLICT_DETAILS.CD.ulFlags constants */
574 #define CM_CDFLAGS_DRIVER 0x00000001
575 #define CM_CDFLAGS_ROOT_OWNED 0x00000002
576 #define CM_CDFLAGS_RESERVED 0x00000004
577
578 typedef struct _CONFLICT_DETAILS_A {
579 ULONG CD_ulSize;
580 ULONG CD_ulMask;
581 DEVINST CD_dnDevInst;
582 RES_DES CD_rdResDes;
583 ULONG CD_ulFlags;
584 CHAR CD_szDescription[MAX_PATH];
585 } CONFLICT_DETAILS_A , *PCONFLICT_DETAILS_A;
586
587 typedef struct _CONFLICT_DETAILS_W {
588 ULONG CD_ulSize;
589 ULONG CD_ulMask;
590 DEVINST CD_dnDevInst;
591 RES_DES CD_rdResDes;
592 ULONG CD_ulFlags;
593 WCHAR CD_szDescription[MAX_PATH];
594 } CONFLICT_DETAILS_W , *PCONFLICT_DETAILS_W;
595
596 #ifdef UNICODE
597 typedef CONFLICT_DETAILS_W CONFLICT_DETAILS;
598 typedef PCONFLICT_DETAILS_W PCONFLICT_DETAILS;
599 #else
600 typedef CONFLICT_DETAILS_A CONFLICT_DETAILS;
601 typedef PCONFLICT_DETAILS_A PCONFLICT_DETAILS;
602 #endif
603
604
605 #define CMP_MAGIC 0x01234567
606
607
608 CMAPI
609 CONFIGRET
610 WINAPI
611 CMP_Init_Detection(
612 IN DWORD dwMagic);
613
614 CMAPI
615 CONFIGRET
616 WINAPI
617 CMP_RegisterNotification(
618 IN HANDLE hRecipient,
619 IN LPVOID lpvNotificationFilter,
620 IN DWORD dwFlags,
621 OUT PULONG pluhDevNotify);
622
623 CMAPI
624 CONFIGRET
625 WINAPI
626 CMP_Report_LogOn(
627 IN DWORD dwMagic,
628 IN DWORD dwProcessId);
629
630 CMAPI
631 CONFIGRET
632 WINAPI
633 CMP_UnregisterNotification(IN ULONG luhDevNotify);
634
635 /* FIXME: Missing CMP_WaitNoPendingInstallEvents */
636 /* FIXME: Missing CMP_WaitServicesAvailable */
637
638 /* CM_Add_Empty_Log_Conf.ulFlags constants */
639 #define BASIC_LOG_CONF 0x00000000
640 #define FILTERED_LOG_CONF 0x00000001
641 #define ALLOC_LOG_CONF 0x00000002
642 #define BOOT_LOG_CONF 0x00000003
643 #define FORCED_LOG_CONF 0x00000004
644 #define OVERRIDE_LOG_CONF 0x00000005
645 #define NUM_LOG_CONF 0x00000006
646 #define LOG_CONF_BITS 0x00000007
647
648 #define PRIORITY_EQUAL_FIRST 0x00000008
649 #define PRIORITY_EQUAL_LAST 0x00000000
650 #define PRIORITY_BIT 0x00000008
651
652 CMAPI
653 CONFIGRET
654 WINAPI
655 CM_Add_Empty_Log_Conf(
656 OUT PLOG_CONF plcLogConf,
657 IN DEVINST dnDevInst,
658 IN PRIORITY Priority,
659 IN ULONG ulFlags);
660
661 CMAPI
662 CONFIGRET
663 WINAPI
664 CM_Add_Empty_Log_Conf_Ex(
665 OUT PLOG_CONF plcLogConf,
666 IN DEVINST dnDevInst,
667 IN PRIORITY Priority,
668 IN ULONG ulFlags,
669 IN HMACHINE hMachine);
670
671 /* CM_Add_ID.ulFlags constants */
672 #define CM_ADD_ID_HARDWARE 0x00000000
673 #define CM_ADD_ID_COMPATIBLE 0x00000001
674 #define CM_ADD_ID_BITS 0x00000001
675
676 CMAPI
677 CONFIGRET
678 WINAPI
679 CM_Add_IDA(
680 IN DEVINST dnDevInst,
681 IN PSTR pszID,
682 IN ULONG ulFlags);
683
684 CMAPI
685 CONFIGRET
686 WINAPI
687 CM_Add_ID_ExA(
688 IN DEVINST dnDevInst,
689 IN PSTR pszID,
690 IN ULONG ulFlags,
691 IN HMACHINE hMachine);
692
693 CMAPI
694 CONFIGRET
695 WINAPI
696 CM_Add_ID_ExW(
697 IN DEVINST dnDevInst,
698 IN PWSTR pszID,
699 IN ULONG ulFlags,
700 IN HMACHINE hMachine);
701
702 CMAPI
703 CONFIGRET
704 WINAPI
705 CM_Add_IDW(
706 IN DEVINST dnDevInst,
707 IN PWSTR pszID,
708 IN ULONG ulFlags);
709
710 #ifdef UNICODE
711 #define CM_Add_ID CM_Add_IDW
712 #define CM_Add_ID_Ex CM_Add_ID_ExW
713 #else
714 #define CM_Add_ID CM_Add_IDA
715 #define CM_Add_ID_Ex CM_Add_ID_ExA
716 #endif /* UNICODE */
717
718 /* FIXME: Obsolete CM_Add_Range */
719
720 CMAPI
721 CONFIGRET
722 WINAPI
723 CM_Add_Res_Des(
724 OUT PRES_DES prdResDes,
725 IN LOG_CONF lcLogConf,
726 IN RESOURCEID ResourceID,
727 IN PCVOID ResourceData,
728 IN ULONG ResourceLen,
729 IN ULONG ulFlags);
730
731 CMAPI
732 CONFIGRET
733 WINAPI
734 CM_Add_Res_Des_Ex(
735 OUT PRES_DES prdResDes,
736 IN LOG_CONF lcLogConf,
737 IN RESOURCEID ResourceID,
738 IN PCVOID ResourceData,
739 IN ULONG ResourceLen,
740 IN ULONG ulFlags,
741 IN HMACHINE hMachine);
742
743 CMAPI
744 CONFIGRET
745 WINAPI
746 CM_Connect_MachineA(
747 IN PCSTR UNCServerName,
748 OUT PHMACHINE phMachine);
749
750 CMAPI
751 CONFIGRET
752 WINAPI
753 CM_Connect_MachineW(
754 IN PCWSTR UNCServerName,
755 OUT PHMACHINE phMachine);
756
757 #ifdef UNICODE
758 #define CM_Connect_Machine CM_Connect_MachineW
759 #else
760 #define CM_Connect_Machine CM_Connect_MachineA
761 #endif /* UNICODE */
762
763 /* Flags for CM_Create_DevNode[_Ex].ulFlags constants */
764 #define CM_CREATE_DEVNODE_NORMAL 0x00000000
765 #define CM_CREATE_DEVNODE_NO_WAIT_INSTALL 0x00000001
766 #define CM_CREATE_DEVNODE_PHANTOM 0x00000002
767 #define CM_CREATE_DEVNODE_GENERATE_ID 0x00000004
768 #define CM_CREATE_DEVNODE_DO_NOT_INSTALL 0x00000008
769 #define CM_CREATE_DEVNODE_BITS 0x0000000F
770
771 #define CM_CREATE_DEVINST_NORMAL CM_CREATE_DEVNODE_NORMAL
772 #define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
773 #define CM_CREATE_DEVINST_PHANTOM CM_CREATE_DEVNODE_PHANTOM
774 #define CM_CREATE_DEVINST_GENERATE_ID CM_CREATE_DEVNODE_GENERATE_ID
775 #define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
776 #define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
777
778 CMAPI
779 CONFIGRET
780 WINAPI
781 CM_Create_DevNodeA(
782 OUT PDEVINST pdnDevInst,
783 IN DEVINSTID_A pDeviceID,
784 IN DEVINST dnParent,
785 IN ULONG ulFlags);
786
787 CMAPI
788 CONFIGRET
789 WINAPI
790 CM_Create_DevNodeW(
791 OUT PDEVINST pdnDevInst,
792 IN DEVINSTID_W pDeviceID,
793 IN DEVINST dnParent,
794 IN ULONG ulFlags);
795
796 CMAPI
797 CONFIGRET
798 WINAPI
799 CM_Create_DevNode_ExA(
800 OUT PDEVINST pdnDevInst,
801 IN DEVINSTID_A pDeviceID,
802 IN DEVINST dnParent,
803 IN ULONG ulFlags,
804 IN HANDLE hMachine);
805
806 CMAPI
807 CONFIGRET
808 WINAPI
809 CM_Create_DevNode_ExW(
810 OUT PDEVINST pdnDevInst,
811 IN DEVINSTID_W pDeviceID,
812 IN DEVINST dnParent,
813 IN ULONG ulFlags,
814 IN HANDLE hMachine);
815
816 #define CM_Create_DevInstW CM_Create_DevNodeW
817 #define CM_Create_DevInstA CM_Create_DevNodeA
818 #define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
819 #define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
820 #ifdef UNICODE
821 #define CM_Create_DevNode CM_Create_DevNodeW
822 #define CM_Create_DevInst CM_Create_DevNodeW
823 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
824 #define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
825 #else
826 #define CM_Create_DevNode CM_Create_DevNodeA
827 #define CM_Create_DevInst CM_Create_DevNodeA
828 #define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
829 #define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
830 #endif /* UNICODE */
831
832 /* FIXME: Obsolete CM_Create_Range_List */
833
834 /* Flags for CM_Delete_Class_Key.ulFlags constants */
835 #define CM_DELETE_CLASS_ONLY 0x00000000
836 #define CM_DELETE_CLASS_SUBKEYS 0x00000001
837 #define CM_DELETE_CLASS_BITS 0x00000001
838
839 CMAPI
840 CONFIGRET
841 WINAPI
842 CM_Delete_Class_Key(
843 IN LPGUID ClassGuid,
844 IN ULONG ulFlags);
845
846 CMAPI
847 CONFIGRET
848 WINAPI
849 CM_Delete_Class_Key_Ex(
850 IN LPGUID ClassGuid,
851 IN ULONG ulFlags,
852 IN HANDLE hMachine);
853
854 CMAPI
855 CONFIGRET
856 WINAPI
857 CM_Delete_DevNode_Key(
858 IN DEVNODE dnDevNode,
859 IN ULONG ulHardwareProfile,
860 IN ULONG ulFlags);
861
862 CMAPI
863 CONFIGRET
864 WINAPI
865 CM_Delete_DevNode_Key_Ex(
866 IN DEVNODE dnDevNode,
867 IN ULONG ulHardwareProfile,
868 IN ULONG ulFlags,
869 IN HANDLE hMachine);
870
871 #define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
872 #define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
873
874 /* FIXME: Obsolete CM_Delete_Range */
875 /* FIXME: Obsolete CM_Detected_Resource_Conflict */
876 /* FIXME: Obsolete CM_Detected_Resource_Conflict_Ex */
877
878 CMAPI
879 CONFIGRET
880 WINAPI
881 CM_Disable_DevNode(
882 IN DEVINST dnDevInst,
883 IN ULONG ulFlags);
884
885 CMAPI
886 CONFIGRET
887 WINAPI
888 CM_Disable_DevNode_Ex(
889 IN DEVINST dnDevInst,
890 IN ULONG ulFlags,
891 IN HMACHINE hMachine);
892
893 #define CM_Disable_DevInst CM_Disable_DevNode
894 #define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
895
896 CMAPI
897 CONFIGRET
898 WINAPI
899 CM_Disconnect_Machine(
900 IN HMACHINE hMachine);
901
902 CMAPI
903 CONFIGRET
904 WINAPI
905 CM_Enable_DevNode(
906 IN DEVINST dnDevInst,
907 IN ULONG ulFlags);
908
909 CMAPI
910 CONFIGRET
911 WINAPI
912 CM_Enable_DevNode_Ex(
913 IN DEVINST dnDevInst,
914 IN ULONG ulFlags,
915 IN HMACHINE hMachine);
916
917 #define CM_Enable_DevInst CM_Enable_DevNode
918 #define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
919
920 CMAPI
921 CONFIGRET
922 WINAPI
923 CM_Enumerate_Classes(
924 IN ULONG ulClassIndex,
925 OUT LPGUID ClassGuid,
926 IN ULONG ulFlags);
927
928 CMAPI
929 CONFIGRET
930 WINAPI
931 CM_Enumerate_Classes_Ex(
932 IN ULONG ulClassIndex,
933 OUT LPGUID ClassGuid,
934 IN ULONG ulFlags,
935 IN HMACHINE hMachine);
936
937 CMAPI
938 CONFIGRET
939 WINAPI
940 CM_Enumerate_EnumeratorsA(
941 IN ULONG ulEnumIndex,
942 OUT PCHAR Buffer,
943 IN OUT PULONG pulLength,
944 IN ULONG ulFlags);
945
946 CMAPI
947 CONFIGRET
948 WINAPI
949 CM_Enumerate_Enumerators_ExA(
950 IN ULONG ulEnumIndex,
951 OUT PCHAR Buffer,
952 IN OUT PULONG pulLength,
953 IN ULONG ulFlags,
954 IN HMACHINE hMachine);
955
956 CMAPI
957 CONFIGRET
958 WINAPI
959 CM_Enumerate_Enumerators_ExW(
960 IN ULONG ulEnumIndex,
961 OUT PWCHAR Buffer,
962 IN OUT PULONG pulLength,
963 IN ULONG ulFlags,
964 IN HMACHINE hMachine);
965
966 CMAPI
967 CONFIGRET
968 WINAPI
969 CM_Enumerate_EnumeratorsW(
970 IN ULONG ulEnumIndex,
971 OUT PWCHAR Buffer,
972 IN OUT PULONG pulLength,
973 IN ULONG ulFlags);
974
975 #ifdef UNICODE
976 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
977 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
978 #else
979 #define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
980 #define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
981 #endif /* UNICODE */
982
983 /* FIXME: Obsolete CM_Find_Range */
984 /* FIXME: Obsolete CM_First_Range */
985
986 CMAPI
987 CONFIGRET
988 WINAPI
989 CM_Free_Log_Conf(
990 IN LOG_CONF lcLogConfToBeFreed,
991 IN ULONG ulFlags);
992
993 CMAPI
994 CONFIGRET
995 WINAPI
996 CM_Free_Log_Conf_Ex(
997 IN LOG_CONF lcLogConfToBeFreed,
998 IN ULONG ulFlags,
999 IN HMACHINE hMachine);
1000
1001 CMAPI
1002 CONFIGRET
1003 WINAPI
1004 CM_Free_Log_Conf_Handle(
1005 IN LOG_CONF lcLogConf);
1006
1007 /* FIXME: Obsolete CM_Free_Range_List */
1008
1009 CMAPI
1010 CONFIGRET
1011 WINAPI
1012 CM_Free_Res_Des(
1013 OUT PRES_DES prdResDes,
1014 IN RES_DES rdResDes,
1015 IN ULONG ulFlags);
1016
1017 CMAPI
1018 CONFIGRET
1019 WINAPI
1020 CM_Free_Res_Des_Ex(
1021 OUT PRES_DES prdResDes,
1022 IN RES_DES rdResDes,
1023 IN ULONG ulFlags,
1024 IN HMACHINE hMachine);
1025
1026 CMAPI
1027 CONFIGRET
1028 WINAPI
1029 CM_Free_Res_Des_Handle(
1030 IN RES_DES rdResDes);
1031
1032 CMAPI
1033 CONFIGRET
1034 WINAPI
1035 CM_Free_Resource_Conflict_Handle(
1036 IN CONFLICT_LIST clConflictList);
1037
1038 CMAPI
1039 CONFIGRET
1040 WINAPI
1041 CM_Get_Child(
1042 OUT PDEVINST pdnDevInst,
1043 IN DEVINST dnDevInst,
1044 IN ULONG ulFlags);
1045
1046 CMAPI
1047 CONFIGRET
1048 WINAPI
1049 CM_Get_Child_Ex(
1050 OUT PDEVINST pdnDevInst,
1051 IN DEVINST dnDevInst,
1052 IN ULONG ulFlags,
1053 IN HMACHINE hMachine);
1054
1055 CMAPI
1056 CONFIGRET
1057 WINAPI
1058 CM_Get_Class_NameA(
1059 IN LPGUID ClassGuid,
1060 OUT PCHAR Buffer,
1061 IN OUT PULONG pulLength,
1062 IN ULONG ulFlags);
1063
1064 CMAPI
1065 CONFIGRET
1066 WINAPI
1067 CM_Get_Class_NameW(
1068 IN LPGUID ClassGuid,
1069 OUT PWCHAR Buffer,
1070 IN OUT PULONG pulLength,
1071 IN ULONG ulFlags);
1072
1073 CMAPI
1074 CONFIGRET
1075 WINAPI
1076 CM_Get_Class_Name_ExA(
1077 IN LPGUID ClassGuid,
1078 OUT PCHAR Buffer,
1079 IN OUT PULONG pulLength,
1080 IN ULONG ulFlags,
1081 IN HMACHINE hMachine);
1082
1083 CMAPI
1084 CONFIGRET
1085 WINAPI
1086 CM_Get_Class_Name_ExW(
1087 IN LPGUID ClassGuid,
1088 OUT PWCHAR Buffer,
1089 IN OUT PULONG pulLength,
1090 IN ULONG ulFlags,
1091 IN HMACHINE hMachine);
1092
1093 #ifdef UNICODE
1094 #define CM_Get_Class_Name CM_Get_Class_NameW
1095 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
1096 #else
1097 #define CM_Get_Class_Name CM_Get_Class_NameA
1098 #define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
1099 #endif /* UNICODE */
1100
1101 CMAPI
1102 CONFIGRET
1103 WINAPI
1104 CM_Get_Class_Key_NameA(
1105 IN LPGUID ClassGuid,
1106 OUT LPSTR pszKeyName,
1107 IN OUT PULONG pulLength,
1108 IN ULONG ulFlags);
1109
1110 CMAPI
1111 CONFIGRET
1112 WINAPI
1113 CM_Get_Class_Key_NameW(
1114 IN LPGUID ClassGuid,
1115 OUT LPWSTR pszKeyName,
1116 IN OUT PULONG pulLength,
1117 IN ULONG ulFlags);
1118
1119 CMAPI
1120 CONFIGRET
1121 WINAPI
1122 CM_Get_Class_Key_Name_ExA(
1123 IN LPGUID ClassGuid,
1124 OUT LPSTR pszKeyName,
1125 IN OUT PULONG pulLength,
1126 IN ULONG ulFlags,
1127 IN HMACHINE hMachine);
1128
1129 CMAPI
1130 CONFIGRET
1131 WINAPI
1132 CM_Get_Class_Key_Name_ExW(
1133 IN LPGUID ClassGuid,
1134 OUT LPWSTR pszKeyName,
1135 IN OUT PULONG pulLength,
1136 IN ULONG ulFlags,
1137 IN HMACHINE hMachine);
1138
1139 #ifdef UNICODE
1140 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
1141 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
1142 #else
1143 #define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
1144 #define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
1145 #endif /* UNICODE */
1146
1147 /* FIXME: Obsolete CM_Get_Class_Registry_Property */
1148
1149 CMAPI
1150 CONFIGRET
1151 WINAPI
1152 CM_Get_Depth(
1153 OUT PULONG pulDepth,
1154 IN DEVINST dnDevInst,
1155 IN ULONG ulFlags);
1156
1157 CMAPI
1158 CONFIGRET
1159 WINAPI
1160 CM_Get_Depth_Ex(
1161 OUT PULONG pulDepth,
1162 IN DEVINST dnDevInst,
1163 IN ULONG ulFlags,
1164 IN HMACHINE hMachine);
1165
1166 CMAPI
1167 CONFIGRET
1168 WINAPI
1169 CM_Get_Device_IDA(
1170 IN DEVINST dnDevInst,
1171 OUT PCHAR Buffer,
1172 IN ULONG BufferLen,
1173 IN ULONG ulFlags);
1174
1175 CMAPI
1176 CONFIGRET
1177 WINAPI
1178 CM_Get_Device_ID_ExA(
1179 IN DEVINST dnDevInst,
1180 OUT PCHAR Buffer,
1181 IN ULONG BufferLen,
1182 IN ULONG ulFlags,
1183 IN HMACHINE hMachine);
1184
1185 CMAPI
1186 CONFIGRET
1187 WINAPI
1188 CM_Get_Device_ID_ExW(
1189 IN DEVINST dnDevInst,
1190 OUT PWCHAR Buffer,
1191 IN ULONG BufferLen,
1192 IN ULONG ulFlags,
1193 IN HMACHINE hMachine);
1194
1195 CMAPI
1196 CONFIGRET
1197 WINAPI
1198 CM_Get_Device_IDW(
1199 IN DEVINST dnDevInst,
1200 OUT PWCHAR Buffer,
1201 IN ULONG BufferLen,
1202 IN ULONG ulFlags);
1203
1204 #ifdef UNICODE
1205 #define CM_Get_Device_ID CM_Get_Device_IDW
1206 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
1207 #else
1208 #define CM_Get_Device_ID CM_Get_Device_IDA
1209 #define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
1210 #endif /* UNICODE */
1211
1212 CMAPI
1213 CONFIGRET
1214 WINAPI
1215 CM_Get_Device_ID_ListA(
1216 IN PCSTR pszFilter, OPTIONAL
1217 OUT PCHAR Buffer,
1218 IN ULONG BufferLen,
1219 IN ULONG ulFlags);
1220
1221 CMAPI
1222 CONFIGRET
1223 WINAPI
1224 CM_Get_Device_ID_List_ExA(
1225 IN PCSTR pszFilter, OPTIONAL
1226 OUT PCHAR Buffer,
1227 IN ULONG BufferLen,
1228 IN ULONG ulFlags,
1229 IN HMACHINE hMachine);
1230
1231 CMAPI
1232 CONFIGRET
1233 WINAPI
1234 CM_Get_Device_ID_List_ExW(
1235 IN PCWSTR pszFilter, OPTIONAL
1236 OUT PWCHAR Buffer,
1237 IN ULONG BufferLen,
1238 IN ULONG ulFlags,
1239 IN HMACHINE hMachine);
1240
1241 CMAPI
1242 CONFIGRET
1243 WINAPI
1244 CM_Get_Device_ID_ListW(
1245 IN PCWSTR pszFilter, OPTIONAL
1246 OUT PWCHAR Buffer,
1247 IN ULONG BufferLen,
1248 IN ULONG ulFlags);
1249
1250 #ifdef UNICODE
1251 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
1252 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
1253 #else
1254 #define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
1255 #define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
1256 #endif /* UNICODE */
1257
1258 CMAPI
1259 CONFIGRET
1260 WINAPI
1261 CM_Get_Device_ID_List_SizeA(
1262 OUT PULONG pulLen,
1263 IN PCSTR pszFilter, OPTIONAL
1264 IN ULONG ulFlags);
1265
1266 CMAPI
1267 CONFIGRET
1268 WINAPI
1269 CM_Get_Device_ID_List_Size_ExA(
1270 OUT PULONG pulLen,
1271 IN PCSTR pszFilter, OPTIONAL
1272 IN ULONG ulFlags,
1273 IN HMACHINE hMachine);
1274
1275 CMAPI
1276 CONFIGRET
1277 WINAPI
1278 CM_Get_Device_ID_List_Size_ExW(
1279 OUT PULONG pulLen,
1280 IN PCWSTR pszFilter, OPTIONAL
1281 IN ULONG ulFlags,
1282 IN HMACHINE hMachine);
1283
1284 CMAPI
1285 CONFIGRET
1286 WINAPI
1287 CM_Get_Device_ID_List_SizeW(
1288 OUT PULONG pulLen,
1289 IN PCWSTR pszFilter, OPTIONAL
1290 IN ULONG ulFlags);
1291
1292 #ifdef UNICODE
1293 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
1294 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
1295 #else
1296 #define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
1297 #define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
1298 #endif /* UNICODE */
1299
1300 CMAPI
1301 CONFIGRET
1302 WINAPI
1303 CM_Get_Device_ID_Size(
1304 OUT PULONG pulLen,
1305 IN DEVINST dnDevInst,
1306 IN ULONG ulFlags);
1307
1308 CMAPI
1309 CONFIGRET
1310 WINAPI
1311 CM_Get_Device_ID_Size_Ex(
1312 OUT PULONG pulLen,
1313 IN DEVINST dnDevInst,
1314 IN ULONG ulFlags,
1315 IN HMACHINE hMachine);
1316
1317 /* FIXME: Obsolete CM_Get_Device_Interface_Alias */
1318 /* FIXME: Obsolete CM_Get_Device_Interface_Alias_Ex */
1319 /* FIXME: Obsolete CM_Get_Device_Interface_List */
1320 /* FIXME: Obsolete CM_Get_Device_Interface_List_Ex */
1321 /* FIXME: Obsolete CM_Get_Device_Interface_List_Size */
1322 /* FIXME: Obsolete CM_Get_Device_Interface_List_Size_Ex */
1323 /* FIXME: Obsolete CM_Get_DevNode_Custom_Property */
1324 /* FIXME: Obsolete CM_Get_DevNode_Custom_Property_Ex */
1325
1326 CMAPI
1327 CONFIGRET
1328 WINAPI
1329 CM_Get_DevNode_Registry_PropertyA(
1330 IN DEVINST dnDevInst,
1331 IN ULONG ulProperty,
1332 OUT PULONG pulRegDataType, OPTIONAL
1333 OUT PVOID Buffer, OPTIONAL
1334 IN OUT PULONG pulLength,
1335 IN ULONG ulFlags);
1336
1337 CMAPI
1338 CONFIGRET
1339 WINAPI
1340 CM_Get_DevNode_Registry_PropertyW(
1341 IN DEVINST dnDevInst,
1342 IN ULONG ulProperty,
1343 OUT PULONG pulRegDataType, OPTIONAL
1344 OUT PVOID Buffer, OPTIONAL
1345 IN OUT PULONG pulLength,
1346 IN ULONG ulFlags);
1347
1348 CMAPI
1349 CONFIGRET
1350 WINAPI
1351 CM_Get_DevNode_Registry_Property_ExA(
1352 IN DEVINST dnDevInst,
1353 IN ULONG ulProperty,
1354 OUT PULONG pulRegDataType, OPTIONAL
1355 OUT PVOID Buffer, OPTIONAL
1356 IN OUT PULONG pulLength,
1357 IN ULONG ulFlags,
1358 IN HMACHINE hMachine);
1359
1360 CMAPI
1361 CONFIGRET
1362 WINAPI
1363 CM_Get_DevNode_Registry_Property_ExW(
1364 IN DEVINST dnDevInst,
1365 IN ULONG ulProperty,
1366 OUT PULONG pulRegDataType, OPTIONAL
1367 OUT PVOID Buffer, OPTIONAL
1368 IN OUT PULONG pulLength,
1369 IN ULONG ulFlags,
1370 IN HMACHINE hMachine);
1371
1372 #define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
1373 #define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
1374 #define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
1375 #define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
1376
1377 #ifdef UNICODE
1378 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
1379 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1380 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
1381 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
1382 #else
1383 #define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
1384 #define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1385 #define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
1386 #define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
1387 #endif /* UNICODE */
1388
1389 CMAPI
1390 CONFIGRET
1391 WINAPI
1392 CM_Get_DevNode_Status(
1393 OUT PULONG pulStatus,
1394 OUT PULONG pulProblemNumber,
1395 IN DEVINST dnDevInst,
1396 IN ULONG ulFlags);
1397
1398 CMAPI
1399 CONFIGRET
1400 WINAPI
1401 CM_Get_DevNode_Status_Ex(
1402 OUT PULONG pulStatus,
1403 OUT PULONG pulProblemNumber,
1404 IN DEVINST dnDevInst,
1405 IN ULONG ulFlags,
1406 IN HMACHINE hMachine);
1407
1408 #define CM_Get_DevInst_Status CM_Get_DevNode_Status
1409 #define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
1410
1411 /* CM_Get_First_Log_Conf.ulFlags constants */
1412 #define BASIC_LOG_CONF 0x00000000 /* Specifies the req list. */
1413 #define FILTERED_LOG_CONF 0x00000001 /* Specifies the filtered req list. */
1414 #define ALLOC_LOG_CONF 0x00000002 /* Specifies the Alloc Element. */
1415 #define BOOT_LOG_CONF 0x00000003 /* Specifies the RM Alloc Element. */
1416 #define FORCED_LOG_CONF 0x00000004 /* Specifies the Forced Log Conf */
1417 #define OVERRIDE_LOG_CONF 0x00000005 /* Specifies the Override req list. */
1418 #define NUM_LOG_CONF 0x00000006 /* Number of Log Conf type */
1419 #define LOG_CONF_BITS 0x00000007 /* The bits of the log conf type. */
1420
1421 CMAPI
1422 CONFIGRET
1423 WINAPI
1424 CM_Get_First_Log_Conf(
1425 OUT PLOG_CONF plcLogConf, OPTIONAL
1426 IN DEVINST dnDevInst,
1427 IN ULONG ulFlags);
1428
1429 CMAPI
1430 CONFIGRET
1431 WINAPI
1432 CM_Get_First_Log_Conf_Ex(
1433 OUT PLOG_CONF plcLogConf, OPTIONAL
1434 IN DEVINST dnDevInst,
1435 IN ULONG ulFlags,
1436 IN HMACHINE hMachine);
1437
1438 CMAPI
1439 CONFIGRET
1440 WINAPI
1441 CM_Get_Global_State(
1442 OUT PULONG pulState,
1443 IN ULONG ulFlags);
1444
1445 CMAPI
1446 CONFIGRET
1447 WINAPI
1448 CM_Get_Global_State_Ex(
1449 OUT PULONG pulState,
1450 IN ULONG ulFlags,
1451 IN HMACHINE hMachine);
1452
1453 /* FIXME: Obsolete CM_Get_Hardware_Profile_Info */
1454 /* FIXME: Obsolete CM_Get_Hardware_Profile_Info_Ex */
1455
1456 CMAPI
1457 CONFIGRET
1458 WINAPI
1459 CM_Get_HW_Prof_FlagsA(
1460 IN DEVINSTID_A szDevInstName,
1461 IN ULONG ulHardwareProfile,
1462 OUT PULONG pulValue,
1463 IN ULONG ulFlags);
1464
1465 CMAPI
1466 CONFIGRET
1467 WINAPI
1468 CM_Get_HW_Prof_FlagsW(
1469 IN DEVINSTID_W szDevInstName,
1470 IN ULONG ulHardwareProfile,
1471 OUT PULONG pulValue,
1472 IN ULONG ulFlags);
1473
1474 CMAPI
1475 CONFIGRET
1476 WINAPI
1477 CM_Get_HW_Prof_Flags_ExA(
1478 IN DEVINSTID_A szDevInstName,
1479 IN ULONG ulHardwareProfile,
1480 OUT PULONG pulValue,
1481 IN ULONG ulFlags,
1482 IN HMACHINE hMachine);
1483
1484 CMAPI
1485 CONFIGRET
1486 WINAPI
1487 CM_Get_HW_Prof_Flags_ExW(
1488 IN DEVINSTID_W szDevInstName,
1489 IN ULONG ulHardwareProfile,
1490 OUT PULONG pulValue,
1491 IN ULONG ulFlags,
1492 IN HMACHINE hMachine);
1493
1494 #ifdef UNICODE
1495 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
1496 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
1497 #else
1498 #define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
1499 #define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
1500 #endif /* UNICODE */
1501
1502 CMAPI
1503 CONFIGRET
1504 WINAPI
1505 CM_Get_Log_Conf_Priority(
1506 IN LOG_CONF lcLogConf,
1507 OUT PPRIORITY pPriority,
1508 IN ULONG ulFlags);
1509
1510 CMAPI
1511 CONFIGRET
1512 WINAPI
1513 CM_Get_Log_Conf_Priority_Ex(
1514 IN LOG_CONF lcLogConf,
1515 OUT PPRIORITY pPriority,
1516 IN ULONG ulFlags,
1517 IN HMACHINE hMachine);
1518
1519 CMAPI
1520 CONFIGRET
1521 WINAPI
1522 CM_Get_Next_Log_Conf(
1523 OUT PLOG_CONF plcLogConf, OPTIONAL
1524 IN LOG_CONF lcLogConf,
1525 IN ULONG ulFlags);
1526
1527 CMAPI
1528 CONFIGRET
1529 WINAPI
1530 CM_Get_Next_Log_Conf_Ex(
1531 OUT PLOG_CONF plcLogConf, OPTIONAL
1532 IN LOG_CONF lcLogConf,
1533 IN ULONG ulFlags,
1534 IN HMACHINE hMachine);
1535
1536 CMAPI
1537 CONFIGRET
1538 WINAPI
1539 CM_Get_Next_Res_Des(
1540 OUT PRES_DES prdResDes,
1541 IN RES_DES rdResDes,
1542 IN RESOURCEID ForResource,
1543 OUT PRESOURCEID pResourceID,
1544 IN ULONG ulFlags);
1545
1546 CMAPI
1547 CONFIGRET
1548 WINAPI
1549 CM_Get_Next_Res_Des_Ex(
1550 OUT PRES_DES prdResDes,
1551 IN RES_DES rdResDes,
1552 IN RESOURCEID ForResource,
1553 OUT PRESOURCEID pResourceID,
1554 IN ULONG ulFlags,
1555 IN HMACHINE hMachine);
1556
1557 CMAPI
1558 CONFIGRET
1559 WINAPI
1560 CM_Get_Parent(
1561 OUT PDEVINST pdnDevInst,
1562 IN DEVINST dnDevInst,
1563 IN ULONG ulFlags);
1564
1565 CMAPI
1566 CONFIGRET
1567 WINAPI
1568 CM_Get_Parent_Ex(
1569 OUT PDEVINST pdnDevInst,
1570 IN DEVINST dnDevInst,
1571 IN ULONG ulFlags,
1572 IN HMACHINE hMachine);
1573
1574 CMAPI
1575 CONFIGRET
1576 WINAPI
1577 CM_Get_Res_Des_Data(
1578 IN RES_DES rdResDes,
1579 OUT PVOID Buffer,
1580 IN ULONG BufferLen,
1581 IN ULONG ulFlags);
1582
1583 CMAPI
1584 CONFIGRET
1585 WINAPI
1586 CM_Get_Res_Des_Data_Ex(
1587 IN RES_DES rdResDes,
1588 OUT PVOID Buffer,
1589 IN ULONG BufferLen,
1590 IN ULONG ulFlags,
1591 IN HMACHINE hMachine);
1592
1593 CMAPI
1594 CONFIGRET
1595 WINAPI
1596 CM_Get_Res_Des_Data_Size(
1597 OUT PULONG pulSize,
1598 IN RES_DES rdResDes,
1599 IN ULONG ulFlags);
1600
1601 CMAPI
1602 CONFIGRET
1603 WINAPI
1604 CM_Get_Res_Des_Data_Size_Ex(
1605 OUT PULONG pulSize,
1606 IN RES_DES rdResDes,
1607 IN ULONG ulFlags,
1608 IN HMACHINE hMachine);
1609
1610 CMAPI
1611 CONFIGRET
1612 WINAPI
1613 CM_Get_Resource_Conflict_Count(
1614 IN CONFLICT_LIST clConflictList,
1615 OUT PULONG pulCount);
1616
1617 CMAPI
1618 CONFIGRET
1619 WINAPI
1620 CM_Get_Resource_Conflict_DetailsA(
1621 IN CONFLICT_LIST clConflictList,
1622 IN ULONG ulIndex,
1623 IN OUT PCONFLICT_DETAILS_A pConflictDetails);
1624
1625 CMAPI
1626 CONFIGRET
1627 WINAPI
1628 CM_Get_Resource_Conflict_DetailsW(
1629 IN CONFLICT_LIST clConflictList,
1630 IN ULONG ulIndex,
1631 IN OUT PCONFLICT_DETAILS_W pConflictDetails);
1632
1633 #ifdef UNICODE
1634 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
1635 #else
1636 #define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
1637 #endif /* UNICODE */
1638
1639 CMAPI
1640 CONFIGRET
1641 WINAPI
1642 CM_Get_Sibling(
1643 OUT PDEVINST pdnDevInst,
1644 IN DEVINST DevInst,
1645 IN ULONG ulFlags);
1646
1647 CMAPI
1648 CONFIGRET
1649 WINAPI
1650 CM_Get_Sibling_Ex(
1651 OUT PDEVINST pdnDevInst,
1652 IN DEVINST DevInst,
1653 IN ULONG ulFlags,
1654 IN HMACHINE hMachine);
1655
1656 CMAPI
1657 WORD
1658 WINAPI
1659 CM_Get_Version(
1660 VOID);
1661
1662 CMAPI
1663 WORD
1664 WINAPI
1665 CM_Get_Version_Ex(
1666 IN HMACHINE hMachine);
1667
1668 /* FIXME: Obsolete CM_Intersect_Range_List */
1669 /* FIXME: Obsolete CM_Invert_Range_List */
1670
1671 CMAPI
1672 CONFIGRET
1673 WINAPI
1674 CM_Is_Dock_Station_Present(
1675 OUT PBOOL pbPresent);
1676
1677 CMAPI
1678 CONFIGRET
1679 WINAPI
1680 CM_Is_Dock_Station_Present_Ex(
1681 OUT PBOOL pbPresent,
1682 IN HMACHINE hMachine);
1683
1684 /* CM_Locate_DevNode.ulFlags constants */
1685 #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
1686 #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
1687 #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
1688 #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
1689 #define CM_LOCATE_DEVNODE_BITS 0x00000007
1690
1691 #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
1692 #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
1693 #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
1694 #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
1695 #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
1696
1697 CMAPI
1698 CONFIGRET
1699 WINAPI
1700 CM_Locate_DevNodeA(
1701 OUT PDEVINST pdnDevInst,
1702 IN DEVINSTID_A pDeviceID, OPTIONAL
1703 IN ULONG ulFlags);
1704
1705 CMAPI
1706 CONFIGRET
1707 WINAPI
1708 CM_Locate_DevNode_ExA(
1709 OUT PDEVINST pdnDevInst,
1710 IN DEVINSTID_A pDeviceID, OPTIONAL
1711 IN ULONG ulFlags,
1712 IN HMACHINE hMachine);
1713
1714 CMAPI
1715 CONFIGRET
1716 WINAPI
1717 CM_Locate_DevNode_ExW(
1718 OUT PDEVINST pdnDevInst,
1719 IN DEVINSTID_W pDeviceID, OPTIONAL
1720 IN ULONG ulFlags,
1721 IN HMACHINE hMachine);
1722
1723 CMAPI
1724 CONFIGRET
1725 WINAPI
1726 CM_Locate_DevNodeW(
1727 OUT PDEVINST pdnDevInst,
1728 IN DEVINSTID_W pDeviceID, OPTIONAL
1729 IN ULONG ulFlags);
1730
1731 #define CM_Locate_DevInstA CM_Locate_DevNodeA
1732 #define CM_Locate_DevInstW CM_Locate_DevNodeW
1733 #define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
1734 #define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
1735
1736 #ifdef UNICODE
1737 #define CM_Locate_DevNode CM_Locate_DevNodeW
1738 #define CM_Locate_DevInst CM_Locate_DevNodeW
1739 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
1740 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
1741 #else
1742 #define CM_Locate_DevNode CM_Locate_DevNodeA
1743 #define CM_Locate_DevInst CM_Locate_DevNodeA
1744 #define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
1745 #define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
1746 #endif /* UNICODE */
1747
1748 /* FIXME: Obsolete CM_Merge_Range_List */
1749
1750 CMAPI
1751 CONFIGRET
1752 WINAPI
1753 CM_Modify_Res_Des(
1754 OUT PRES_DES prdResDes,
1755 IN RES_DES rdResDes,
1756 IN RESOURCEID ResourceID,
1757 IN PCVOID ResourceData,
1758 IN ULONG ResourceLen,
1759 IN ULONG ulFlags);
1760
1761 CMAPI
1762 CONFIGRET
1763 WINAPI
1764 CM_Modify_Res_Des_Ex(
1765 OUT PRES_DES prdResDes,
1766 IN RES_DES rdResDes,
1767 IN RESOURCEID ResourceID,
1768 IN PCVOID ResourceData,
1769 IN ULONG ResourceLen,
1770 IN ULONG ulFlags,
1771 IN HMACHINE hMachine);
1772
1773 /* FIXME: Obsolete CM_Move_DevNode */
1774 /* FIXME: Obsolete CM_Move_DevNode_Ex */
1775 /* FIXME: Obsolete CM_Next_Range */
1776
1777 CMAPI
1778 CONFIGRET
1779 WINAPI
1780 CM_Open_Class_KeyA(
1781 IN LPGUID ClassGuid, OPTIONAL
1782 IN LPCSTR pszClassName, OPTIONAL
1783 IN REGSAM samDesired,
1784 IN REGDISPOSITION Disposition,
1785 OUT PHKEY phkClass,
1786 IN ULONG ulFlags);
1787
1788 CMAPI
1789 CONFIGRET
1790 WINAPI
1791 CM_Open_Class_KeyW(
1792 IN LPGUID ClassGuid, OPTIONAL
1793 IN LPCWSTR pszClassName, OPTIONAL
1794 IN REGSAM samDesired,
1795 IN REGDISPOSITION Disposition,
1796 OUT PHKEY phkClass,
1797 IN ULONG ulFlags);
1798
1799 CMAPI
1800 CONFIGRET
1801 WINAPI
1802 CM_Open_Class_Key_ExA(
1803 IN LPGUID pszClassGuid, OPTIONAL
1804 IN LPCSTR pszClassName, OPTIONAL
1805 IN REGSAM samDesired,
1806 IN REGDISPOSITION Disposition,
1807 OUT PHKEY phkClass,
1808 IN ULONG ulFlags,
1809 IN HMACHINE hMachine);
1810
1811 CMAPI
1812 CONFIGRET
1813 WINAPI
1814 CM_Open_Class_Key_ExW(
1815 IN LPGUID pszClassGuid, OPTIONAL
1816 IN LPCWSTR pszClassName, OPTIONAL
1817 IN REGSAM samDesired,
1818 IN REGDISPOSITION Disposition,
1819 OUT PHKEY phkClass,
1820 IN ULONG ulFlags,
1821 IN HMACHINE hMachine);
1822
1823 #ifdef UNICODE
1824 #define CM_Open_Class_Key CM_Open_Class_KeyW
1825 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
1826 #else
1827 #define CM_Open_Class_Key CM_Open_Class_KeyA
1828 #define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
1829 #endif /* UNICODE */
1830
1831 CMAPI
1832 CONFIGRET
1833 WINAPI
1834 CM_Open_DevNode_Key(
1835 IN DEVINST dnDevNode,
1836 IN REGSAM samDesired,
1837 IN ULONG ulHardwareProfile,
1838 IN REGDISPOSITION Disposition,
1839 OUT PHKEY phkDevice,
1840 IN ULONG ulFlags);
1841
1842 CMAPI
1843 CONFIGRET
1844 WINAPI
1845 CM_Open_DevNode_Key_Ex(
1846 IN DEVINST dnDevNode,
1847 IN REGSAM samDesired,
1848 IN ULONG ulHardwareProfile,
1849 IN REGDISPOSITION Disposition,
1850 OUT PHKEY phkDevice,
1851 IN ULONG ulFlags,
1852 IN HMACHINE hMachine);
1853
1854 #define CM_Open_DevInst_Key CM_Open_DevNode_Key
1855 #define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
1856
1857 /* CM_Query_And_Remove_SubTree.ulFlags constants */
1858 #define CM_REMOVE_UI_OK 0x00000000
1859 #define CM_REMOVE_UI_NOT_OK 0x00000001
1860 #define CM_REMOVE_NO_RESTART 0x00000002
1861 #define CM_REMOVE_BITS 0x00000003
1862
1863 CMAPI
1864 CONFIGRET
1865 WINAPI
1866 CM_Query_And_Remove_SubTreeA(
1867 IN DEVINST dnAncestor,
1868 OUT PPNP_VETO_TYPE pVetoType,
1869 OUT LPSTR pszVetoName,
1870 IN ULONG ulNameLength,
1871 IN ULONG ulFlags);
1872
1873 CMAPI
1874 CONFIGRET
1875 WINAPI
1876 CM_Query_And_Remove_SubTreeW(
1877 IN DEVINST dnAncestor,
1878 OUT PPNP_VETO_TYPE pVetoType,
1879 OUT LPWSTR pszVetoName,
1880 IN ULONG ulNameLength,
1881 IN ULONG ulFlags);
1882
1883 CMAPI
1884 CONFIGRET
1885 WINAPI
1886 CM_Query_And_Remove_SubTree_ExA(
1887 IN DEVINST dnAncestor,
1888 OUT PPNP_VETO_TYPE pVetoType,
1889 OUT LPSTR pszVetoName,
1890 IN ULONG ulNameLength,
1891 IN ULONG ulFlags,
1892 IN HMACHINE hMachine);
1893
1894 CMAPI
1895 CONFIGRET
1896 WINAPI
1897 CM_Query_And_Remove_SubTree_ExW(
1898 IN DEVINST dnAncestor,
1899 OUT PPNP_VETO_TYPE pVetoType,
1900 OUT LPWSTR pszVetoName,
1901 IN ULONG ulNameLength,
1902 IN ULONG ulFlags,
1903 IN HMACHINE hMachine);
1904
1905 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Data */
1906 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Data_Ex */
1907 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Size */
1908 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Size_Ex */
1909 /* FIXME: Obsolete CM_Query_Arbitrator_Free_Size_Ex */
1910 /* FIXME: Obsolete CM_Query_Remove_SubTree */
1911 /* FIXME: Obsolete CM_Query_Remove_SubTree_Ex */
1912
1913 CMAPI
1914 CONFIGRET
1915 WINAPI
1916 CM_Query_Resource_Conflict_List(
1917 OUT PCONFLICT_LIST pclConflictList,
1918 IN DEVINST dnDevInst,
1919 IN RESOURCEID ResourceID,
1920 IN PCVOID ResourceData,
1921 IN ULONG ResourceLen,
1922 IN ULONG ulFlags,
1923 IN HMACHINE hMachine);
1924
1925 /* CM_Reenumerate_DevNode.ulFlags constants */
1926 #define CM_REENUMERATE_NORMAL 0x00000000
1927 #define CM_REENUMERATE_SYNCHRONOUS 0x00000001
1928 #define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
1929 #define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
1930 #define CM_REENUMERATE_BITS 0x00000007
1931
1932 CMAPI
1933 CONFIGRET
1934 WINAPI
1935 CM_Reenumerate_DevNode(
1936 IN DEVINST dnDevInst,
1937 IN ULONG ulFlags);
1938
1939 CMAPI
1940 CONFIGRET
1941 WINAPI
1942 CM_Reenumerate_DevNode_Ex(
1943 IN DEVINST dnDevInst,
1944 IN ULONG ulFlags,
1945 IN HMACHINE hMachine);
1946
1947 #define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
1948 #define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
1949
1950 /* FIXME: Obsolete CM_Register_Device_Driver */
1951 /* FIXME: Obsolete CM_Register_Device_Driver_Ex */
1952 /* FIXME: Obsolete CM_Register_Device_Interface */
1953 /* FIXME: Obsolete CM_Register_Device_Interface_Ex */
1954 /* FIXME: Obsolete CM_Remove_SubTree */
1955 /* FIXME: Obsolete CM_Remove_SubTree_Ex */
1956
1957 CMAPI
1958 CONFIGRET
1959 WINAPI
1960 CM_Request_Device_EjectA(
1961 IN DEVINST dnDevInst,
1962 OUT PPNP_VETO_TYPE pVetoType,
1963 OUT LPSTR pszVetoName,
1964 IN ULONG ulNameLength,
1965 IN ULONG ulFlags);
1966
1967 CMAPI
1968 CONFIGRET
1969 WINAPI
1970 CM_Request_Device_Eject_ExW(
1971 IN DEVINST dnDevInst,
1972 OUT PPNP_VETO_TYPE pVetoType,
1973 OUT LPWSTR pszVetoName,
1974 IN ULONG ulNameLength,
1975 IN ULONG ulFlags,
1976 IN HMACHINE hMachine);
1977
1978 CMAPI
1979 CONFIGRET
1980 WINAPI
1981 CM_Request_Device_Eject_ExA(
1982 IN DEVINST dnDevInst,
1983 OUT PPNP_VETO_TYPE pVetoType,
1984 OUT LPSTR pszVetoName,
1985 IN ULONG ulNameLength,
1986 IN ULONG ulFlags,
1987 IN HMACHINE hMachine);
1988
1989 CMAPI
1990 CONFIGRET
1991 WINAPI
1992 CM_Request_Device_EjectW(
1993 IN DEVINST dnDevInst,
1994 OUT PPNP_VETO_TYPE pVetoType,
1995 OUT LPWSTR pszVetoName,
1996 IN ULONG ulNameLength,
1997 IN ULONG ulFlags);
1998
1999 #ifdef UNICODE
2000 #define CM_Request_Device_Eject CM_Request_Device_EjectW
2001 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
2002 #else
2003 #define CM_Request_Device_Eject CM_Request_Device_EjectA
2004 #define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
2005 #endif /* UNICODE */
2006
2007 CMAPI
2008 CONFIGRET
2009 WINAPI
2010 CM_Request_Eject_PC(
2011 VOID);
2012
2013 CMAPI
2014 CONFIGRET
2015 WINAPI
2016 CM_Request_Eject_PC_Ex(
2017 IN HMACHINE hMachine);
2018
2019 /* CM_Run_Detection[_Ex].ulFlags constants */
2020 #define CM_DETECT_NEW_PROFILE 0x00000001
2021 #define CM_DETECT_CRASHED 0x00000002
2022 #define CM_DETECT_HWPROF_FIRST_BOOT 0x00000004
2023 #define CM_DETECT_RUN 0x80000000
2024 #define CM_DETECT_BITS 0x80000007
2025
2026 CMAPI
2027 CONFIGRET
2028 WINAPI
2029 CM_Run_Detection(
2030 IN ULONG ulFlags);
2031
2032 CMAPI
2033 CONFIGRET
2034 WINAPI
2035 CM_Run_Detection_Ex(
2036 IN ULONG ulFlags,
2037 IN HMACHINE hMachine);
2038
2039 /* FIXME: Obsolete CM_Set_Class_Registry_Property */
2040
2041 CMAPI
2042 CONFIGRET
2043 WINAPI
2044 CM_Set_DevNode_Problem(
2045 IN DEVINST dnDevInst,
2046 IN ULONG ulProblem,
2047 IN ULONG ulFlags);
2048
2049 CMAPI
2050 CONFIGRET
2051 WINAPI
2052 CM_Set_DevNode_Problem_Ex(
2053 IN DEVINST dnDevInst,
2054 IN ULONG ulProblem,
2055 IN ULONG ulFlags,
2056 IN HMACHINE hMachine);
2057
2058 #define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
2059 #define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
2060
2061 CMAPI
2062 CONFIGRET
2063 WINAPI
2064 CM_Set_DevNode_Registry_PropertyA(
2065 IN DEVINST dnDevInst,
2066 IN ULONG ulProperty,
2067 IN PCVOID Buffer, OPTIONAL
2068 IN ULONG ulLength,
2069 IN ULONG ulFlags);
2070
2071 CMAPI
2072 CONFIGRET
2073 WINAPI
2074 CM_Set_DevNode_Registry_PropertyW(
2075 IN DEVINST dnDevInst,
2076 IN ULONG ulProperty,
2077 IN PCVOID Buffer, OPTIONAL
2078 IN ULONG ulLength,
2079 IN ULONG ulFlags);
2080
2081 CMAPI
2082 CONFIGRET
2083 WINAPI
2084 CM_Set_DevNode_Registry_Property_ExA(
2085 IN DEVINST dnDevInst,
2086 IN ULONG ulProperty,
2087 IN PCVOID Buffer, OPTIONAL
2088 IN ULONG ulLength,
2089 IN ULONG ulFlags,
2090 IN HMACHINE hMachine);
2091
2092 CMAPI
2093 CONFIGRET
2094 WINAPI
2095 CM_Set_DevNode_Registry_Property_ExW(
2096 IN DEVINST dnDevInst,
2097 IN ULONG ulProperty,
2098 IN PCVOID Buffer, OPTIONAL
2099 IN ULONG ulLength,
2100 IN ULONG ulFlags,
2101 IN HMACHINE hMachine);
2102
2103 #define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
2104 #define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
2105 #define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
2106 #define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
2107
2108 #ifdef UNICODE
2109 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
2110 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
2111 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
2112 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
2113 #else
2114 #define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
2115 #define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
2116 #define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
2117 #define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
2118 #endif /* UNICODE */
2119
2120 /* FIXME: Obsolete CM_Set_HW_Prof */
2121 /* FIXME: Obsolete CM_Set_HW_Prof_Ex */
2122
2123 /* CM_Set_HW_Prof_Flags[_Ex].ulFlags constants */
2124 #define CM_SET_HW_PROF_FLAGS_UI_NOT_OK (0x00000001)
2125 #define CM_SET_HW_PROF_FLAGS_BITS (0x00000001)
2126
2127 CMAPI
2128 CONFIGRET
2129 WINAPI
2130 CM_Set_HW_Prof_FlagsA(
2131 IN DEVINSTID_A szDevInstName,
2132 IN ULONG ulConfig,
2133 IN ULONG ulValue,
2134 IN ULONG ulFlags);
2135
2136 CMAPI
2137 CONFIGRET
2138 WINAPI
2139 CM_Set_HW_Prof_FlagsW(
2140 IN DEVINSTID_W szDevInstName,
2141 IN ULONG ulConfig,
2142 IN ULONG ulValue,
2143 IN ULONG ulFlags);
2144
2145 CMAPI
2146 CONFIGRET
2147 WINAPI
2148 CM_Set_HW_Prof_Flags_ExA(
2149 IN DEVINSTID_A szDevInstName,
2150 IN ULONG ulConfig,
2151 IN ULONG ulValue,
2152 IN ULONG ulFlags,
2153 IN HMACHINE hMachine);
2154
2155 CMAPI
2156 CONFIGRET
2157 WINAPI
2158 CM_Set_HW_Prof_Flags_ExW(
2159 IN DEVINSTID_W szDevInstName,
2160 IN ULONG ulConfig,
2161 IN ULONG ulValue,
2162 IN ULONG ulFlags,
2163 IN HMACHINE hMachine);
2164
2165 #ifdef UNICODE
2166 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
2167 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
2168 #else
2169 #define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
2170 #define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
2171 #endif /* UNICODE */
2172
2173 /* CM_Setup_DevInst[_Ex].ulFlags constants */
2174 #define CM_SETUP_DEVNODE_READY (0x00000000)
2175 #define CM_SETUP_DEVINST_READY CM_SETUP_DEVNODE_READY
2176 #define CM_SETUP_DOWNLOAD (0x00000001)
2177 #define CM_SETUP_WRITE_LOG_CONFS (0x00000002)
2178 #define CM_SETUP_PROP_CHANGE (0x00000003)
2179 #define CM_SETUP_DEVNODE_RESET (0x00000004)
2180 #define CM_SETUP_DEVINST_RESET CM_SETUP_DEVNODE_RESET
2181 #define CM_SETUP_BITS (0x00000007)
2182
2183 CMAPI
2184 CONFIGRET
2185 WINAPI
2186 CM_Setup_DevNode(
2187 IN DEVINST dnDevInst,
2188 IN ULONG ulFlags);
2189
2190 CMAPI
2191 CONFIGRET
2192 WINAPI
2193 CM_Setup_DevNode_Ex(
2194 IN DEVINST dnDevInst,
2195 IN ULONG ulFlags,
2196 IN HMACHINE hMachine);
2197
2198 /* FIXME: Obsolete CM_Test_Range_Available */
2199
2200 CMAPI
2201 CONFIGRET
2202 WINAPI
2203 CM_Uninstall_DevNode(
2204 IN DEVINST dnPhantom,
2205 IN ULONG ulFlags);
2206
2207 CMAPI
2208 CONFIGRET
2209 WINAPI
2210 CM_Uninstall_DevNode_Ex(
2211 IN DEVINST dnPhantom,
2212 IN ULONG ulFlags,
2213 IN HMACHINE hMachine);
2214
2215 /* FIXME: Obsolete CM_Unregister_Device_Interface */
2216 /* FIXME: Obsolete CM_Unregister_Device_Interface_Ex */
2217
2218 #define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
2219
2220 CMAPI
2221 DWORD
2222 WINAPI
2223 CMP_WaitNoPendingInstallEvents(
2224 IN DWORD dwTimeout);
2225
2226 #include <poppack.h>
2227
2228 #ifdef __cplusplus
2229 }
2230 #endif
2231
2232 #endif /* _CFGMGR32_H_ */