ReactOS 0.4.15-dev-8408-g466a198
fltmgr_create.c File Reference
#include <kmt_test.h>
#include <fltkernel.h>
#include <debug.h>
Include dependency graph for fltmgr_create.c:

Go to the source code of this file.

Functions

static FLT_PREOP_CALLBACK_STATUS FLTAPI TestFilterPreOperation (_Inout_ PFLT_CALLBACK_DATA Data, _In_ PCFLT_RELATED_OBJECTS FltObjects, _Outptr_result_maybenull_ PVOID *CompletionContext)
 
static FLT_POSTOP_CALLBACK_STATUS FLTAPI TestFilterPostOperation (_Inout_ PFLT_CALLBACK_DATA Data, _In_ PCFLT_RELATED_OBJECTS FltObjects, _In_opt_ PVOID CompletionContext, _In_ FLT_POST_OPERATION_FLAGS Flags)
 
NTSTATUS TestEntry (IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING RegistryPath, OUT PCWSTR *DeviceName, IN OUT INT *Flags)
 
VOID TestFilterUnload (IN ULONG Flags)
 
VOID TestQueryTeardown (_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags)
 
NTSTATUS TestInstanceSetup (_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_SETUP_FLAGS Flags, _In_ DEVICE_TYPE VolumeDeviceType, _In_ FLT_FILESYSTEM_TYPE VolumeFilesystemType, _In_ PUNICODE_STRING VolumeName, _In_ ULONG SectorSize, _In_ ULONG ReportedSectorSize)
 

Variables

static PDRIVER_OBJECT TestDriverObject
 
CONST FLT_OPERATION_REGISTRATION Callbacks []
 

Function Documentation

◆ TestEntry()

NTSTATUS TestEntry ( IN PDRIVER_OBJECT  DriverObject,
IN PCUNICODE_STRING  RegistryPath,
OUT PCWSTR DeviceName,
IN OUT INT Flags 
)

Definition at line 51 of file fltmgr_create.c.

56{
58
59 PAGED_CODE();
60
63
64 DPRINT("Entry!\n");
65
66 ok_irql(PASSIVE_LEVEL);
68
69 *DeviceName = L"fltmgr_create";
70
71 trace("Hi, this is the filter manager create test driver\n");
72
74
75 return Status;
76}
#define PAGED_CODE()
#define VOID
Definition: acefi.h:82
#define trace
Definition: atltest.h:70
LONG NTSTATUS
Definition: precomp.h:26
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
CONST FLT_OPERATION_REGISTRATION Callbacks[]
Definition: fltmgr_create.c:39
static PDRIVER_OBJECT TestDriverObject
Definition: fltmgr_create.c:36
Status
Definition: gdiplustypes.h:25
NTSTATUS KmtFilterRegisterCallbacks(_In_ CONST FLT_OPERATION_REGISTRATION *OperationRegistration)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

◆ TestFilterPostOperation()

static FLT_POSTOP_CALLBACK_STATUS FLTAPI TestFilterPostOperation ( _Inout_ PFLT_CALLBACK_DATA  Data,
_In_ PCFLT_RELATED_OBJECTS  FltObjects,
_In_opt_ PVOID  CompletionContext,
_In_ FLT_POST_OPERATION_FLAGS  Flags 
)
static

Definition at line 136 of file fltmgr_create.c.

141{
142 PFLT_IO_PARAMETER_BLOCK Iopb = Data->Iopb;
143
145
147}
#define ok_eq_hex(value, expected)
Definition: apitest.h:77
@ FLT_POSTOP_FINISHED_PROCESSING
Definition: fltkernel.h:588
#define IRP_MJ_CREATE
Definition: rdpdr.c:44

◆ TestFilterPreOperation()

static FLT_PREOP_CALLBACK_STATUS FLTAPI TestFilterPreOperation ( _Inout_ PFLT_CALLBACK_DATA  Data,
_In_ PCFLT_RELATED_OBJECTS  FltObjects,
_Outptr_result_maybenull_ PVOID CompletionContext 
)
static

Definition at line 121 of file fltmgr_create.c.

125{
126 PFLT_IO_PARAMETER_BLOCK Iopb = Data->Iopb;
127
129
131}
@ FLT_PREOP_SUCCESS_NO_CALLBACK
Definition: fltkernel.h:574

◆ TestFilterUnload()

VOID TestFilterUnload ( IN ULONG  Flags)

Definition at line 79 of file fltmgr_create.c.

81{
82 PAGED_CODE();
83
84 DPRINT("Unload!\n");
85
86 ok_irql(PASSIVE_LEVEL);
87
88 trace("Unloading filter manager test driver\n");
89}

Referenced by FilterUnload().

◆ TestInstanceSetup()

NTSTATUS TestInstanceSetup ( _In_ PCFLT_RELATED_OBJECTS  FltObjects,
_In_ FLT_INSTANCE_SETUP_FLAGS  Flags,
_In_ DEVICE_TYPE  VolumeDeviceType,
_In_ FLT_FILESYSTEM_TYPE  VolumeFilesystemType,
_In_ PUNICODE_STRING  VolumeName,
_In_ ULONG  SectorSize,
_In_ ULONG  ReportedSectorSize 
)

Definition at line 101 of file fltmgr_create.c.

110{
111 trace("Received an attach request for VolumeType 0x%X, FileSystemType %d\n",
112 VolumeDeviceType,
113 VolumeFilesystemType);
114
116}
#define STATUS_FLT_DO_NOT_ATTACH
Definition: ntstatus.h:1436

Referenced by FilterInstanceSetup().

◆ TestQueryTeardown()

VOID TestQueryTeardown ( _In_ PCFLT_RELATED_OBJECTS  FltObjects,
_In_ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS  Flags 
)

Definition at line 92 of file fltmgr_create.c.

95{
96 UNREFERENCED_PARAMETER(FltObjects);
98}

Referenced by FilterQueryTeardown().

Variable Documentation

◆ Callbacks

Initial value:
=
{
0,
}
#define IRP_MJ_OPERATION_END
Definition: fltkernel.h:79
static FLT_PREOP_CALLBACK_STATUS FLTAPI TestFilterPreOperation(_Inout_ PFLT_CALLBACK_DATA Data, _In_ PCFLT_RELATED_OBJECTS FltObjects, _Outptr_result_maybenull_ PVOID *CompletionContext)
static FLT_POSTOP_CALLBACK_STATUS FLTAPI TestFilterPostOperation(_Inout_ PFLT_CALLBACK_DATA Data, _In_ PCFLT_RELATED_OBJECTS FltObjects, _In_opt_ PVOID CompletionContext, _In_ FLT_POST_OPERATION_FLAGS Flags)

Definition at line 39 of file fltmgr_create.c.

Referenced by TestEntry().

◆ TestDriverObject

PDRIVER_OBJECT TestDriverObject
static

Definition at line 36 of file fltmgr_create.c.

Referenced by TestEntry().