ReactOS 0.4.15-dev-8119-g4fb2fdb
wdfcommonbuffer.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 WdfCommonBuffer.h
10
11Abstract:
12
13 WDF CommonBuffer support
14
15Environment:
16
17 Kernel mode only.
18
19Notes:
20
21Revision History:
22
23--*/
24
25//
26// NOTE: This header is generated by stubwork. Please make any
27// modifications to the corresponding template files
28// (.x or .y) and use stubwork to regenerate the header
29//
30
31#ifndef _WDFCOMMONBUFFER_H_
32#define _WDFCOMMONBUFFER_H_
33
34#ifndef WDF_EXTERN_C
35 #ifdef __cplusplus
36 #define WDF_EXTERN_C extern "C"
37 #define WDF_EXTERN_C_START extern "C" {
38 #define WDF_EXTERN_C_END }
39 #else
40 #define WDF_EXTERN_C
41 #define WDF_EXTERN_C_START
42 #define WDF_EXTERN_C_END
43 #endif
44#endif
45
47
48
49
50#if (NTDDI_VERSION >= NTDDI_WIN2K)
51
52
53
55 //
56 // Size of this structure in bytes
57 //
59
60 //
61 // Alignment requirement of the buffer address
62 //
64
66
68VOID
72 )
73{
75
76 Config->Size = sizeof(WDF_COMMON_BUFFER_CONFIG);
77 Config->AlignmentRequirement = AlignmentRequirement;
78}
79
80//
81// WDF Function: WdfCommonBufferCreate
82//
83typedef
88(STDCALL *PFN_WDFCOMMONBUFFERCREATE)(
89 _In_
91 _In_
92 WDFDMAENABLER DmaEnabler,
93 _In_
95 size_t Length,
98 _Out_
99 WDFCOMMONBUFFER* CommonBuffer
100 );
101
106WdfCommonBufferCreate(
107 _In_
108 WDFDMAENABLER DmaEnabler,
109 _In_
110 _When_(Length == 0, __drv_reportError(Length cannot be zero))
111 size_t Length,
114 _Out_
115 WDFCOMMONBUFFER* CommonBuffer
116 )
117{
119}
120
121//
122// WDF Function: WdfCommonBufferCreateWithConfig
123//
124typedef
127WDFAPI
129(STDCALL *PFN_WDFCOMMONBUFFERCREATEWITHCONFIG)(
130 _In_
132 _In_
133 WDFDMAENABLER DmaEnabler,
134 _In_
135 _When_(Length == 0, __drv_reportError(Length cannot be zero))
136 size_t Length,
137 _In_
141 _Out_
142 WDFCOMMONBUFFER* CommonBuffer
143 );
144
149WdfCommonBufferCreateWithConfig(
150 _In_
151 WDFDMAENABLER DmaEnabler,
152 _In_
153 _When_(Length == 0, __drv_reportError(Length cannot be zero))
154 size_t Length,
155 _In_
159 _Out_
160 WDFCOMMONBUFFER* CommonBuffer
161 )
162{
164}
165
166//
167// WDF Function: WdfCommonBufferGetAlignedVirtualAddress
168//
169typedef
171WDFAPI
172PVOID
173(STDCALL *PFN_WDFCOMMONBUFFERGETALIGNEDVIRTUALADDRESS)(
174 _In_
176 _In_
177 WDFCOMMONBUFFER CommonBuffer
178 );
179
182PVOID
183WdfCommonBufferGetAlignedVirtualAddress(
184 _In_
185 WDFCOMMONBUFFER CommonBuffer
186 )
187{
188 return ((PFN_WDFCOMMONBUFFERGETALIGNEDVIRTUALADDRESS) WdfFunctions[WdfCommonBufferGetAlignedVirtualAddressTableIndex])(WdfDriverGlobals, CommonBuffer);
189}
190
191//
192// WDF Function: WdfCommonBufferGetAlignedLogicalAddress
193//
194typedef
196WDFAPI
198(STDCALL *PFN_WDFCOMMONBUFFERGETALIGNEDLOGICALADDRESS)(
199 _In_
201 _In_
202 WDFCOMMONBUFFER CommonBuffer
203 );
204
208WdfCommonBufferGetAlignedLogicalAddress(
209 _In_
210 WDFCOMMONBUFFER CommonBuffer
211 )
212{
213 return ((PFN_WDFCOMMONBUFFERGETALIGNEDLOGICALADDRESS) WdfFunctions[WdfCommonBufferGetAlignedLogicalAddressTableIndex])(WdfDriverGlobals, CommonBuffer);
214}
215
216//
217// WDF Function: WdfCommonBufferGetLength
218//
219typedef
221WDFAPI
222size_t
223(STDCALL *PFN_WDFCOMMONBUFFERGETLENGTH)(
224 _In_
226 _In_
227 WDFCOMMONBUFFER CommonBuffer
228 );
229
232size_t
233WdfCommonBufferGetLength(
234 _In_
235 WDFCOMMONBUFFER CommonBuffer
236 )
237{
238 return ((PFN_WDFCOMMONBUFFERGETLENGTH) WdfFunctions[WdfCommonBufferGetLengthTableIndex])(WdfDriverGlobals, CommonBuffer);
239}
240
241
242
243#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
244
245
247
248#endif // _WDFCOMMONBUFFER_H_
249
LONG NTSTATUS
Definition: precomp.h:26
#define NTSTATUS
Definition: precomp.h:21
__kernel_size_t size_t
Definition: linux.h:237
#define __drv_reportError(why)
Definition: driverspecs.h:320
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define PHYSICAL_ADDRESS
Definition: env_spec_w32.h:53
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
DriverGlobals
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
int zero
Definition: sehframes.cpp:29
void * PVOID
Definition: typedefs.h:50
#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_ PWDF_COMMON_BUFFER_CONFIG Config
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
#define WDF_EXTERN_C_END
_Must_inspect_result_ _In_ WDFDMAENABLER DmaEnabler
#define WDF_EXTERN_C_START
WDF_EXTERN_C_START struct _WDF_COMMON_BUFFER_CONFIG WDF_COMMON_BUFFER_CONFIG
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFCOMMONBUFFER * CommonBuffer
WDF_EXTERN_C_START struct _WDF_COMMON_BUFFER_CONFIG * PWDF_COMMON_BUFFER_CONFIG
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _When_(Length==0, __drv_reportError(Length cannot be zero)) size_t Length
FORCEINLINE VOID WDF_COMMON_BUFFER_CONFIG_INIT(_Out_ PWDF_COMMON_BUFFER_CONFIG Config, _In_ ULONG AlignmentRequirement)
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFCOMMONBUFFERCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
_In_ WDFDEVICE _In_ ULONG AlignmentRequirement
Definition: wdfdevice.h:2854
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfCommonBufferCreateTableIndex
Definition: wdffuncenum.h:46
@ WdfCommonBufferGetAlignedLogicalAddressTableIndex
Definition: wdffuncenum.h:48
@ WdfCommonBufferCreateWithConfigTableIndex
Definition: wdffuncenum.h:408
@ WdfCommonBufferGetAlignedVirtualAddressTableIndex
Definition: wdffuncenum.h:47
@ WdfCommonBufferGetLengthTableIndex
Definition: wdffuncenum.h:49
#define WDFAPI
Definition: wdftypes.h:53
#define FORCEINLINE
Definition: wdftypes.h:67