ReactOS 0.4.15-dev-7788-g1ad9096
coreprivshared.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 corepriv.hpp
8
9Abstract:
10
11 This is the main driver framework.
12
13Author:
14
15
16
17Environment:
18
19 Both kernel and user mode
20
21Revision History:
22
23--*/
24
25#pragma once
26
27#if ((FX_CORE_MODE)==(FX_CORE_USER_MODE))
28#define FX_IS_USER_MODE (TRUE)
29#define FX_IS_KERNEL_MODE (FALSE)
30#elif ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
31#define FX_IS_USER_MODE (FALSE)
32#define FX_IS_KERNEL_MODE (TRUE)
33#endif
34
35/*
36extern "C" {
37#include <ntddk.h>
38#include "wdf.h"
39}
40
41#define WDF_REGISTRY_BASE_PATH L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Wdf"
42
43*/
44
45extern "C" {
46#include "mx.h"
47}
48
49#include "fxmin.hpp"
50
51#include "wdfmemory.h"
52#include "wdfrequest.h"
53#include "wdfdevice.h"
54// #include "wdfdevicepri.h"
55// #include "wdfiotargetpri.h"
56#include "wdfwmi.h"
57#include "wdfchildlist.h"
58#include "wdfpdo.h"
59#include "wdffdo.h"
60#include "wdfiotarget.h"
61#include "wdfcontrol.h"
62#include "wdfcx.h"
63#include "wdfio.h"
64#include "wdfqueryinterface.h"
65// #include "wdftriage.h"
66
67#if (FX_CORE_MODE == FX_CORE_USER_MODE)
68#include "fxirpum.hpp"
69#else
70#include "fxirpkm.hpp"
71#endif
72
73// <FxSystemWorkItem.hpp>
74typedef
78 );
79
80#include "fxirpqueue.hpp"
81
82
83// </FxSystemWorkItem.hpp>
84
85
86#include "fxprobeandlock.h"
87#include "fxpackage.hpp"
88#include "fxcollection.hpp"
90
91#include "ifxmemory.hpp"
92#include "fxcallback.hpp"
93#include "fxrequestcontext.hpp"
95#include "fxrequestbase.hpp"
96#include "fxmemoryobject.hpp"
97#include "fxmemorybuffer.hpp"
98
100
102
104
105//
106// MERGE temp: We may not need these include files here,
107// temporarily including them to verify they compile in shared code
108//
110#include "fxrequestcallbacks.hpp"
111
112// support
113#include "stringutil.hpp"
114#include "fxautostring.hpp"
115#include "fxstring.hpp"
116#include "fxdevicetext.hpp"
117#include "fxcallback.hpp"
118#include "fxdisposelist.hpp"
119#include "fxsystemthread.hpp"
120
122#include "fxpnpcallbacks.hpp"
123
124// device init
125#include "fxcxdeviceinit.hpp"
126#include "fxcxdeviceinfo.hpp"
127#include "fxdeviceinit.hpp"
128
130
131// request
132#include "fxrequestmemory.hpp"
133#include "fxrequest.hpp"
134#include "fxrequestbuffer.hpp"
135#include "fxsyncrequest.hpp"
136
137// io target
138#include "fxiotarget.hpp"
139#include "fxiotargetself.hpp"
140
141#include "fxsystemworkitem.hpp"
143#include "fxdriver.hpp"
144
145#include "fxdeviceinterface.hpp"
146#include "fxqueryinterface.hpp"
147
148#include "fxcallbackspinlock.hpp"
150#include "fxwmiirphandler.hpp"
151
152// packages
153#include "fxpkgio.hpp"
154#include "fxpkgpnp.hpp"
155#include "fxpkgfdo.hpp"
156#include "fxpkgpdo.hpp"
157#include "fxpkggeneral.hpp"
158#include "fxfileobject.hpp"
159#include "fxioqueue.hpp"
160#include "fxdevice.hpp"
161#include "fxtelemetry.hpp"
162
163#include "fxchildlist.hpp"
164
165#include "fxlookasidelist.hpp"
166
167/*#if FX_IS_KERNEL_MODE
168#include "wdfrequest.h"
169#endif*/
170
171//
172// Versioning of structures for wdfdriver.h
173//
174typedef struct _WDF_DRIVER_CONFIG_V1_0 {
175 //
176 // Size of this structure in bytes
177 //
178 ULONG Size;
179
180 //
181 // Event callbacks
182 //
184
186
187 //
188 // Combination of WDF_DRIVER_INIT_FLAGS values
189 //
191
193
194//
195// Versioning of structures for wdfdriver.h
196//
197typedef struct _WDF_DRIVER_CONFIG_V1_1 {
198 //
199 // Size of this structure in bytes
200 //
201 ULONG Size;
202
203 //
204 // Event callbacks
205 //
207
209
210 //
211 // Combination of WDF_DRIVER_INIT_FLAGS values
212 //
214
216
217
219 //
220 // Size of this structure in bytes
221 //
222 ULONG Size;
223
224 //
225 // Indicates whether the device can wake itself up while the machine is in
226 // S0.
227 //
229
230 //
231 // The low power state in which the device will be placed when it is idled
232 // out while the machine is in S0.
233 //
235
236 //
237 // Amount of time the device must be idle before idling out. Timeout is in
238 // milliseconds.
239 //
241
242 //
243 // Inidcates whether a user can control the idle policy of the device.
244 // By default, a user is allowed to change the policy.
245 //
247
248 //
249 // If WdfTrue, idling out while the machine is in S0 will be enabled.
250 //
251 // If WdfFalse, idling out will be disabled.
252 //
253 // If WdfUseDefault, the idling out will be enabled. If
254 // UserControlOfIdleSettings is set to IdleAllowUserControl, the user's
255 // settings will override the default.
256 //
258
259 //
260 // This field is applicable only when IdleCaps == IdleCannotWakeFromS0
261 // If WdfTrue,device is powered up on System Wake even if device is idle
262 // If WdfFalse, device is not powered up on system wake if it is idle
263 // If WdfUseDefault, the behavior is same as WdfFalse
264 //
266
268
270 //
271 // Size of this structure in bytes
272 //
273 ULONG Size;
274
275 //
276 // Indicates whether the device can wake itself up while the machine is in
277 // S0.
278 //
280
281 //
282 // The low power state in which the device will be placed when it is idled
283 // out while the machine is in S0.
284 //
286
287 //
288 // Amount of time the device must be idle before idling out. Timeout is in
289 // milliseconds.
290 //
292
293 //
294 // Inidcates whether a user can control the idle policy of the device.
295 // By default, a user is allowed to change the policy.
296 //
298
299 //
300 // If WdfTrue, idling out while the machine is in S0 will be enabled.
301 //
302 // If WdfFalse, idling out will be disabled.
303 //
304 // If WdfUseDefault, the idling out will be enabled. If
305 // UserControlOfIdleSettings is set to IdleAllowUserControl, the user's
306 // settings will override the default.
307 //
309
311
313 //
314 // Size of this structure in bytes
315 //
316 ULONG Size;
317
318 //
319 // The low power state in which the device will be placed when it is armed
320 // for wake from Sx.
321 //
323
324 //
325 // Inidcates whether a user can control the idle policy of the device.
326 // By default, a user is allowed to change the policy.
327 //
329
330 //
331 // If WdfTrue, arming the device for wake while the machine is in Sx is
332 // enabled.
333 //
334 // If WdfFalse, arming the device for wake while the machine is in Sx is
335 // disabled.
336 //
337 // If WdfUseDefault, arming will be enabled. If UserControlOfWakeSettings
338 // is set to WakeAllowUserControl, the user's settings will override the
339 // default.
340 //
342
344
345//
346// Versioning of structures for wdftimer.h
347//
348typedef struct _WDF_TIMER_CONFIG_V1_7 {
349 ULONG Size;
350
352
353 LONG Period;
354
355 //
356 // If this is TRUE, the Timer will automatically serialize
357 // with the event callback handlers of its Parent Object.
358 //
359 // Parent Object's callback constraints should be compatible
360 // with the Timer DPC (DISPATCH_LEVEL), or the request will fail.
361 //
363
365
366typedef struct _WDF_TIMER_CONFIG_V1_11 {
367 ULONG Size;
368
370
372
373 //
374 // If this is TRUE, the Timer will automatically serialize
375 // with the event callback handlers of its Parent Object.
376 //
377 // Parent Object's callback constraints should be compatible
378 // with the Timer DPC (DISPATCH_LEVEL), or the request will fail.
379 //
381
382 //
383 // Optional tolerance for the timer in milliseconds.
384 //
386
388
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
struct _WDF_TIMER_CONFIG_V1_7 WDF_TIMER_CONFIG_V1_7
struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_5 * PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_5
struct _WDF_DRIVER_CONFIG_V1_1 WDF_DRIVER_CONFIG_V1_1
struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7 WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7
struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_5 WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_5
struct _WDF_DRIVER_CONFIG_V1_1 * PWDF_DRIVER_CONFIG_V1_1
struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_9 WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_9
struct _WDF_TIMER_CONFIG_V1_11 WDF_TIMER_CONFIG_V1_11
struct _WDF_TIMER_CONFIG_V1_7 * PWDF_TIMER_CONFIG_V1_7
struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_9 * PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_9
struct _WDF_DRIVER_CONFIG_V1_0 WDF_DRIVER_CONFIG_V1_0
struct _WDF_DRIVER_CONFIG_V1_0 * PWDF_DRIVER_CONFIG_V1_0
struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7 * PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7
struct _WDF_TIMER_CONFIG_V1_11 * PWDF_TIMER_CONFIG_V1_11
EVT_SYSTEMWORKITEM * PFN_WDF_SYSTEMWORKITEM
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
long LONG
Definition: pedump.c:60
WDF_POWER_POLICY_S0_IDLE_CAPABILITIES IdleCaps
Definition: wdf17.h:658
WDF_POWER_POLICY_S0_IDLE_USER_CONTROL UserControlOfIdleSettings
Definition: wdf17.h:676
WDF_POWER_POLICY_S0_IDLE_CAPABILITIES IdleCaps
Definition: wdf19.h:769
WDF_POWER_POLICY_S0_IDLE_USER_CONTROL UserControlOfIdleSettings
Definition: wdf19.h:787
WDF_POWER_POLICY_SX_WAKE_USER_CONTROL UserControlOfWakeSettings
Definition: wdf15.h:705
PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd
Definition: wdf10.h:919
PFN_WDF_DRIVER_UNLOAD EvtDriverUnload
Definition: wdf10.h:921
PFN_WDF_DRIVER_UNLOAD EvtDriverUnload
Definition: wdf11.h:936
PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd
Definition: wdf11.h:934
BOOLEAN AutomaticSerialization
Definition: wdf111.h:2281
PFN_WDF_TIMER EvtTimerFunc
Definition: wdf111.h:2270
PFN_WDF_TIMER EvtTimerFunc
Definition: wdf17.h:1778
BOOLEAN AutomaticSerialization
Definition: wdf17.h:1789
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
enum _WDF_POWER_POLICY_S0_IDLE_USER_CONTROL WDF_POWER_POLICY_S0_IDLE_USER_CONTROL
enum _WDF_POWER_POLICY_SX_WAKE_USER_CONTROL WDF_POWER_POLICY_SX_WAKE_USER_CONTROL
enum _WDF_POWER_POLICY_S0_IDLE_CAPABILITIES WDF_POWER_POLICY_S0_IDLE_CAPABILITIES
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
Definition: wdfdriver.h:78
EVT_WDF_DRIVER_UNLOAD * PFN_WDF_DRIVER_UNLOAD
Definition: wdfdriver.h:91
EVT_WDF_TIMER * PFN_WDF_TIMER
Definition: wdftimer.h:67
enum _WDF_TRI_STATE WDF_TRI_STATE
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323