94209a51658222bdc2f764439b42313a4dbdff7a
[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(PVOID Unknown1,
61 PVOID Unknown2,
62 UINT uProblemId,
63 LPSTR lpString,
64 UINT uMaxString);
65
66 UINT
67 WINAPI
68 DeviceProblemTextW(PVOID Unknown1,
69 PVOID Unknown2,
70 UINT uProblemId,
71 LPWSTR lpString,
72 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 DWORD
214 LoadAndFormatString(IN HINSTANCE hInstance,
215 IN UINT uID,
216 OUT LPWSTR *lpTarget,
217 ...);
218
219 DWORD
220 LoadAndFormatStringsCat(IN HINSTANCE hInstance,
221 IN UINT *uID,
222 IN UINT nIDs,
223 OUT LPWSTR *lpTarget,
224 ...);
225
226 LPARAM
227 ListViewGetSelectedItemData(IN HWND hwnd);
228
229 LPWSTR
230 ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr,
231 IN UINT uCodePage);
232
233 HINSTANCE
234 LoadAndInitComctl32(VOID);
235
236 BOOL
237 GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet,
238 IN PSP_DEVINFO_DATA DeviceInfoData,
239 OUT LPWSTR szBuffer,
240 IN DWORD BufferSize);
241
242 BOOL
243 GetDeviceLocationString(IN DEVINST dnDevInst OPTIONAL,
244 IN DEVINST dnParentDevInst OPTIONAL,
245 OUT LPWSTR szBuffer,
246 IN DWORD BufferSize);
247
248 BOOL
249 GetDeviceStatusString(IN DEVINST DevInst,
250 IN HMACHINE hMachine,
251 OUT LPWSTR szBuffer,
252 IN DWORD BufferSize);
253
254 BOOL
255 IsDeviceHidden(IN DEVINST DevInst,
256 IN HMACHINE hMachine,
257 OUT BOOL *IsHidden);
258
259 BOOL
260 CanDisableDevice(IN DEVINST DevInst,
261 IN HMACHINE hMachine,
262 OUT BOOL *CanDisable);
263
264 BOOL
265 IsDeviceEnabled(IN DEVINST DevInst,
266 IN HMACHINE hMachine,
267 OUT BOOL *IsEnabled);
268
269 BOOL
270 EnableDevice(IN HDEVINFO DeviceInfoSet,
271 IN PSP_DEVINFO_DATA DevInfoData OPTIONAL,
272 IN BOOL bEnable,
273 IN DWORD HardwareProfile OPTIONAL,
274 OUT BOOL *bNeedReboot OPTIONAL);
275
276 BOOL
277 GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData,
278 OUT LPWSTR szBuffer,
279 IN DWORD BufferSize);
280
281 BOOL
282 GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet,
283 IN PSP_DEVINFO_DATA DeviceInfoData,
284 OUT LPWSTR szBuffer,
285 IN DWORD BufferSize);
286
287 #endif /* __DEVMGR_H */
288
289 /* EOF */