ReactOS 0.4.15-dev-8344-g0574987
wdfworkitem.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 wdfworkitem.h
10
11Abstract:
12
13 This is the Windows Driver Framework work item DDIs
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 _WDFWORKITEM_H_
27#define _WDFWORKITEM_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 WorkItem fires.
52//
53typedef
54_Function_class_(EVT_WDF_WORKITEM)
57VOID
59EVT_WDF_WORKITEM(
60 _In_
61 WDFWORKITEM WorkItem
62 );
63
64typedef EVT_WDF_WORKITEM *PFN_WDF_WORKITEM;
65
66typedef struct _WDF_WORKITEM_CONFIG {
67
69
71
72 //
73 // If this is TRUE, the workitem will automatically serialize
74 // with the event callback handlers of its Parent Object.
75 //
76 // Parent Object's callback constraints should be compatible
77 // with the work item (PASSIVE_LEVEL), or the request will fail.
78 //
80
82
84VOID
87 _In_ PFN_WDF_WORKITEM EvtWorkItemFunc
88 )
89{
91 Config->Size = sizeof(WDF_WORKITEM_CONFIG);
92 Config->EvtWorkItemFunc = EvtWorkItemFunc;
93
94 Config->AutomaticSerialization = TRUE;
95}
96
97
98//
99// WDF Function: WdfWorkItemCreate
100//
101typedef
104WDFAPI
106(STDCALL *PFN_WDFWORKITEMCREATE)(
107 _In_
109 _In_
111 _In_
113 _Out_
114 WDFWORKITEM* WorkItem
115 );
116
121WdfWorkItemCreate(
122 _In_
124 _In_
126 _Out_
127 WDFWORKITEM* WorkItem
128 )
129{
131}
132
133//
134// WDF Function: WdfWorkItemEnqueue
135//
136typedef
138WDFAPI
139VOID
140(STDCALL *PFN_WDFWORKITEMENQUEUE)(
141 _In_
143 _In_
144 WDFWORKITEM WorkItem
145 );
146
149VOID
150WdfWorkItemEnqueue(
151 _In_
152 WDFWORKITEM WorkItem
153 )
154{
156}
157
158//
159// WDF Function: WdfWorkItemGetParentObject
160//
161typedef
163WDFAPI
165(STDCALL *PFN_WDFWORKITEMGETPARENTOBJECT)(
166 _In_
168 _In_
169 WDFWORKITEM WorkItem
170 );
171
175WdfWorkItemGetParentObject(
176 _In_
177 WDFWORKITEM WorkItem
178 )
179{
180 return ((PFN_WDFWORKITEMGETPARENTOBJECT) WdfFunctions[WdfWorkItemGetParentObjectTableIndex])(WdfDriverGlobals, WorkItem);
181}
182
183//
184// WDF Function: WdfWorkItemFlush
185//
186typedef
188WDFAPI
189VOID
190(STDCALL *PFN_WDFWORKITEMFLUSH)(
191 _In_
193 _In_
194 WDFWORKITEM WorkItem
195 );
196
199VOID
200WdfWorkItemFlush(
201 _In_
202 WDFWORKITEM WorkItem
203 )
204{
206}
207
208
209
210#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
211
212
214
215#endif // _WDFWORKITEM_H_
216
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
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 PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#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 _In_
Definition: ms_sal.h:308
BOOLEAN AutomaticSerialization
Definition: wdfworkitem.h:79
PFN_WDF_WORKITEM EvtWorkItemFunc
Definition: wdfworkitem.h:70
#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
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfWorkItemCreateTableIndex
Definition: wdffuncenum.h:404
@ WdfWorkItemFlushTableIndex
Definition: wdffuncenum.h:407
@ WdfWorkItemEnqueueTableIndex
Definition: wdffuncenum.h:405
@ WdfWorkItemGetParentObjectTableIndex
Definition: wdffuncenum.h:406
#define WDFAPI
Definition: wdftypes.h:53
#define FORCEINLINE
Definition: wdftypes.h:67
HANDLE WDFOBJECT
Definition: wdftypes.h:114
#define WDF_EXTERN_C_END
Definition: wdfworkitem.h:37
#define WDF_EXTERN_C_START
Definition: wdfworkitem.h:36
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition: wdfworkitem.h:112
FORCEINLINE VOID WDF_WORKITEM_CONFIG_INIT(_Out_ PWDF_WORKITEM_CONFIG Config, _In_ PFN_WDF_WORKITEM EvtWorkItemFunc)
Definition: wdfworkitem.h:85
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:115
EVT_WDF_WORKITEM * PFN_WDF_WORKITEM
Definition: wdfworkitem.h:64
struct _WDF_WORKITEM_CONFIG WDF_WORKITEM_CONFIG
struct _WDF_WORKITEM_CONFIG * PWDF_WORKITEM_CONFIG
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG Config
Definition: wdfworkitem.h:110
_Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFWORKITEMCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfworkitem.h:103