- Add registry property constants.
[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
127
128 CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE );
129 CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE );
130 #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)
131
132 CONFIGRET WINAPI CM_Disconnect_Machine( HMACHINE );
133 CONFIGRET WINAPI CM_Enumerate_Classes( ULONG, LPGUID, ULONG );
134 CONFIGRET WINAPI CM_Enumerate_Classes_Ex( ULONG, LPGUID, ULONG, HMACHINE );
135 CONFIGRET WINAPI CM_Get_Child( PDEVINST, DEVINST, ULONG );
136 CONFIGRET WINAPI CM_Get_Child_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
137 CONFIGRET WINAPI CM_Get_Depth( PULONG, DEVINST, ULONG );
138 CONFIGRET WINAPI CM_Get_Depth_Ex( PULONG, DEVINST, ULONG, HMACHINE );
139 CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyA( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG );
140 CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG );
141 #define CM_Get_DevNode_Registry_Property WINELIB_NAME_AW(CM_Get_DevNode_Registry_Property)
142 CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExA( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG, HMACHINE );
143 CONFIGRET WINAPI CM_Get_DevNode_Registry_Property_ExW( DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG, HMACHINE );
144 #define CM_Get_DevNode_Registry_Property_Ex WINELIB_NAME_AW(CM_Get_DevNode_Registry_Property_Ex)
145 CONFIGRET WINAPI CM_Get_DevNode_Status( PULONG, PULONG, DEVINST, ULONG );
146 CONFIGRET WINAPI CM_Get_DevNode_Status_Ex( PULONG, PULONG, DEVINST, ULONG, HMACHINE );
147 CONFIGRET WINAPI CM_Get_Device_IDA( DEVINST, PCHAR, ULONG, ULONG );
148 CONFIGRET WINAPI CM_Get_Device_IDW( DEVINST, PWCHAR, ULONG, ULONG );
149 #define CM_Get_Device_ID WINELIB_NAME_AW(CM_Get_Device_ID)
150 CONFIGRET WINAPI CM_Get_Device_ID_ExW( DEVINST, PWCHAR, ULONG, ULONG, HMACHINE );
151 CONFIGRET WINAPI CM_Get_Device_ID_ExA( DEVINST, PCHAR, ULONG, ULONG, HMACHINE );
152 #define CM_Get_Device_ID_Ex WINELIB_NAME_AW(CM_Get_Device_ID_Ex)
153 CONFIGRET WINAPI CM_Get_Device_ID_ListA( PCSTR, PCHAR, ULONG, ULONG );
154 CONFIGRET WINAPI CM_Get_Device_ID_ListW( PCWSTR, PWCHAR, ULONG, ULONG );
155 #define CM_Get_Device_ID_List WINELIB_NAME_AW(CM_Get_Device_ID_List)
156 CONFIGRET WINAPI CM_Get_Device_ID_List_ExA( PCSTR, PCHAR, ULONG, ULONG, HMACHINE );
157 CONFIGRET WINAPI CM_Get_Device_ID_List_ExW( PCWSTR, PWCHAR, ULONG, ULONG, HMACHINE );
158 #define CM_Get_Device_ID_List_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex)
159 CONFIGRET WINAPI CM_Get_Device_ID_List_SizeA( PULONG, PCSTR, ULONG );
160 CONFIGRET WINAPI CM_Get_Device_ID_List_SizeW( PULONG, PCWSTR, ULONG );
161 #define CM_Get_Device_ID_List_Size WINELIB_NAME_AW(CM_Get_Device_ID_List_Size)
162 CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExA( PULONG, PCSTR, ULONG, HMACHINE );
163 CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW( PULONG, PCWSTR, ULONG, HMACHINE );
164 #define CM_Get_Device_ID_List_Size_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Size_Ex)
165 CONFIGRET WINAPI CM_Get_Device_ID_Size( PULONG, DEVINST, ULONG );
166 CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex( PULONG, DEVINST, ULONG, HMACHINE );
167 CONFIGRET WINAPI CM_Get_Global_State( PULONG, ULONG );
168 CONFIGRET WINAPI CM_Get_Global_State_Ex( PULONG, ULONG, HMACHINE );
169 CONFIGRET WINAPI CM_Get_Parent( PDEVINST, DEVINST, ULONG );
170 CONFIGRET WINAPI CM_Get_Parent_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
171 CONFIGRET WINAPI CM_Get_Sibling( PDEVINST, DEVINST, ULONG );
172 CONFIGRET WINAPI CM_Get_Sibling_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
173 WORD WINAPI CM_Get_Version( VOID );
174 WORD WINAPI CM_Get_Version_Ex( HMACHINE );
175
176 CONFIGRET WINAPI CM_Locate_DevNodeA(PDEVINST, DEVINSTID_A, ULONG);
177 CONFIGRET WINAPI CM_Locate_DevNodeW(PDEVINST, DEVINSTID_W, ULONG);
178 #define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
179 CONFIGRET WINAPI CM_Locate_DevNode_ExA(PDEVINST, DEVINSTID_A, ULONG, HMACHINE);
180 CONFIGRET WINAPI CM_Locate_DevNode_ExW(PDEVINST, DEVINSTID_W, ULONG, HMACHINE);
181 #define CM_Locate_DevNode_Ex WINELIB_NAME_AW(CM_Locate_DevNode_Ex)
182
183 CONFIGRET WINAPI CM_Open_Class_KeyA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG);
184 CONFIGRET WINAPI CM_Open_Class_KeyW(LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG);
185 #define CM_Open_Class_Key WINELIB_NAME_AW(CM_Open_Class_Key)
186 CONFIGRET WINAPI CM_Open_Class_Key_ExA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE);
187 CONFIGRET WINAPI CM_Open_Class_Key_ExW(LPGUID, LPCWSTR, REGSAM, REGDISPOSITION, PHKEY, ULONG, HMACHINE);
188 #define CM_Open_Class_Key_Ex WINELIB_NAME_AW(CM_Open_Class_Key_Ex)
189
190 CONFIGRET WINAPI CM_Set_DevNode_Problem( DEVINST, ULONG, ULONG );
191 CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex( DEVINST, ULONG, ULONG, HMACHINE );
192 CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyA( DEVINST, ULONG, PCVOID, ULONG, ULONG );
193 CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyW( DEVINST, ULONG, PCVOID, ULONG, ULONG );
194 #define CM_Set_DevNode_Registry_Property WINELIB_NAME_AW(CM_Set_DevNode_Registry_Property)
195 CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExA( DEVINST, ULONG, PCVOID, ULONG, ULONG, HMACHINE );
196 CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( DEVINST, ULONG, PCVOID, ULONG, ULONG, HMACHINE );
197 #define CM_Set_DevNode_Registry_Property_Ex WINELIB_NAME_AW(CM_Set_DevNode_Registry_Property_Ex)
198
199 #endif /* _CFGMGR32_H_ */