Fix missed files. Svn problem?
[reactos.git] / reactos / include / wine / cfgmgr32.h
1 /*
2 * Copyright (C) 2005 Mike McCormack
3 *
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.
8 *
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.
13 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 #ifndef _CFGMGR32_H_
20 #define _CFGMGR32_H_
21
22 /* cfgmgr32 doesn't use the normal convention, it adds an underscore before A/W */
23 #ifdef __WINESRC__
24 # define DECL_WINELIB_CFGMGR32_TYPE_AW(type) /* nothing */
25 #else /* __WINESRC__ */
26 # define DECL_WINELIB_CFGMGR32_TYPE_AW(type) typedef WINELIB_NAME_AW(type##_) type;
27 #endif /* __WINESRC__ */
28
29 typedef DWORD CONFIGRET;
30 typedef HANDLE HMACHINE;
31 typedef HMACHINE *PHMACHINE;
32 typedef DWORD DEVINST;
33 typedef DEVINST *PDEVINST;
34 typedef ULONG REGDISPOSITION;
35
36 typedef CHAR *DEVINSTID_A;
37 typedef WCHAR *DEVINSTID_W;
38 DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
39
40 #define CR_SUCCESS 0x00000000
41 #define CR_OUT_OF_MEMORY 0x00000002
42 #define CR_INVALID_POINTER 0x00000003
43 #define CR_INVALID_FLAG 0x00000004
44 #define CR_INVALID_DEVNODE 0x00000005
45 #define CR_INVALID_DEVINST CR_INVALID_DEVNODE
46 #define CR_NO_SUCH_DEVNODE 0x0000000D
47 #define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
48 #define CR_FAILURE 0x00000013
49 #define CR_BUFFER_SMALL 0x0000001A
50 #define CR_REGISTRY_ERROR 0x0000001D
51 #define CR_INVALID_DEVICE_ID 0x0000001E
52 #define CR_INVALID_DATA 0x0000001F
53 #define CR_NO_SUCH_VALUE 0x00000025
54 #define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
55 #define CR_INVALID_MACHINENAME 0x0000002F
56 #define CR_ACCESS_DENIED 0x00000033
57 #define CR_CALL_NOT_IMPLEMENTED 0x00000034
58 #define CR_INVALID_PROPERTY 0x00000035
59
60 #define MAX_CLASS_NAME_LEN 32
61 #define MAX_GUID_STRING_LEN 39
62 #define MAX_PROFILE_LEN 80
63 #define MAX_DEVICE_ID_LEN 200
64 #define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
65
66 /* Disposition values for CM_Open_Class_Key[_Ex] */
67 #define RegDisposition_OpenAlways 0x00000000
68 #define RegDisposition_OpenExisting 0x00000001
69 #define RegDisposition_Bits 0x00000001
70
71 /* ulFlags for CM_Open_Class_Key[_Ex] */
72 #define CM_OPEN_CLASS_KEY_INSTALLER 0x00000000
73 #define CM_OPEN_CLASS_KEY_INTERFACE 0x00000001
74 #define CM_OPEN_CLASS_KEY_BITS 0x00000001
75
76 /* ulFlags for CM_Locate_DevNode[_Ex] */
77 #define CM_LOCATE_DEVNODE_NORMAL 0x00000000
78 #define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
79 #define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
80 #define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
81 #define CM_LOCATE_DEVNODE_BITS 0x00000007
82
83 #define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
84 #define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
85 #define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
86 #define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
87 #define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
88
89 /* ulFlags for CM_Set_DevNode_Problem[_Ex] */
90 #define CM_SET_DEVNODE_PROBLEM_NORMAL 0x00000000
91 #define CM_SET_DEVNODE_PROBLEM_OVERRIDE 0x00000001
92 #define CM_SET_DEVNODE_PROBLEM_BITS 0x00000001
93
94 #define CM_SET_DEVINST_PROBLEM_NORMAL CM_SET_DEVNODE_PROBLEM_NORMAL
95 #define CM_SET_DEVINST_PROBLEM_OVERRIDE CM_SET_DEVNODE_PROBLEM_OVERRIDE
96 #define CM_SET_DEVINST_PROBLEM_BITS CM_SET_DEVNODE_PROBLEM_BITS
97
98 /* Properties for CM_Get/Set_DevNode_Registry_Property[_Ex]A/W */
99 #define CM_DRP_DEVICEDESC 0x00000001
100 #define CM_DRP_HARDWAREID 0x00000002
101 #define CM_DRP_COMPATIBLEIDS 0x00000003
102 #define CM_DRP_UNUSED0 0x00000004
103 #define CM_DRP_SERVICE 0x00000005
104 #define CM_DRP_UNUSED1 0x00000006
105 #define CM_DRP_UNUSED2 0x00000007
106 #define CM_DRP_CLASS 0x00000008
107 #define CM_DRP_CLASSGUID 0x00000009
108 #define CM_DRP_DRIVER 0x0000000A
109 #define CM_DRP_CONFIGFLAGS 0x0000000B
110 #define CM_DRP_MFG 0x0000000C
111 #define CM_DRP_FRIENDLYNAME 0x0000000D
112 #define CM_DRP_LOCATION_INFORMATION 0x0000000E
113 #define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F
114 #define CM_DRP_CAPABILITIES 0x00000010
115 #define CM_DRP_UI_NUMBER 0x00000011
116 #define CM_DRP_UPPERFILTERS 0x00000012
117 #define CM_DRP_LOWERFILTERS 0x00000013
118 #define CM_DRP_BUSTYPEGUID 0x00000014
119 #define CM_DRP_LEGACYBUSTYPE 0x00000015
120 #define CM_DRP_BUSNUMBER 0x00000016
121 #define CM_DRP_ENUMERATOR_NAME 0x00000017
122
123 #define CM_DRP_MIN 0x00000001
124 #define CM_DRP_MAX 0x00000017
125
126 /* ulFlags for CM_Delete_Class_Key[_Ex] */
127 #define CM_DELETE_CLASS_ONLY 0x00000000
128 #define CM_DELETE_CLASS_SUBKEYS 0x00000001
129 #define CM_DELETE_CLASS_BITS 0x00000001
130
131 /* ulFlags for CM_Get_Device_ID_List and CM_Get_Device_ID_List_Size */
132 #define CM_GETIDLIST_FILTER_NONE (0x00000000)
133 #define CM_GETIDLIST_FILTER_ENUMERATOR (0x00000001)
134 #define CM_GETIDLIST_FILTER_SERVICE (0x00000002)
135 #define CM_GETIDLIST_FILTER_EJECTRELATIONS (0x00000004)
136 #define CM_GETIDLIST_FILTER_REMOVALRELATIONS (0x00000008)
137 #define CM_GETIDLIST_FILTER_POWERRELATIONS (0x00000010)
138 #define CM_GETIDLIST_FILTER_BUSRELATIONS (0x00000020)
139 #define CM_GETIDLIST_DONOTGENERATE (0x10000040)
140 #define CM_GETIDLIST_FILTER_BITS (0x1000007F)
141
142
143 CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE );
144 CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE );
145 #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)
146 CONFIGRET WINAPI CM_Delete_Class_Key( LPGUID, ULONG );
147 CONFIGRET WINAPI CM_Delete_Class_Key_Ex( LPGUID, ULONG, HANDLE );
148 CONFIGRET WINAPI CM_Disconnect_Machine( HMACHINE );
149 CONFIGRET WINAPI CM_Enumerate_Classes( ULONG, LPGUID, ULONG );
150 CONFIGRET WINAPI CM_Enumerate_Classes_Ex( ULONG, LPGUID, ULONG, HMACHINE );
151 CONFIGRET WINAPI CM_Enumerate_EnumeratorsA( ULONG, PCHAR, PULONG, ULONG );
152 CONFIGRET WINAPI CM_Enumerate_EnumeratorsW( ULONG, PWCHAR, PULONG, ULONG );
153 #define CM_Enumerate_Enumerators WINELIB_NAME_AW(CM_Enumerate_Enumerators)
154 CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA( ULONG, PCHAR, PULONG, ULONG, HMACHINE );
155 CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW( ULONG, PWCHAR, PULONG, ULONG, HMACHINE );
156 #define CM_Enumerate_Enumerators_Ex WINELIB_NAME_AW(CM_Enumerate_Enumerators_Ex)
157 CONFIGRET WINAPI CM_Get_Child( PDEVINST, DEVINST, ULONG );
158 CONFIGRET WINAPI CM_Get_Child_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
159 CONFIGRET WINAPI CM_Get_Class_Key_NameA( LPGUID, LPSTR, PULONG, ULONG );
160 CONFIGRET WINAPI CM_Get_Class_Key_NameW( LPGUID, LPWSTR, PULONG, ULONG );
161 #define CM_Get_Class_Key_Name WINELIB_NAME_AW(CM_Get_Class_Key_Name)
162 CONFIGRET WINAPI CM_Get_Class_Key_Name_ExA( LPGUID, LPSTR, PULONG, ULONG, HMACHINE );
163 CONFIGRET WINAPI CM_Get_Class_Key_Name_ExW( LPGUID, LPWSTR, PULONG, ULONG, HMACHINE );
164 #define CM_Get_Class_Key_Name_Ex WINELIB_NAME_AW(CM_Get_Class_Key_Name_Ex)
165 CONFIGRET WINAPI CM_Get_Class_NameA( LPGUID, PCHAR, PULONG, ULONG );
166 CONFIGRET WINAPI CM_Get_Class_NameW( LPGUID, PWCHAR, PULONG, ULONG );
167 #define CM_Get_Class_Name WINELIB_NAME_AW(CM_Get_Class_Name)
168 CONFIGRET WINAPI CM_Get_Class_Name_ExA( LPGUID, PCHAR, PULONG, ULONG, HMACHINE );
169 CONFIGRET WINAPI CM_Get_Class_Name_ExW( LPGUID, PWCHAR, PULONG, ULONG, HMACHINE );
170 #define CM_Get_Class_Name_Ex WINELIB_NAME_AW(CM_Get_Class_Name_Ex)
171 CONFIGRET WINAPI CM_Get_Depth( PULONG, DEVINST, ULONG );
172 CONFIGRET WINAPI CM_Get_Depth_Ex( PULONG, DEVINST, ULONG, HMACHINE );
173 CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyA( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG );
174 CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG );
175 #define CM_Get_DevNode_Registry_Property WINELIB_NAME_AW(CM_Get_DevNode_Registry_Property)
176 CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExA( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG, HMACHINE );
177 CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG, HMACHINE );
178 #define CM_Get_DevNode_Registry_Property_Ex WINELIB_NAME_AW(CM_Get_DevNode_Registry_Property_Ex)
179 CONFIGRET WINAPI CM_Get_DevNode_Status( PULONG, PULONG, DEVINST, ULONG );
180 CONFIGRET WINAPI CM_Get_DevNode_Status_Ex( PULONG, PULONG, DEVINST, ULONG, HMACHINE );
181 CONFIGRET WINAPI CM_Get_Device_IDA( DEVINST, PCHAR, ULONG, ULONG );
182 CONFIGRET WINAPI CM_Get_Device_IDW( DEVINST, PWCHAR, ULONG, ULONG );
183 #define CM_Get_Device_ID WINELIB_NAME_AW(CM_Get_Device_ID)
184 CONFIGRET WINAPI CM_Get_Device_ID_ExW( DEVINST, PWCHAR, ULONG, ULONG, HMACHINE );
185 CONFIGRET WINAPI CM_Get_Device_ID_ExA( DEVINST, PCHAR, ULONG, ULONG, HMACHINE );
186 #define CM_Get_Device_ID_Ex WINELIB_NAME_AW(CM_Get_Device_ID_Ex)
187 CONFIGRET WINAPI CM_Get_Device_ID_ListA( PCSTR, PCHAR, ULONG, ULONG );
188 CONFIGRET WINAPI CM_Get_Device_ID_ListW( PCWSTR, PWCHAR, ULONG, ULONG );
189 #define CM_Get_Device_ID_List WINELIB_NAME_AW(CM_Get_Device_ID_List)
190 CONFIGRET WINAPI CM_Get_Device_ID_List_ExA( PCSTR, PCHAR, ULONG, ULONG, HMACHINE );
191 CONFIGRET WINAPI CM_Get_Device_ID_List_ExW( PCWSTR, PWCHAR, ULONG, ULONG, HMACHINE );
192 #define CM_Get_Device_ID_List_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex)
193 CONFIGRET WINAPI CM_Get_Device_ID_List_SizeA( PULONG, PCSTR, ULONG );
194 CONFIGRET WINAPI CM_Get_Device_ID_List_SizeW( PULONG, PCWSTR, ULONG );
195 #define CM_Get_Device_ID_List_Size WINELIB_NAME_AW(CM_Get_Device_ID_List_Size)
196 CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExA( PULONG, PCSTR, ULONG, HMACHINE );
197 CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW( PULONG, PCWSTR, ULONG, HMACHINE );
198 #define CM_Get_Device_ID_List_Size_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Size_Ex)
199 CONFIGRET WINAPI CM_Get_Device_ID_Size( PULONG, DEVINST, ULONG );
200 CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex( PULONG, DEVINST, ULONG, HMACHINE );
201 CONFIGRET WINAPI CM_Get_Global_State( PULONG, ULONG );
202 CONFIGRET WINAPI CM_Get_Global_State_Ex( PULONG, ULONG, HMACHINE );
203 CONFIGRET WINAPI CM_Get_Parent( PDEVINST, DEVINST, ULONG );
204 CONFIGRET WINAPI CM_Get_Parent_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
205 CONFIGRET WINAPI CM_Get_Sibling( PDEVINST, DEVINST, ULONG );
206 CONFIGRET WINAPI CM_Get_Sibling_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
207 WORD WINAPI CM_Get_Version( VOID );
208 WORD WINAPI CM_Get_Version_Ex( HMACHINE );
209
210 CONFIGRET WINAPI CM_Is_Dock_Station_Present( PBOOL );
211 CONFIGRET WINAPI CM_Is_Dock_Station_Present_Ex( PBOOL, HMACHINE );
212 CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST, DEVINSTID_A, ULONG);
213 CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST, DEVINSTID_W, ULONG);
214 #define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
215 CONFIGRET WINAPI CM_Locate_DevNode_ExA(PDEVINST, DEVINSTID_A, ULONG, HMACHINE);
216 CONFIGRET WINAPI CM_Locate_DevNode_ExW(PDEVINST, DEVINSTID_W, ULONG, HMACHINE);
217 #define CM_Locate_DevNode_Ex WINELIB_NAME_AW(CM_Locate_DevNode_Ex)
218
219 CONFIGRET WINAPI CM_Open_Class_KeyA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG);
220 CONFIGRET WINAPI CM_Open_Class_KeyW(LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG);
221 #define CM_Open_Class_Key WINELIB_NAME_AW(CM_Open_Class_Key)
222 CONFIGRET WINAPI CM_Open_Class_Key_ExA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE);
223 CONFIGRET WINAPI CM_Open_Class_Key_ExW(LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE);
224 #define CM_Open_Class_Key_Ex WINELIB_NAME_AW(CM_Open_Class_Key_Ex)
225
226 CONFIGRET WINAPI CM_Request_Eject_PC( VOID );
227 CONFIGRET WINAPI CM_Request_Eject_PC_Ex( HMACHINE );
228
229 CONFIGRET WINAPI CM_Set_DevNode_Problem( DEVINST, ULONG, ULONG );
230 CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex( DEVINST, ULONG, ULONG, HMACHINE );
231 CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyA( DEVINST, ULONG, PCVOID, ULONG, ULONG );
232 CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyW( DEVINST, ULONG, PCVOID, ULONG, ULONG );
233 #define CM_Set_DevNode_Registry_Property WINELIB_NAME_AW(CM_Set_DevNode_Registry_Property)
234 CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExA( DEVINST, ULONG, PCVOID, ULONG, ULONG, HMACHINE );
235 CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( DEVINST, ULONG, PCVOID, ULONG, ULONG, HMACHINE );
236 #define CM_Set_DevNode_Registry_Property_Ex WINELIB_NAME_AW(CM_Set_DevNode_Registry_Property_Ex)
237
238 #endif /* _CFGMGR32_H_ */