include: Add MFTOPOLOGY_DXVA_MODE enum definition.
[wine.git] / include / cfgmgr32.h
blob0893e42b399d46bc833ea7d8d4f6736e635afe56
1 /*
2 * Copyright (C) 2005 Mike McCormack
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _CFGMGR32_H_
20 #define _CFGMGR32_H_
22 #include <cfg.h>
23 #include <devpropdef.h>
25 #ifndef GUID_DEFINED
26 # include <guiddef.h>
27 #endif
29 /* cfgmgr32 doesn't use the normal convention, it adds an underscore before A/W */
30 #ifdef WINE_NO_UNICODE_MACROS
31 # define DECL_WINELIB_CFGMGR32_TYPE_AW(type) /* nothing */
32 #else
33 # define DECL_WINELIB_CFGMGR32_TYPE_AW(type) typedef WINELIB_NAME_AW(type##_) type;
34 #endif
36 #define CMAPI
37 typedef DWORD CONFIGRET;
39 #define CR_SUCCESS 0x00
40 #define CR_DEFAULT 0x01
41 #define CR_OUT_OF_MEMORY 0x02
42 #define CR_INVALID_POINTER 0x03
43 #define CR_INVALID_FLAG 0x04
44 #define CR_INVALID_DEVNODE 0x05
45 #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
46 #define CR_INVALID_RES_DES 0x06
47 #define CR_INVALID_LOG_CONF 0x07
48 #define CR_INVALID_ARBITRATOR 0x08
49 #define CR_INVALID_NODELIST 0x09
50 #define CR_DEVNODE_HAS_REQS 0x0a
51 #define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
52 #define CR_INVALID_RESOURCEID 0x0b
53 #define CR_DLVXD_NOT_FOUND 0x0c
54 #define CR_NO_SUCH_DEVNODE 0x0d
55 #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
56 #define CR_NO_MORE_LOG_CONF 0x0e
57 #define CR_NO_MORE_RES_DES 0x0f
58 #define CR_ALREADY_SUCH_DEVNODE 0x10
59 #define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
60 #define CR_INVALID_RANGE_LIST 0x11
61 #define CR_INVALID_RANGE 0x12
62 #define CR_FAILURE 0x13
63 #define CR_NO_SUCH_LOGICAL_DEV 0x14
64 #define CR_CREATE_BLOCKED 0x15
65 #define CR_NOT_SYSTEM_VM 0x16
66 #define CR_REMOVE_VETOED 0x17
67 #define CR_APM_VETOED 0x18
68 #define CR_INVALID_LOAD_TYPE 0x19
69 #define CR_BUFFER_SMALL 0x1a
70 #define CR_NO_ARBITRATOR 0x1b
71 #define CR_NO_REGISTRY_HANDLE 0x1c
72 #define CR_REGISTRY_ERROR 0x1d
73 #define CR_INVALID_DEVICE_ID 0x1e
74 #define CR_INVALID_DATA 0x1f
75 #define CR_INVALID_API 0x20
76 #define CR_DEVLOADER_NOT_READY 0x21
77 #define CR_NEED_RESTART 0x22
78 #define CR_NO_MORE_HW_PROFILES 0x23
79 #define CR_DEVICE_NOT_THERE 0x24
80 #define CR_NO_SUCH_VALUE 0x25
81 #define CR_WRONG_TYPE 0x26
82 #define CR_INVALID_PRIORITY 0x27
83 #define CR_NOT_DISABLEABLE 0x28
84 #define CR_FREE_RESOURCES 0x29
85 #define CR_QUERY_VETOED 0x2a
86 #define CR_CANT_SHARE_IRQ 0x2b
87 #define CR_NO_DEPENDENT 0x2c
88 #define CR_SAME_RESOURCES 0x2d
89 #define CR_NO_SUCH_REGISTRY_KEY 0x2e
90 #define CR_INVALID_MACHINENAME 0x2f
91 #define CR_REMOTE_COMM_FAILURE 0x30
92 #define CR_MACHINE_UNAVAILABLE 0x31
93 #define CR_NO_CM_SERVICES 0x32
94 #define CR_ACCESS_DENIED 0x33
95 #define CR_CALL_NOT_IMPLEMENTED 0x34
96 #define CR_INVALID_PROPERTY 0x35
97 #define CR_DEVICE_INTERFACE_ACTIVE 0x36
98 #define CR_NO_SUCH_DEVICE_INTERFACE 0x37
99 #define CR_INVALID_REFERENCE_STRING 0x38
100 #define CR_INVALID_CONFLICT_LIST 0x39
101 #define CR_INVALID_INDEX 0x3a
102 #define CR_INVALID_STRUCTURE_SIZE 0x3b
103 #define NUM_CR_RESULTS 0x3c
105 #define MAX_DEVICE_ID_LEN 200
106 #define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
108 #define MAX_CLASS_NAME_LEN 32
109 #define MAX_GUID_STRING_LEN 39
110 #define MAX_PROFILE_LEN 80
112 #define CM_DEVCAP_LOCKSUPPORTED 0x00000001
113 #define CM_DEVCAP_EJECTSUPPORTED 0x00000002
114 #define CM_DEVCAP_REMOVABLE 0x00000004
115 #define CM_DEVCAP_DOCKDEVICE 0x00000008
116 #define CM_DEVCAP_UNIQUEID 0x00000010
117 #define CM_DEVCAP_SILENTINSTALL 0x00000020
118 #define CM_DEVCAP_RAWDEVICEOK 0x00000040
119 #define CM_DEVCAP_SURPRISEREMOVALOK 0x00000080
120 #define CM_DEVCAP_HARDWAREDISABLED 0x00000100
121 #define CM_DEVCAP_NONDYNAMIC 0x00000200
122 #define CM_DEVCAP_SECUREDEVICE 0x00000400
124 #define CM_DRP_DEVICEDESC 0x01
125 #define CM_DRP_HARDWAREID 0x02
126 #define CM_DRP_COMPATIBLEIDS 0x03
127 #define CM_DRP_UNUSED0 0x04
128 #define CM_DRP_SERVICE 0x05
129 #define CM_DRP_UNUSED1 0x06
130 #define CM_DRP_UNUSED2 0x07
131 #define CM_DRP_CLASS 0x08
132 #define CM_DRP_CLASSGUID 0x09
133 #define CM_DRP_DRIVER 0x0A
134 #define CM_DRP_CONFIGFLAGS 0x0B
135 #define CM_DRP_MFG 0x0C
136 #define CM_DRP_FRIENDLYNAME 0x0D
137 #define CM_DRP_LOCATION_INFORMATION 0x0E
138 #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0F
139 #define CM_DRP_CAPABILITIES 0x10
140 #define CM_DRP_UI_NUMBER 0x11
141 #define CM_DRP_UPPERFILTERS 0x12
142 #define CM_DRP_LOWERFILTERS 0x13
143 #define CM_DRP_BUSTYPEGUID 0x14
144 #define CM_DRP_LEGACYBUSTYPE 0x15
145 #define CM_DRP_BUSNUMBER 0x16
146 #define CM_DRP_ENUMERATOR_NAME 0x17
147 #define CM_DRP_SECURITY 0x18
148 #define CM_DRP_SECURITY_SDS 0x19
149 #define CM_DRP_DEVTYPE 0x1A
150 #define CM_DRP_EXCLUSIVE 0x1B
151 #define CM_DRP_CHARACTERISTICS 0x1C
152 #define CM_DRP_ADDRESS 0x1D
153 #define CM_DRP_UI_NUMBER_DESC_FORMAT 0x1E
154 #define CM_DRP_DEVICE_POWER_DATA 0x1F
155 #define CM_DRP_REMOVAL_POLICY 0x20
156 #define CM_DRP_REMOVAL_POLICY_HW_DEFAULT 0x21
157 #define CM_DRP_REMOVAL_POLICY_OVERRIDE 0x22
158 #define CM_DRP_INSTALL_STATE 0x23
159 #define CM_DRP_LOCATION_PATHS 0x24
160 #define CM_DRP_BASE_CONTAINERID 0x25
161 #define CM_DRP_MIN 0x01
162 #define CM_DRP_MAX 0x25
164 #define CM_CRP_UPPERFILTERS CM_DRP_UPPERFILTERS
165 #define CM_CRP_LOWERFILTERS CM_DRP_LOWERFILTERS
166 #define CM_CRP_SECURITY CM_DRP_SECURITY
167 #define CM_CRP_SECURITY_SDS CM_DRP_SECURITY_SDS
168 #define CM_CRP_DEVTYPE CM_DRP_DEVTYPE
169 #define CM_CRP_EXCLUSIVE CM_DRP_EXCLUSIVE
170 #define CM_CRP_CHARACTERISTICS CM_DRP_CHARACTERISTICS
171 #define CM_CRP_MIN CM_DRP_MIN
172 #define CM_CRP_MAX CM_DRP_MAX
174 #define RegDisposition_OpenAlways 0x00
175 #define RegDisposition_OpenExisting 0x01
177 #define CM_REGISTRY_HARDWARE 0x0000
178 #define CM_REGISTRY_SOFTWARE 0x0001
179 #define CM_REGISTRY_USER 0x0100
180 #define CM_REGISTRY_CONFIG 0x0200
182 #define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
183 #define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
184 #define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
186 typedef DWORD DEVINST, *PDEVINST;
187 typedef DWORD DEVNODE, *PDEVNODE;
188 typedef HANDLE HMACHINE, *PHMACHINE;
189 typedef HANDLE HCMNOTIFICATION, *PHCMNOTIFICATION;
190 typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
191 typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
192 typedef ULONG REGDISPOSITION;
194 typedef enum _CM_NOTIFY_FILTER_TYPE
196 CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE,
197 CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE,
198 CM_NOTIFY_FILTER_TYPE_DEVICEINSTANCE,
199 CM_NOTIFY_FILTER_TYPE_MAX
200 } CM_NOTIFY_FILTER_TYPE, *PCM_NOTIFY_FILTER_TYPE;
202 typedef enum _CM_NOTIFY_ACTION
204 CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL,
205 CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL,
206 CM_NOTIFY_ACTION_DEVICEQUERYREMOVE,
207 CM_NOTIFY_ACTION_DEVICEQUERYREMOVEFAILED,
208 CM_NOTIFY_ACTION_DEVICEREMOVEPENDING,
209 CM_NOTIFY_ACTION_DEVICEREMOVECOMPLETE,
210 CM_NOTIFY_ACTION_DEVICECUSTOMEVENT,
211 CM_NOTIFY_ACTION_DEVICEINSTANCEENUMERATED,
212 CM_NOTIFY_ACTION_DEVICEINSTANCESTARTED,
213 CM_NOTIFY_ACTION_DEVICEINSTANCEREMOVED,
214 CM_NOTIFY_ACTION_MAX
215 } CM_NOTIFY_ACTION, *PCM_NOTIFY_ACTION;
217 typedef struct _CM_NOTIFY_FILTER
219 DWORD cbSize;
220 DWORD Flags;
221 CM_NOTIFY_FILTER_TYPE FilterType;
222 DWORD Reserved;
223 union
225 struct
227 GUID ClassGuid;
228 } DeviceInterface;
229 struct
231 HANDLE hTarget;
232 } DeviceHandle;
233 struct
235 WCHAR InstanceId[MAX_DEVICE_ID_LEN];
236 } DeviceInstance;
237 } u;
238 } CM_NOTIFY_FILTER, *PCM_NOTIFY_FILTER;
240 typedef struct _CM_NOTIFY_EVENT_DATA
242 CM_NOTIFY_FILTER_TYPE FilterType;
243 DWORD Reserved;
244 union
246 struct
248 GUID ClassGuid;
249 WCHAR SymbolicLink[ANYSIZE_ARRAY];
250 } DeviceInterface;
251 struct
253 GUID EventGuid;
254 LONG NameOffset;
255 DWORD DataSize;
256 BYTE Data[ANYSIZE_ARRAY];
257 } DeviceHandle;
258 struct
260 WCHAR InstanceId[ANYSIZE_ARRAY];
261 } DeviceInstance;
262 } u;
263 } CM_NOTIFY_EVENT_DATA, *PCM_NOTIFY_EVENT_DATA;
265 typedef DWORD (WINAPI *PCM_NOTIFY_CALLBACK)(HCMNOTIFICATION,void*,CM_NOTIFY_ACTION,CM_NOTIFY_EVENT_DATA*,DWORD);
267 DECL_WINELIB_CFGMGR32_TYPE_AW(DEVNODEID)
268 DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
270 #ifdef __cplusplus
271 extern "C" {
272 #endif
274 CMAPI CONFIGRET WINAPI CM_Connect_MachineA(PCSTR,PHMACHINE);
275 CMAPI CONFIGRET WINAPI CM_Connect_MachineW(PCWSTR,PHMACHINE);
276 #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)
277 CMAPI CONFIGRET WINAPI CM_Create_DevNodeA(PDEVINST,DEVINSTID_A,DEVINST,ULONG);
278 CMAPI CONFIGRET WINAPI CM_Create_DevNodeW(PDEVINST,DEVINSTID_W,DEVINST,ULONG);
279 #define CM_Create_DevNode WINELIB_NAME_AW(CM_Create_DevNode)
280 CMAPI CONFIGRET WINAPI CM_Disconnect_Machine(HMACHINE);
281 CMAPI CONFIGRET WINAPI CM_Get_Child(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags);
282 CMAPI CONFIGRET WINAPI CM_Get_Child_Ex(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine);
283 CMAPI CONFIGRET WINAPI CM_Get_Device_IDA(DEVINST,PSTR,ULONG,ULONG);
284 CMAPI CONFIGRET WINAPI CM_Get_Device_IDW(DEVINST,PWSTR,ULONG,ULONG);
285 #define CM_Get_Device_ID WINELIB_NAME_AW(CM_Get_Device_ID)
286 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_ExA(DEVINST,PSTR,ULONG,ULONG,HMACHINE);
287 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_ExW(DEVINST,PWSTR,ULONG,ULONG,HMACHINE);
288 #define CM_Get_Device_ID_Ex WINELIB_NAME_AW(CM_Get_Device_ID_Ex)
289 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_ListA(PCSTR,PCHAR,ULONG,ULONG);
290 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_ListW(PCWSTR,PWCHAR,ULONG,ULONG);
291 #define CM_Get_Device_ID_List WINELIB_NAME_AW(CM_Get_Device_ID_List)
292 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_List_ExA(PCSTR,PCHAR,ULONG,ULONG,HMACHINE);
293 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_List_ExW(PCWSTR,PWCHAR,ULONG,ULONG,HMACHINE);
294 #define CM_Get_Device_ID_List_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex)
295 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size(PULONG,DEVINST,ULONG);
296 CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex(PULONG,DEVINST,ULONG,HMACHINE);
297 CMAPI CONFIGRET WINAPI CM_Get_Device_Interface_PropertyW(LPCWSTR,const DEVPROPKEY*,DEVPROPTYPE*,PBYTE,PULONG,ULONG);
298 CMAPI CONFIGRET WINAPI CM_Get_DevNode_Status(PULONG,PULONG,DEVINST,ULONG);
299 CMAPI CONFIGRET WINAPI CM_Get_DevNode_Status_Ex(PULONG,PULONG,DEVINST,ULONG,HMACHINE);
300 CMAPI CONFIGRET WINAPI CM_Get_Sibling(PDEVINST,DEVINST,ULONG);
301 CMAPI CONFIGRET WINAPI CM_Get_Sibling_Ex(PDEVINST pdnDevInst, DEVINST DevInst, ULONG ulFlags, HMACHINE hMachine);
302 CMAPI WORD WINAPI CM_Get_Version(void);
303 CMAPI CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST,DEVINSTID_A,ULONG);
304 CMAPI CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST,DEVINSTID_W,ULONG);
305 #define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
306 CMAPI DWORD WINAPI CM_MapCrToWin32Err(CONFIGRET,DWORD);
307 CMAPI CONFIGRET WINAPI CM_Open_DevNode_Key(DEVINST dnDevInst, REGSAM access, ULONG ulHardwareProfile,
308 REGDISPOSITION disposition, PHKEY phkDevice, ULONG ulFlags);
309 CMAPI CONFIGRET WINAPI CM_Register_Notification(PCM_NOTIFY_FILTER,PVOID,PCM_NOTIFY_CALLBACK,PHCMNOTIFICATION);
310 CMAPI CONFIGRET WINAPI CM_Request_Device_EjectA(DEVINST dev, PPNP_VETO_TYPE type, LPSTR name, ULONG length, ULONG flags);
311 CMAPI CONFIGRET WINAPI CM_Request_Device_EjectW(DEVINST dev, PPNP_VETO_TYPE type, LPWSTR name, ULONG length, ULONG flags);
312 #define CM_Request_Device_Eject WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex)
314 #ifdef __cplusplus
316 #endif
318 #undef DECL_WINELIB_CFGMGR32_TYPE_AW
320 #endif /* _CFGMGR32_H_ */