ReactOS 0.4.15-dev-8093-g3285f69
wdfdpc.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5_WdfVersionBuild_
6
7Module Name:
8
9 wdfdpc.h
10
11Abstract:
12
13 This is the C header for driver frameworks DPC object
14
15Revision History:
16
17
18--*/
19
20//
21// NOTE: This header is generated by stubwork. Please make any
22// modifications to the corresponding template files
23// (.x or .y) and use stubwork to regenerate the header
24//
25
26#ifndef _WDFDPC_H_
27#define _WDFDPC_H_
28
29#ifndef WDF_EXTERN_C
30 #ifdef __cplusplus
31 #define WDF_EXTERN_C extern "C"
32 #define WDF_EXTERN_C_START extern "C" {
33 #define WDF_EXTERN_C_END }
34 #else
35 #define WDF_EXTERN_C
36 #define WDF_EXTERN_C_START
37 #define WDF_EXTERN_C_END
38 #endif
39#endif
40
42
43
44
45#if (NTDDI_VERSION >= NTDDI_WIN2K)
46
47
48
49//
50// This is the function that gets called back into the driver
51// when the DPC fires.
52//
53typedef
54_Function_class_(EVT_WDF_DPC)
57VOID
59EVT_WDF_DPC(
60 _In_
61 WDFDPC Dpc
62 );
63
64typedef EVT_WDF_DPC *PFN_WDF_DPC;
65
69
70 //
71 // If this is TRUE, the DPC will automatically serialize
72 // with the event callback handlers of its Parent Object.
73 //
74 // Parent Object's callback constraints should be compatible
75 // with the DPC (DISPATCH_LEVEL), or the request will fail.
76 //
78
80
82VOID
85 _In_ PFN_WDF_DPC EvtDpcFunc
86 )
87{
89 Config->Size = sizeof(WDF_DPC_CONFIG);
90 Config->EvtDpcFunc = EvtDpcFunc;
91
92 Config->AutomaticSerialization = TRUE;
93}
94
95//
96// WDF Function: WdfDpcCreate
97//
98typedef
101WDFAPI
103(STDCALL *PFN_WDFDPCCREATE)(
104 _In_
106 _In_
108 _In_
110 _Out_
111 WDFDPC* Dpc
112 );
113
118WdfDpcCreate(
119 _In_
121 _In_
123 _Out_
124 WDFDPC* Dpc
125 )
126{
128}
129
130//
131// WDF Function: WdfDpcEnqueue
132//
133typedef
135WDFAPI
137(STDCALL *PFN_WDFDPCENQUEUE)(
138 _In_
140 _In_
141 WDFDPC Dpc
142 );
143
147WdfDpcEnqueue(
148 _In_
149 WDFDPC Dpc
150 )
151{
152 return ((PFN_WDFDPCENQUEUE) WdfFunctions[WdfDpcEnqueueTableIndex])(WdfDriverGlobals, Dpc);
153}
154
155//
156// WDF Function: WdfDpcCancel
157//
158typedef
161WDFAPI
163(STDCALL *PFN_WDFDPCCANCEL)(
164 _In_
166 _In_
167 WDFDPC Dpc,
168 _In_
170 );
171
176WdfDpcCancel(
177 _In_
178 WDFDPC Dpc,
179 _In_
181 )
182{
183 return ((PFN_WDFDPCCANCEL) WdfFunctions[WdfDpcCancelTableIndex])(WdfDriverGlobals, Dpc, Wait);
184}
185
186//
187// WDF Function: WdfDpcGetParentObject
188//
189typedef
191WDFAPI
193(STDCALL *PFN_WDFDPCGETPARENTOBJECT)(
194 _In_
196 _In_
197 WDFDPC Dpc
198 );
199
203WdfDpcGetParentObject(
204 _In_
205 WDFDPC Dpc
206 )
207{
208 return ((PFN_WDFDPCGETPARENTOBJECT) WdfFunctions[WdfDpcGetParentObjectTableIndex])(WdfDriverGlobals, Dpc);
209}
210
211//
212// WDF Function: WdfDpcWdmGetDpc
213//
214typedef
216WDFAPI
217PKDPC
218(STDCALL *PFN_WDFDPCWDMGETDPC)(
219 _In_
221 _In_
222 WDFDPC Dpc
223 );
224
227PKDPC
228WdfDpcWdmGetDpc(
229 _In_
230 WDFDPC Dpc
231 )
232{
233 return ((PFN_WDFDPCWDMGETDPC) WdfFunctions[WdfDpcWdmGetDpcTableIndex])(WdfDriverGlobals, Dpc);
234}
235
236
237
238#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
239
240
242
243#endif // _WDFDPC_H_
244
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define TRUE
Definition: types.h:120
#define NTSTATUS
Definition: precomp.h:21
#define _IRQL_requires_same_
Definition: driverspecs.h:232
#define _IRQL_requires_(irql)
Definition: driverspecs.h:229
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
DriverGlobals
#define _Function_class_(x)
Definition: ms_sal.h:2946
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _When_(expr, annos)
Definition: ms_sal.h:254
#define _In_
Definition: ms_sal.h:308
#define BOOLEAN
Definition: pedump.c:73
Definition: ketypes.h:699
BOOLEAN AutomaticSerialization
Definition: wdfdpc.h:77
PFN_WDF_DPC EvtDpcFunc
Definition: wdfdpc.h:68
ULONG Size
Definition: wdfdpc.h:67
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG
Definition: typedefs.h:59
#define STDCALL
Definition: wdf.h:45
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
struct _WDF_DPC_CONFIG WDF_DPC_CONFIG
struct _WDF_DPC_CONFIG * PWDF_DPC_CONFIG
#define WDF_EXTERN_C_END
Definition: wdfdpc.h:37
FORCEINLINE VOID WDF_DPC_CONFIG_INIT(_Out_ PWDF_DPC_CONFIG Config, _In_ PFN_WDF_DPC EvtDpcFunc)
Definition: wdfdpc.h:83
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG Config
Definition: wdfdpc.h:107
#define WDF_EXTERN_C_START
Definition: wdfdpc.h:36
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition: wdfdpc.h:109
_Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFDPCCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfdpc.h:100
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
EVT_WDF_DPC * PFN_WDF_DPC
Definition: wdfdpc.h:64
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfDpcWdmGetDpcTableIndex
Definition: wdffuncenum.h:140
@ WdfDpcCancelTableIndex
Definition: wdffuncenum.h:138
@ WdfDpcGetParentObjectTableIndex
Definition: wdffuncenum.h:139
@ WdfDpcEnqueueTableIndex
Definition: wdffuncenum.h:137
@ WdfDpcCreateTableIndex
Definition: wdffuncenum.h:136
#define WDFAPI
Definition: wdftypes.h:53
#define FORCEINLINE
Definition: wdftypes.h:67
HANDLE WDFOBJECT
Definition: wdftypes.h:114
struct _KDPC * PKDPC