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