- document and partly implement DevicePropertiesExA/W()
[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 WINBOOL
75 WINAPI
76 DeviceProblemWizardA(HWND hWndParent,
77 LPCSTR lpMachineName,
78 LPCSTR lpDeviceID);
79
80
81 WINBOOL
82 WINAPI
83 DeviceProblemWizardW(HWND hWndParent,
84 LPCWSTR lpMachineName,
85 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 /* MISC.C */
204
205 DWORD
206 LoadAndFormatString(IN HINSTANCE hInstance,
207 IN UINT uID,
208 OUT LPWSTR *lpTarget,
209 ...);
210
211 DWORD
212 LoadAndFormatStringsCat(IN HINSTANCE hInstance,
213 IN UINT *uID,
214 IN UINT nIDs,
215 OUT LPWSTR *lpTarget,
216 ...);
217
218 LPARAM
219 ListViewGetSelectedItemData(IN HWND hwnd);
220
221 LPWSTR
222 ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr,
223 IN UINT uCodePage);
224
225 HINSTANCE
226 LoadAndInitComctl32(VOID);
227
228 BOOL
229 GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet,
230 IN PSP_DEVINFO_DATA DeviceInfoData,
231 OUT LPWSTR szBuffer,
232 IN DWORD BufferSize);
233
234 BOOL
235 GetDeviceLocationString(IN DEVINST dnDevInst OPTIONAL,
236 IN DEVINST dnParentDevInst OPTIONAL,
237 OUT LPWSTR szBuffer,
238 IN DWORD BufferSize);
239
240 BOOL
241 GetDeviceStatusString(IN DEVINST DevInst,
242 IN HMACHINE hMachine,
243 OUT LPWSTR szBuffer,
244 IN DWORD BufferSize);
245
246 BOOL
247 IsDeviceHidden(IN DEVINST DevInst,
248 IN HMACHINE hMachine,
249 OUT BOOL *IsHidden);
250
251 BOOL
252 CanDisableDevice(IN DEVINST DevInst,
253 IN HMACHINE hMachine,
254 OUT BOOL *CanDisable);
255
256 BOOL
257 IsDeviceEnabled(IN DEVINST DevInst,
258 IN HMACHINE hMachine,
259 OUT BOOL *IsEnabled);
260
261 BOOL
262 GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData,
263 OUT LPWSTR szBuffer,
264 IN DWORD BufferSize);
265
266 BOOL
267 GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet,
268 IN PSP_DEVINFO_DATA DeviceInfoData,
269 OUT LPWSTR szBuffer,
270 IN DWORD BufferSize);
271
272 #endif /* __DEVMGR_H */
273
274 /* EOF */