reshuffling of dlls
[reactos.git] / reactos / dll / win32 / devmgr / precomp.h
1 #ifndef __DEVMGR_H
2 #define __DEVMGR_H
3
4 #include <windows.h>
5 #include <regstr.h>
6 #include <setupapi.h>
7 #include <cfgmgr32.h>
8 #include <commctrl.h>
9 #include "resource.h"
10
11 extern HINSTANCE hDllInstance;
12
13 ULONG DbgPrint(PCH Format,...);
14
15 WINBOOL
16 WINAPI
17 DeviceManager_ExecuteA(HWND hWndParent,
18 HINSTANCE hInst,
19 LPCSTR lpMachineName,
20 int nCmdShow);
21
22 WINBOOL
23 WINAPI
24 DeviceManager_ExecuteW(HWND hWndParent,
25 HINSTANCE hInst,
26 LPCWSTR lpMachineName,
27 int nCmdShow);
28
29 VOID
30 WINAPI
31 DeviceProperties_RunDLLA(HWND hWndParent,
32 HINSTANCE hInst,
33 LPCSTR lpDeviceCmd,
34 int nCmdShow);
35
36 VOID
37 WINAPI
38 DeviceProperties_RunDLLW(HWND hWndParent,
39 HINSTANCE hInst,
40 LPCWSTR lpDeviceCmd,
41 int nCmdShow);
42
43 int
44 WINAPI
45 DevicePropertiesA(HWND hWndParent,
46 HINSTANCE hInst,
47 LPCSTR lpMachineName,
48 LPCSTR lpDeviceID,
49 DWORD Unknown);
50
51 int
52 WINAPI
53 DevicePropertiesW(HWND hWndParent,
54 HINSTANCE hInst,
55 LPCWSTR lpMachineName,
56 LPCWSTR lpDeviceID,
57 DWORD Unknown);
58
59 UINT
60 WINAPI
61 DeviceProblemTextA(IN HMACHINE hMachine OPTIONAL,
62 IN DEVINST dnDevInst,
63 IN ULONG uProblemId,
64 OUT LPSTR lpString,
65 IN UINT uMaxString);
66
67 UINT
68 WINAPI
69 DeviceProblemTextW(IN HMACHINE hMachine OPTIONAL,
70 IN DEVINST dnDevInst,
71 IN ULONG uProblemId,
72 OUT LPWSTR lpString,
73 IN UINT uMaxString);
74
75 BOOL
76 WINAPI
77 DeviceProblemWizardA(IN HWND hWndParent OPTIONAL,
78 IN LPCSTR lpMachineName OPTIONAL,
79 IN LPCSTR lpDeviceID);
80
81
82 BOOL
83 WINAPI
84 DeviceProblemWizardW(IN HWND hWndParent OPTIONAL,
85 IN LPCWSTR lpMachineName OPTIONAL,
86 IN LPCWSTR lpDeviceID);
87
88 VOID
89 WINAPI
90 DeviceProblemWizard_RunDLLA(HWND hWndParent,
91 HINSTANCE hInst,
92 LPCSTR lpDeviceCmd,
93 int nCmdShow);
94
95 VOID
96 WINAPI
97 DeviceProblemWizard_RunDLLW(HWND hWndParent,
98 HINSTANCE hInst,
99 LPCWSTR lpDeviceCmd,
100 int nCmdShow);
101
102 #define DEV_PRINT_ABSTRACT (0)
103 #define DEV_PRINT_SELECTED (1)
104 #define DEV_PRINT_ALL (2)
105
106 WINBOOL
107 WINAPI
108 DeviceManagerPrintA(LPCSTR lpMachineName,
109 LPCSTR lpPrinter,
110 int nPrintMode,
111 UINT uNumberOfGuids,
112 LPGUID lpGuids);
113
114 WINBOOL
115 WINAPI
116 DeviceManagerPrintW(LPCWSTR lpMachineName,
117 LPCWSTR lpPrinter,
118 int nPrintMode,
119 UINT uNumberOfGuids,
120 LPGUID lpGuids);
121
122 INT_PTR
123 WINAPI
124 DeviceAdvancedPropertiesA(IN HWND hWndParent OPTIONAL,
125 IN LPCSTR lpMachineName OPTIONAL,
126 IN LPCSTR lpDeviceID);
127
128 INT_PTR
129 WINAPI
130 DeviceAdvancedPropertiesW(IN HWND hWndParent OPTIONAL,
131 IN LPCWSTR lpMachineName OPTIONAL,
132 IN LPCWSTR lpDeviceID);
133
134 typedef enum
135 {
136 HWPD_STANDARDLIST = 0,
137 HWPD_LARGELIST,
138 HWPD_MAX = HWPD_LARGELIST
139 } HWPAGE_DISPLAYMODE, *PHWPAGE_DISPLAYMODE;
140
141 HWND
142 WINAPI
143 DeviceCreateHardwarePage(HWND hWndParent,
144 LPGUID lpGuid);
145
146 HWND
147 WINAPI
148 DeviceCreateHardwarePageEx(IN HWND hWndParent,
149 IN LPGUID lpGuids,
150 IN UINT uNumberOfGuids,
151 IN HWPAGE_DISPLAYMODE DisplayMode);
152
153 #define DPF_UNKNOWN (0x1)
154 #define DPF_DEVICE_STATUS_ACTION (0x2)
155 INT_PTR
156 WINAPI
157 DevicePropertiesExA(IN HWND hWndParent OPTIONAL,
158 IN LPCSTR lpMachineName OPTIONAL,
159 IN LPCSTR lpDeviceID OPTIONAL,
160 IN DWORD dwFlags OPTIONAL,
161 IN BOOL bShowDevMgr);
162
163 INT_PTR
164 WINAPI
165 DevicePropertiesExW(IN HWND hWndParent OPTIONAL,
166 IN LPCWSTR lpMachineName OPTIONAL,
167 IN LPCWSTR lpDeviceID OPTIONAL,
168 IN DWORD dwFlags OPTIONAL,
169 IN BOOL bShowDevMgr);
170
171 #ifdef UNICODE
172 #define DeviceManager_Execute DeviceManager_ExecuteW
173 #define DeviceProperties_RunDLL DeviceProperties_RunDLLW
174 #define DeviceProperties DevicePropertiesW
175 #define DeviceProblemText DeviceProblemTextW
176 #define DeviceProblemWizard DeviceProblemWizardW
177 #define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLW
178 #define DeviceManagerPrint DeviceManagerPrintW
179 #define DeviceAdvancedProperties DeviceAdvancedPropertiesW
180 #define DevicePropertiesEx DevicePropertiesExW
181 #else
182 #define DeviceManager_Execute DeviceManager_ExecuteA
183 #define DeviceProperties_RunDLL DeviceProperties_RunDLLA
184 #define DeviceProperties DevicePropertiesA
185 #define DeviceProblemText DeviceProblemTextA
186 #define DeviceProblemWizard DeviceProblemWizardA
187 #define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLA
188 #define DeviceManagerPrint DeviceManagerPrintA
189 #define DeviceAdvancedProperties DeviceAdvancedPropertiesA
190 #define DevicePropertiesEx DevicePropertiesExA
191 #endif
192
193 /* ADVPROP.C */
194
195 INT_PTR
196 DisplayDeviceAdvancedProperties(IN HWND hWndParent,
197 IN LPCWSTR lpDeviceID OPTIONAL,
198 IN HDEVINFO DeviceInfoSet,
199 IN PSP_DEVINFO_DATA DeviceInfoData,
200 IN HINSTANCE hComCtl32,
201 IN LPCWSTR lpMachineName,
202 IN DWORD dwFlags);
203
204 /* DEVPRBLM.C */
205
206 BOOL
207 ShowDeviceProblemWizard(IN HWND hWndParent OPTIONAL,
208 IN HDEVINFO hDevInfo,
209 IN PSP_DEVINFO_DATA DevInfoData,
210 IN HMACHINE hMachine OPTIONAL);
211
212 /* MISC.C */
213
214
215 INT
216 LengthOfStrResource(IN HINSTANCE hInst,
217 IN UINT uID);
218
219 DWORD
220 LoadAndFormatString(IN HINSTANCE hInstance,
221 IN UINT uID,
222 OUT LPWSTR *lpTarget,
223 ...);
224
225 DWORD
226 LoadAndFormatStringsCat(IN HINSTANCE hInstance,
227 IN UINT *uID,
228 IN UINT nIDs,
229 OUT LPWSTR *lpTarget,
230 ...);
231
232 LPARAM
233 ListViewGetSelectedItemData(IN HWND hwnd);
234
235 LPWSTR
236 ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr,
237 IN UINT uCodePage);
238
239 HINSTANCE
240 LoadAndInitComctl32(VOID);
241
242 BOOL
243 GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet,
244 IN PSP_DEVINFO_DATA DeviceInfoData,
245 OUT LPWSTR szBuffer,
246 IN DWORD BufferSize);
247
248 BOOL
249 GetDeviceLocationString(IN DEVINST dnDevInst OPTIONAL,
250 IN DEVINST dnParentDevInst OPTIONAL,
251 OUT LPWSTR szBuffer,
252 IN DWORD BufferSize);
253
254 BOOL
255 GetDeviceStatusString(IN DEVINST DevInst,
256 IN HMACHINE hMachine,
257 OUT LPWSTR szBuffer,
258 IN DWORD BufferSize);
259
260 BOOL
261 GetDriverProviderString(IN HDEVINFO DeviceInfoSet,
262 IN PSP_DEVINFO_DATA DeviceInfoData,
263 OUT LPWSTR szBuffer,
264 IN DWORD BufferSize);
265
266 BOOL
267 GetDriverVersionString(IN HDEVINFO DeviceInfoSet,
268 IN PSP_DEVINFO_DATA DeviceInfoData,
269 OUT LPWSTR szBuffer,
270 IN DWORD BufferSize);
271
272 BOOL
273 GetDriverDateString(IN HDEVINFO DeviceInfoSet,
274 IN PSP_DEVINFO_DATA DeviceInfoData,
275 OUT LPWSTR szBuffer,
276 IN DWORD BufferSize);
277
278 BOOL
279 IsDeviceHidden(IN DEVINST DevInst,
280 IN HMACHINE hMachine,
281 OUT BOOL *IsHidden);
282
283 BOOL
284 IsDriverInstalled(IN DEVINST DevInst,
285 IN HMACHINE hMachine,
286 OUT BOOL *Installed);
287
288 BOOL
289 CanDisableDevice(IN DEVINST DevInst,
290 IN HMACHINE hMachine,
291 OUT BOOL *CanDisable);
292
293 BOOL
294 IsDeviceStarted(IN DEVINST DevInst,
295 IN HMACHINE hMachine,
296 OUT BOOL *IsStarted);
297
298 BOOL
299 EnableDevice(IN HDEVINFO DeviceInfoSet,
300 IN PSP_DEVINFO_DATA DevInfoData OPTIONAL,
301 IN BOOL bEnable,
302 IN DWORD HardwareProfile OPTIONAL,
303 OUT BOOL *bNeedReboot OPTIONAL);
304
305 BOOL
306 GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData,
307 OUT LPWSTR szBuffer,
308 IN DWORD BufferSize);
309
310 BOOL
311 GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet,
312 IN PSP_DEVINFO_DATA DeviceInfoData,
313 OUT LPWSTR szBuffer,
314 IN DWORD BufferSize);
315
316 BOOL
317 FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
318 IN PSP_DEVINFO_DATA DeviceInfoData,
319 OUT PSP_DRVINFO_DATA DriverInfoData);
320
321 #endif /* __DEVMGR_H */
322
323 /* EOF */