ReactOS 0.4.15-dev-5666-gc548b97
wdfqueryinterface.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 WdfQueryInterface.h
10
11Abstract:
12
13 This file contains the DDIs for handling query interface
14
15Environment:
16
17 kernel mode only
18
19Revision History:
20
21--*/
22
23//
24// NOTE: This header is generated by stubwork. Please make any
25// modifications to the corresponding template files
26// (.x or .y) and use stubwork to regenerate the header
27//
28
29#ifndef _WDFQUERYINTERFACE_H_
30#define _WDFQUERYINTERFACE_H_
31
32#ifndef WDF_EXTERN_C
33 #ifdef __cplusplus
34 #define WDF_EXTERN_C extern "C"
35 #define WDF_EXTERN_C_START extern "C" {
36 #define WDF_EXTERN_C_END }
37 #else
38 #define WDF_EXTERN_C
39 #define WDF_EXTERN_C_START
40 #define WDF_EXTERN_C_END
41 #endif
42#endif
43
45
46
47
48#if (NTDDI_VERSION >= NTDDI_WIN2K)
49
50
51
52typedef
53_Function_class_(EVT_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST)
58EVT_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST(
59 _In_
60 WDFDEVICE Device,
61 _In_
67 );
68
69typedef EVT_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST *PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST;
70
72 //
73 // Size of this structure in bytes.
74 //
76
77 //
78 // Interface to be returned to the caller. Optional if BehaviorType is set
79 // to WdfQueryInterfaceTypePassThrough or ImportInterface is set to TRUE.
80 //
82
83 //
84 // The GUID identifying the interface
85 //
87
88 //
89 // Valid only for PDOs. The framework will allocate a new request and
90 // forward it down the parent's device stack.
91 //
93
94 //
95 // Driver supplied callback which is called after some basic interface
96 // validation has been performed (size, version, and guid checking). This
97 // is an optional parameter and may be NULL unless ImportInterface is
98 // specified.
99 //
100 // If the callback returns !NT_SUCCESS, this error will be returned to the
101 // caller and the query interface will fail.
102 //
103 // In this callback, the caller is free to modify the ExposedInterface in
104 // any manner of its choosing. For instance, the callback may change any
105 // field in the interface. The callback may also alloate a dynamic context
106 // to be associated with the interface; the InterfaceReference and
107 // InterfaceDereference functions may also be overridden.
108 //
109 // If ImportInterface is set to TRUE, then this is a required field and the
110 // callback must initialize the interface (the framework will leave the
111 // ExposedInterface buffer exactly as it received it) since the framework
112 // has no way of knowing which fields to fill in and which to leave alone.
113 //
115
116 //
117 // If TRUE, the interface provided by the caller contains data that the
118 // driver is interested in. By setting to this field to TRUE, the
119 // EvtDeviceProcessQueryInterfaceRequest callback must initialize the
120 // ExposedInterface.
121 //
122 // If FALSE, the entire ExposedInterface is initialized through a memory
123 // copy before the EvtDeviceProcessQueryInterfaceRequest is called.
124 //
126
128
130VOID
135 _In_opt_ PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST EvtDeviceProcessQueryInterfaceRequest
136 )
137{
139
141 InterfaceConfig->Interface = Interface;
142 InterfaceConfig->InterfaceType = InterfaceType;
143 InterfaceConfig->EvtDeviceProcessQueryInterfaceRequest =
144 EvtDeviceProcessQueryInterfaceRequest;
145}
146
147//
148// WDF Function: WdfDeviceAddQueryInterface
149//
150typedef
153WDFAPI
155(STDCALL *PFN_WDFDEVICEADDQUERYINTERFACE)(
156 _In_
158 _In_
159 WDFDEVICE Device,
160 _In_
162 );
163
168WdfDeviceAddQueryInterface(
169 _In_
170 WDFDEVICE Device,
171 _In_
173 )
174{
176}
177
178
179
180//
181// The following functions can be assigned to INTERFACE::InterfaceReference
182// and INTERFACE::InterfaceDeference
183//
184// o WdfDeviceInterfaceReferenceNoOp
185// o WdfDeviceInterfaceDereferenceNoOp
186//
187// Thes 2 functions do nothing when called. These are appropriate for
188// interfaces which can be queried for and used independent of the PNP state of
189// the WDFDEVICE the interface was retrieved from.
190//
192VOID
195 )
196{
198}
199
201VOID
204 )
205{
207}
208
209#endif // (NTDDI_VERSION >= NTDDI_WIN2K)
210
211
212
214
215#endif // _WDFQUERYINTERFACE_H_
216
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define NTSTATUS
Definition: precomp.h:20
#define _IRQL_requires_same_
Definition: driverspecs.h:232
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
DriverGlobals
unsigned int ULONG
Definition: retypes.h:1
#define _Function_class_(x)
Definition: ms_sal.h:2946
#define _Inout_
Definition: ms_sal.h:378
#define _Inout_opt_
Definition: ms_sal.h:379
#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
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define CONST
Definition: pedump.c:81
PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST EvtDeviceProcessQueryInterfaceRequest
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STDCALL
Definition: wdf.h:45
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:463
PWDF_DRIVER_GLOBALS WdfDriverGlobals
@ WdfDeviceAddQueryInterfaceTableIndex
Definition: wdffuncenum.h:253
#define WDF_EXTERN_C_END
_Must_inspect_result_ _In_ WDFDEVICE Device
WDF_EXTERN_C_START typedef _In_ LPGUID InterfaceType
WDF_EXTERN_C_START typedef _In_ LPGUID _Inout_ PINTERFACE ExposedInterface
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFDEVICEADDQUERYINTERFACE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
struct _WDF_QUERY_INTERFACE_CONFIG * PWDF_QUERY_INTERFACE_CONFIG
FORCEINLINE VOID WdfDeviceInterfaceDereferenceNoOp(_In_ PVOID Context)
#define WDF_EXTERN_C_START
WDF_EXTERN_C_START typedef _In_ LPGUID _Inout_ PINTERFACE _Inout_opt_ PVOID ExposedInterfaceSpecificData
struct _WDF_QUERY_INTERFACE_CONFIG WDF_QUERY_INTERFACE_CONFIG
EVT_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST * PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_QUERY_INTERFACE_CONFIG InterfaceConfig
FORCEINLINE VOID WdfDeviceInterfaceReferenceNoOp(_In_ PVOID Context)
FORCEINLINE VOID WDF_QUERY_INTERFACE_CONFIG_INIT(_Out_ PWDF_QUERY_INTERFACE_CONFIG InterfaceConfig, _In_opt_ PINTERFACE Interface, _In_ CONST GUID *InterfaceType, _In_opt_ PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST EvtDeviceProcessQueryInterfaceRequest)
#define WDFAPI
Definition: wdftypes.h:53
#define FORCEINLINE
Definition: wdftypes.h:67