ce07e49a6e29562d6cadbdee1b5870480703db3a
[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(HWND hWndParent,
124 LPCSTR lpMachineName,
125 LPCSTR lpDeviceID);
126
127 INT_PTR
128 WINAPI
129 DeviceAdvancedPropertiesW(HWND hWndParent,
130 LPCWSTR lpMachineName,
131 LPCWSTR lpDeviceID);
132
133 HWND
134 WINAPI
135 DeviceCreateHardwarePage(HWND hWndParent,
136 LPGUID lpGuid);
137
138 HWND
139 WINAPI
140 DeviceCreateHardwarePageEx(HWND hWndParent,
141 LPGUID lpGuids,
142 UINT uNumberOfGuids,
143 UINT Unknown);
144
145 int
146 WINAPI
147 DevicePropertiesExA(HWND hWndParent,
148 LPCSTR lpMachineName,
149 LPCSTR lpDeviceID,
150 HINSTANCE hInst,
151 DWORD Unknown);
152
153 int
154 WINAPI
155 DevicePropertiesExW(HWND hWndParent,
156 LPCWSTR lpMachineName,
157 LPCWSTR lpDeviceID,
158 HINSTANCE hInst,
159 DWORD Unknown);
160
161 #ifdef UNICODE
162 #define DeviceManager_Execute DeviceManager_ExecuteW
163 #define DeviceProperties_RunDLL DeviceProperties_RunDLLW
164 #define DeviceProperties DevicePropertiesW
165 #define DeviceProblemText DeviceProblemTextW
166 #define DeviceProblemWizard DeviceProblemWizardW
167 #define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLW
168 #define DeviceManagerPrint DeviceManagerPrintW
169 #define DeviceAdvancedProperties DeviceAdvancedPropertiesW
170 #define DevicePropertiesEx DevicePropertiesExW
171 #else
172 #define DeviceManager_Execute DeviceManager_ExecuteA
173 #define DeviceProperties_RunDLL DeviceProperties_RunDLLA
174 #define DeviceProperties DevicePropertiesA
175 #define DeviceProblemText DeviceProblemTextA
176 #define DeviceProblemWizard DeviceProblemWizardA
177 #define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLA
178 #define DeviceManagerPrint DeviceManagerPrintA
179 #define DeviceAdvancedProperties DeviceAdvancedPropertiesA
180 #define DevicePropertiesEx DevicePropertiesExA
181 #endif
182
183 /* ADVPROP.C */
184
185 INT_PTR
186 DisplayDeviceAdvancedProperties(IN HWND hWndParent,
187 IN LPCWSTR lpDeviceID OPTIONAL,
188 IN HDEVINFO DeviceInfoSet,
189 IN PSP_DEVINFO_DATA DeviceInfoData,
190 IN HINSTANCE hComCtl32,
191 IN LPCWSTR lpMachineName);
192
193 /* MISC.C */
194
195 DWORD
196 LoadAndFormatString(IN HINSTANCE hInstance,
197 IN UINT uID,
198 OUT LPWSTR *lpTarget,
199 ...);
200
201 DWORD
202 LoadAndFormatStringsCat(IN HINSTANCE hInstance,
203 IN UINT *uID,
204 IN UINT nIDs,
205 OUT LPWSTR *lpTarget,
206 ...);
207
208 LPARAM
209 ListViewGetSelectedItemData(IN HWND hwnd);
210
211 LPWSTR
212 ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr,
213 IN UINT uCodePage);
214
215 HINSTANCE
216 LoadAndInitComctl32(VOID);
217
218 BOOL
219 GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet,
220 IN PSP_DEVINFO_DATA DeviceInfoData,
221 OUT LPWSTR szBuffer,
222 IN DWORD BufferSize);
223
224 BOOL
225 GetDeviceLocationString(IN DEVINST dnDevInst OPTIONAL,
226 IN DEVINST dnParentDevInst OPTIONAL,
227 OUT LPWSTR szBuffer,
228 IN DWORD BufferSize);
229
230 BOOL
231 GetDeviceStatusString(IN DEVINST DevInst,
232 IN HMACHINE hMachine,
233 OUT LPWSTR szBuffer,
234 IN DWORD BufferSize);
235
236 BOOL
237 IsDeviceHidden(IN DEVINST DevInst,
238 IN HMACHINE hMachine,
239 OUT BOOL *IsHidden);
240
241 BOOL
242 CanDisableDevice(IN DEVINST DevInst,
243 IN HMACHINE hMachine,
244 OUT BOOL *CanDisable);
245
246 BOOL
247 IsDeviceEnabled(IN DEVINST DevInst,
248 IN HMACHINE hMachine,
249 OUT BOOL *IsEnabled);
250
251 BOOL
252 GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData,
253 OUT LPWSTR szBuffer,
254 IN DWORD BufferSize);
255
256 BOOL
257 GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet,
258 IN PSP_DEVINFO_DATA DeviceInfoData,
259 OUT LPWSTR szBuffer,
260 IN DWORD BufferSize);
261
262 #endif /* __DEVMGR_H */
263
264 /* EOF */