ReactOS 0.4.15-dev-8241-g63935f8
vfpriv.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5Module Name:
6
7 vfpriv.hpp
8
9Abstract:
10
11 common header file for verifier
12
13Author:
14
15
16
17Environment:
18
19 user/kernel mode
20
21Revision History:
22
23--*/
24
25#if FX_CORE_MODE==FX_CORE_KERNEL_MODE
26#include "vfprivkm.hpp"
27#else if ((FX_CORE_MODE)==(FX_CORE_USER_MODE))
28#include "vfprivum.hpp"
29#endif
30
31extern "C" {
32#include "fxdynamics.h"
33}
34#include "vfeventhooks.hpp"
35
36
37#define FX_ENHANCED_VERIFIER_SECTION_NAME WDF_FX_VF_SECTION_NAME
38
39#define GET_CONTEXT(_objectHandle, _type) \
40 (_type *)VfWdfObjectGetTypedContext(_objectHandle, WDF_GET_CONTEXT_TYPE_INFO(_type));
41
42#define SET_HOOK_IF_CALLBACK_PRESENT(Source, Target, Name) \
43 if ((Source)-> ## Name != NULL) { \
44 (Target)-> ## Name = Vf ## Name; \
45 }
46
47typedef struct _VF_HOOK_PROCESS_INFO {
48 //
49 // Return status of the DDI of called by hook routine.
50 // this will be returned by stub if it does not call the DDI (since
51 // hook already called.
52 //
54
55 //
56 // Whether kmdf lib needs to be called after hook functin returns
57 //
59
61
63
65
67
69
71
73
75
77
79
81
83
85
87
88extern "C" {
89
94 __in
96 __in
98 );
99
105 __out PVOID* ContextHeader
106 );
107
111 __in PVOID ContextHeader,
115 );
116
120 __inout PVF_HOOK_PROCESS_INFO HookProcessInfo,
124 __out WDFDEVICE* Device
125 );
126
130 __inout PVF_HOOK_PROCESS_INFO HookProcessInfo,
132 __in WDFDEVICE Device,
135 __out WDFQUEUE* Queue
136 );
137
138} // extern "C"
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define __out_opt
Definition: dbghelp.h:65
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __out
Definition: dbghelp.h:62
DriverGlobals
ULONG Handle
Definition: gdb_input.c:15
__in WDFOBJECT __in PCWDF_OBJECT_CONTEXT_TYPE_INFO TypeInfo
Definition: handleapi.cpp:601
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define FASTCALL
Definition: nt_native.h:50
PWDF_DRIVER_GLOBALS DriverGlobals
Definition: vfpriv.hpp:64
BOOLEAN DonotCallKmdfLib
Definition: vfpriv.hpp:58
VF_COMMON_CONTEXT_HEADER CommonHeader
Definition: vfpriv.hpp:70
WDF_PNPPOWER_EVENT_CALLBACKS PnpPowerEventCallbacksOriginal
Definition: vfpriv.hpp:72
VF_COMMON_CONTEXT_HEADER CommonHeader
Definition: vfpriv.hpp:80
WDF_IO_QUEUE_CONFIG IoQueueConfigOriginal
Definition: vfpriv.hpp:82
uint32_t ULONG
Definition: typedefs.h:59
struct _VF_HOOK_PROCESS_INFO * PVF_HOOK_PROCESS_INFO
struct _VF_HOOK_PROCESS_INFO VF_HOOK_PROCESS_INFO
_Must_inspect_result_ NTSTATUS AddEventHooksWdfIoQueueCreate(__inout PVF_HOOK_PROCESS_INFO HookProcessInfo, __in PWDF_DRIVER_GLOBALS DriverGlobals, __in WDFDEVICE Device, __in PWDF_IO_QUEUE_CONFIG Config, __in PWDF_OBJECT_ATTRIBUTES QueueAttributes, __out WDFQUEUE *Queue)
Definition: verifier.cpp:250
_Must_inspect_result_ NTSTATUS AddEventHooksWdfDeviceCreate(__inout PVF_HOOK_PROCESS_INFO HookProcessInfo, __in PWDF_DRIVER_GLOBALS DriverGlobals, __in PWDFDEVICE_INIT *DeviceInit, __in PWDF_OBJECT_ATTRIBUTES DeviceAttributes, __out WDFDEVICE *Device)
Definition: verifier.cpp:52
struct _VF_WDFIOQUEUECREATE_CONTEXT VF_WDFIOQUEUECREATE_CONTEXT
struct _VF_COMMON_CONTEXT_HEADER VF_COMMON_CONTEXT_HEADER
_Must_inspect_result_ NTSTATUS VfAllocateContext(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __out PVOID *ContextHeader)
Definition: verifier.cpp:502
struct _VF_WDFIOQUEUECREATE_CONTEXT * PVF_WDFIOQUEUECREATE_CONTEXT
struct _VF_WDFDEVICECREATE_CONTEXT * PVF_WDFDEVICECREATE_CONTEXT
struct _VF_WDFDEVICECREATE_CONTEXT VF_WDFDEVICECREATE_CONTEXT
_Must_inspect_result_ NTSTATUS VfAddContextToHandle(__in PVOID ContextHeader, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in WDFOBJECT Handle, __out_opt PVOID *Context)
Definition: verifier.cpp:576
_Must_inspect_result_ PVOID FASTCALL VfWdfObjectGetTypedContext(__in WDFOBJECT Handle, __in PCWDF_OBJECT_CONTEXT_TYPE_INFO TypeInfo)
Definition: verifier.cpp:424
struct _VF_COMMON_CONTEXT_HEADER * PVF_COMMON_CONTEXT_HEADER
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_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
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225
_Must_inspect_result_ _Inout_ PWDFDEVICE_INIT _In_opt_ PWDF_OBJECT_ATTRIBUTES DeviceAttributes
Definition: wdfdevice.h:3563
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_IO_QUEUE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES QueueAttributes
Definition: wdfio.h:617
#define WDF_DECLARE_CONTEXT_TYPE(_contexttype)
Definition: wdfobject.h:259