ReactOS  0.4.14-dev-57-g333b8f1
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 UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS KmtFilterRegisterCallbacks(_In_ CONST FLT_OPERATION_REGISTRATION *OperationRegistration)
WCHAR DeviceName[]
Definition: adapter.cpp:21
#define PAGED_CODE()
Definition: video.h:57
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
void DPRINT(...)
Definition: polytest.cpp:61
#define trace
Definition: atltest.h:70
static const WCHAR L[]
Definition: oid.c:1250
#define VOID
Definition: acefi.h:82
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
Status
Definition: gdiplustypes.h:24
static PDRIVER_OBJECT TestDriverObject
Definition: fltmgr_create.c:36
CONST FLT_OPERATION_REGISTRATION Callbacks[]
Definition: fltmgr_create.c:39
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
return STATUS_SUCCESS
Definition: btrfs.c:2966

◆ 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 IRP_MJ_CREATE
Definition: rdpdr.c:44
#define ok_eq_hex(value, expected)

◆ 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 }
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define ok_eq_hex(value, expected)

◆ 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 }
#define PAGED_CODE()
Definition: video.h:57
void DPRINT(...)
Definition: polytest.cpp:61
#define trace
Definition: atltest.h:70
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693

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 trace
Definition: atltest.h:70
#define STATUS_FLT_DO_NOT_ATTACH
Definition: ntstatus.h:1218

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 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by FilterQueryTeardown().

Variable Documentation

◆ Callbacks

Initial value:
=
{
0,
}
static FLT_PREOP_CALLBACK_STATUS FLTAPI TestFilterPreOperation(_Inout_ PFLT_CALLBACK_DATA Data, _In_ PCFLT_RELATED_OBJECTS FltObjects, _Outptr_result_maybenull_ PVOID *CompletionContext)
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
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)
#define IRP_MJ_OPERATION_END
Definition: fltkernel.h:79

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().