ReactOS 0.4.15-dev-7788-g1ad9096
fxmin.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5Module Name:
6
7 FxMin.hpp
8
9Abstract:
10
11 This is the minimal version of driver framework include file
12 that is needed to build FxObject
13
14
15
16
17
18
19Author:
20
21
22
23Environment:
24
25 Both kernel and user mode
26
27Revision History:
28
29--*/
30
31#ifndef _FXMIN_HPP
32#define _FXMIN_HPP
33
34extern "C" {
35#include "mx.h"
36}
37#include "fxmacros.hpp"
38
39#if (FX_CORE_MODE == FX_CORE_USER_MODE)
40//
41// Undef METHOD_FROM_CTL_CODE so that it is prevented from being used
42// inadvertently in mode-agnostic code. Irp->GetParameterIoctlCodeBufferMethod
43// should be used instead.
44//
45#ifdef METHOD_FROM_CTL_CODE
46#undef METHOD_FROM_CTL_CODE
47#endif
48#endif // FX_CORE_USER_MODE
49
51
52extern "C" {
53
55// Basic definitions (abridged version of wdf.h)
56
57#ifdef __cplusplus
58 #define WDF_EXTERN_C extern "C"
59 #define WDF_EXTERN_C_START extern "C" {
60 #define WDF_EXTERN_C_END }
61#else
62 #define WDF_EXTERN_C
63 #define WDF_EXTERN_C_START
64 #define WDF_EXTERN_C_END
65#endif
66
68
69typedef VOID (*WDFFUNC) (VOID);
70extern const WDFFUNC *WdfFunctions;
71
72#include "wdftypes.h"
73#include "wdfglobals.h"
74#include "wdffuncenum.h"
75#include "wdfstatus.h"
76#include "wdfassert.h"
77#include "wdfverifier.h"
78
79// generic object
80#include "wdfobject.h"
81
82#include "wdfcore.h"
83#include "wdfdevice.h"
84// #include "wdfdevicepri.h"
85// #include "wdfiotargetpri.h"
86#include "wdfdriver.h"
87
88#include "wdfmemory.h"
89
90#include "wdfrequest.h"
91#include "wdfwmi.h"
92#include "wdfchildlist.h"
93#include "wdfpdo.h"
94#include "wdffdo.h"
95#include "wdfiotarget.h"
96#include "wdfcontrol.h"
97#include "wdfcx.h"
98#include "wdfio.h"
99#include "wdfqueryinterface.h"
100#include "wdfworkitem.h"
101
102#include "wdfcollection.h"
103
104#include "wdffileobject.h"
105#include "wdfinterrupt.h"
106#include "wdfregistry.h"
107#include "wdfresource.h"
108#include "wdfstring.h"
109#include "wdfsync.h"
110#include "wdftimer.h"
111
112#if (FX_CORE_MODE == FX_CORE_USER_MODE)
113#include "wdfhid.h"
114#endif
115
116// #pragma warning(disable:4200) // suppress nameless struct/union warning
117// #pragma warning(disable:4201) // suppress nameless struct/union warning
118// #pragma warning(disable:4214) // suppress bit field types other than int warning
119#include <usb.h>
120#include <usbspec.h>
121#include "wdfusb.h"
122#include <initguid.h>
123#include <usbdlib.h>
124#include <usbbusif.h>
125
126#include "wdfbugcodes.h"
127
129
130#if (FX_CORE_MODE == FX_CORE_USER_MODE)
131#define KMDF_ONLY_CODE_PATH_ASSERT() FX_VERIFY(INTERNAL, TRAPMSG("Not implemented"));
132#define UMDF_ONLY_CODE_PATH_ASSERT()
133#else
134#define KMDF_ONLY_CODE_PATH_ASSERT()
135#define UMDF_ONLY_CODE_PATH_ASSERT() ASSERTMSG("Not implemented for KMDF", FALSE);
136#endif
137
138//
139// Since C does not have strong type checking we must invent our own
140//
142 //
143 // The size of this structure in bytes
144 //
145 ULONG Size;
146
147 //
148 // String representation of the context's type name, i.e. "DEVICE_CONTEXT"
149 //
151
152 //
153 // The size of the context in bytes. This will be the size of the context
154 // associated with the handle unless
155 // WDF_OBJECT_ATTRIBUTES::ContextSizeOverride is specified.
156 //
157 size_t ContextSize;
158
160
162
163// #include "cobbled.hpp"
164
165} //extern "C"
166
167#include <ntstrsafe.h>
168#include <ntintsafe.h>
169#include <wmistr.h>
170#include <evntrace.h>
171
172#if FX_CORE_MODE==FX_CORE_USER_MODE
186
187#include <wmium.h>
188#endif // FX_CORE_MODE==FX_CORE_USER_MODE
189
190#include "fxforward.hpp"
191
192#if (FX_CORE_MODE == FX_CORE_USER_MODE)
193#include "hostfxutil.h"
194#include "wdfplatform.h"
195#include "wdfplatformimpl.h"
196#include "debug.h"
197#include "devreg.h"
198#include "wudfx_namespace_on.h"
199#include "wudfx.h"
200#include "wudfx_namespace_off.h"
201#include "driverframeworks-usermode-umevents.h"
202#endif
203
204#include "fxtypedefs.hpp"
205
206#if defined(EVENT_TRACING)
207#include "fxwmicompat.h"
208#include "fxtrace.h"
209#else
210#include "dbgtrace.h"
211#endif // EVENT_TRACING
212
213#include "fxtypes.h"
215#include "fxpool.h"
216
217#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
218#include "fxglobalskm.h"
219#include "fxperftracekm.hpp"
220// #include "DriverFrameworks-KernelMode-KmEvents.h"
221#else
222#include "fxglobalsum.h"
223#endif
224#include "fxpoolinlines.hpp"
225#include "fxverifier.h"
226#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
227#include "fxverifierkm.h"
228#else
229#include "fxverifierum.h"
230#include "device_common.h"
231#endif
232#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
233#include "fxmdl.h"
234#endif
235
236#include "fxprobeandlock.h"
237//#include "FxPerfTraceKm.hpp"
238//#include <NtStrSafe.h>
239
240#include "fxstump.hpp"
241#include "fxrequestbuffer.hpp"
242#include "fxtagtracker.hpp"
243
244// internal locks
245#include "fxverifierlock.hpp"
246#include "fxlock.hpp"
247
248// base objects
249#include "fxobject.hpp"
250#include "fxpagedobject.hpp"
251#include "fxnonpagedobject.hpp"
252
253#include "fxhandle.h"
254
255// external locks
256#include "fxwaitlock.hpp"
257//#include "FxSpinLock.hpp"
258
259// utitilty classes and functions
262#include "fxdisposelist.hpp"
263#include "fxcollection.hpp"
264#include "stringutil.hpp"
265
266// abstract classes
267#include "ifxhascallbacks.hpp"
268
269// callback delegation and locking
270#include "fxsystemthread.hpp"
271#include "fxsystemworkitem.hpp"
272#include "fxcallbacklock.hpp"
273#include "fxcallbackspinlock.hpp"
275#include "fxcallback.hpp"
276#include "fxsystemthread.hpp"
277
278#include "ifxmemory.hpp"
279#include "fxlookasidelist.hpp"
280//#include "fxnpagedlookasidelist.hpp"
281//#include "fxpagedlookasidelist.hpp"
282#include "fxmemoryobject.hpp"
283#include "fxmemorybuffer.hpp"
286//#include "fxmemorybufferfromlookaside.hpp"
287#include "fxrequestmemory.hpp"
288#include "fxregkey.hpp"
289#include "fxautoregistry.hpp"
290#include "fxautostring.hpp"
291#include "fxstring.hpp"
292
294
295#include "fxresource.hpp"
296#include "fxrelateddevice.hpp"
297#include "fxdeviceinterface.hpp"
298#include "fxqueryinterface.hpp"
299#include "fxdevicetext.hpp"
300
301#if (FX_CORE_MODE == FX_CORE_USER_MODE)
302#include "fxirpum.hpp"
304#else
305#include "fxirpkm.hpp"
306#endif
307#include "fxdriver.hpp"
308
309// generic package interface
310#include "fxpackage.hpp"
311#include "fxpkggeneral.hpp"
313//#include "fxpoxkm.hpp"
314#include "fxpkgpnp.hpp"
315#include "fxwatchdog.hpp"
316
317// Device supportfx
318#include "fxchildlist.hpp"
319#include "fxcxdeviceinfo.hpp"
320
321#include "fxdevice.hpp"
322
323#include "fxpkgio.hpp"
324
326
327#include "fxirpqueue.hpp"
328#include "fxrequestcontext.hpp"
329#include "fxrequestcallbacks.hpp"
330#include "fxrequestbase.hpp"
331#include "fxrequest.hpp"
332#include "fxsyncrequest.hpp"
333
335
336// specialized irp handlers (ie packages)
337#include "fxpkgfdo.hpp"
338#include "fxpkgpdo.hpp"
339
340//#include "fxwmiirphandler.hpp"
341//#include "fxwmiprovider.hpp"
342//#include "fxwmiinstance.hpp"
343
344// queus for read, write, (internal) IOCTL
345#include "fxioqueue.hpp"
346#include "fxfileobject.hpp"
349
350//#include "fxdpc.hpp"
351#include "fxworkitem.hpp"
352#include "fxtimer.hpp"
353#if FX_CORE_MODE==FX_CORE_USER_MODE
354#include "fxinterruptum.hpp"
356#else
357#include "fxinterruptkm.hpp"
358#endif
359
360// IO targets (device lower edge interface)
361#include "fxiotarget.hpp"
362#include "fxiotargetremote.hpp"
363#include "fxiotargetself.hpp"
364
365#include "fxusbdevice.hpp"
366#include "fxusbinterface.hpp"
367#include "fxusbpipe.hpp"
368
369// DMA support
370//#include "fxdmaenabler.hpp"
371//#include "fxdmatransaction.hpp"
372//#include "fxcommonbuffer.hpp"
373
374// Triage info.
375// #include "wdftriage.h"
376
377
378#include "fxpkgioshared.hpp"
379
380#if FX_CORE_MODE==FX_CORE_USER_MODE
381#include "ufxverifier.h"
382#endif
383
384
385#endif // _FXMIN_HPP
#define VOID
Definition: acefi.h:82
const WDFFUNC * WdfFunctions
#define WDF_EXTERN_C_END
Definition: fxmin.hpp:64
struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0 WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0
#define WDF_EXTERN_C_START
Definition: fxmin.hpp:63
struct _WDF_BIND_INFO * PWDF_BIND_INFO
Definition: fxmin.hpp:50
struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0 * PWDF_OBJECT_CONTEXT_TYPE_INFO_V1_0
Definition: fxmin.hpp:161
WDF_EXTERN_C_START typedef VOID(* WDFFUNC)(VOID)
Definition: fxmin.hpp:69
enum _TRACE_INFORMATION_CLASS TRACE_INFORMATION_CLASS
@ LoggerEventsLostClass
Definition: fxmin.hpp:182
@ TraceSessionSettingsClass
Definition: fxmin.hpp:183
@ TraceHandleByNameClass
Definition: fxmin.hpp:181
@ EventLoggerHandleClass
Definition: fxmin.hpp:179
@ GlobalLoggerHandleClass
Definition: fxmin.hpp:178
@ TraceEnableFlagsClass
Definition: fxmin.hpp:176
@ AllLoggerHandlesClass
Definition: fxmin.hpp:180
@ MaxTraceInformationClass
Definition: fxmin.hpp:184
@ TraceEnableLevelClass
Definition: fxmin.hpp:177
@ TraceHandleClass
Definition: fxmin.hpp:175
@ TraceIdClass
Definition: fxmin.hpp:174
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_TRACE_INFORMATION_CLASS
Definition: wmitypes.h:28