ReactOS 0.4.16-dev-125-g798ea90
fltmgr_create.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS kernel-mode tests - Filter Manager
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Tests for checking the create operations
5 * PROGRAMMER: Ged Murphy <gedmurphy@reactos.org>
6 */
7
8#include <kmt_test.h>
9#include <fltkernel.h>
10
11//#define NDEBUG
12#include <debug.h>
13
14/* prototypes */
15static
17FLTAPI
20 _In_ PCFLT_RELATED_OBJECTS FltObjects,
22);
23
24static
26FLTAPI
29 _In_ PCFLT_RELATED_OBJECTS FltObjects,
32);
33
34
35/* Globals */
37
38
40{
42 0,
45
47};
48
49
55 IN OUT INT *Flags)
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}
77
78VOID
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}
90
91VOID
93 _In_ PCFLT_RELATED_OBJECTS FltObjects,
95{
96 UNREFERENCED_PARAMETER(FltObjects);
98}
99
102 _In_ PCFLT_RELATED_OBJECTS FltObjects,
104 _In_ DEVICE_TYPE VolumeDeviceType,
105 _In_ FLT_FILESYSTEM_TYPE VolumeFilesystemType,
108 _In_ ULONG ReportedSectorSize
109)
110{
111 trace("Received an attach request for VolumeType 0x%X, FileSystemType %d\n",
112 VolumeDeviceType,
113 VolumeFilesystemType);
114
116}
117
118static
120FLTAPI
123 _In_ PCFLT_RELATED_OBJECTS FltObjects,
125{
126 PFLT_IO_PARAMETER_BLOCK Iopb = Data->Iopb;
127
129
131}
132
133static
135FLTAPI
138 _In_ PCFLT_RELATED_OBJECTS FltObjects,
141{
142 PFLT_IO_PARAMETER_BLOCK Iopb = Data->Iopb;
143
145
147}
#define PAGED_CODE()
#define VOID
Definition: acefi.h:82
#define ok_eq_hex(value, expected)
Definition: apitest.h:77
#define trace
Definition: atltest.h:70
LONG NTSTATUS
Definition: precomp.h:26
#define DEVICE_TYPE
Definition: guid.c:10
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
Definition: fltkernel.h:1117
enum _FLT_POSTOP_CALLBACK_STATUS FLT_POSTOP_CALLBACK_STATUS
ULONG FLT_INSTANCE_SETUP_FLAGS
Definition: fltkernel.h:527
enum _FLT_PREOP_CALLBACK_STATUS FLT_PREOP_CALLBACK_STATUS
@ FLT_PREOP_SUCCESS_NO_CALLBACK
Definition: fltkernel.h:574
@ FLT_POSTOP_FINISHED_PROCESSING
Definition: fltkernel.h:588
ULONG FLT_INSTANCE_QUERY_TEARDOWN_FLAGS
Definition: fltkernel.h:552
#define IRP_MJ_OPERATION_END
Definition: fltkernel.h:79
ULONG FLT_POST_OPERATION_FLAGS
Definition: fltkernel.h:592
VOID TestQueryTeardown(_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags)
Definition: fltmgr_create.c:92
static FLT_PREOP_CALLBACK_STATUS FLTAPI TestFilterPreOperation(_Inout_ PFLT_CALLBACK_DATA Data, _In_ PCFLT_RELATED_OBJECTS FltObjects, _Outptr_result_maybenull_ PVOID *CompletionContext)
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)
VOID TestFilterUnload(IN ULONG Flags)
Definition: fltmgr_create.c:79
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)
CONST FLT_OPERATION_REGISTRATION Callbacks[]
Definition: fltmgr_create.c:39
static PDRIVER_OBJECT TestDriverObject
Definition: fltmgr_create.c:36
NTSTATUS TestEntry(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING RegistryPath, OUT PCWSTR *DeviceName, IN OUT INT *Flags)
Definition: fltmgr_create.c:51
Status
Definition: gdiplustypes.h:25
NTSTATUS KmtFilterRegisterCallbacks(_In_ CONST FLT_OPERATION_REGISTRATION *OperationRegistration)
#define _Inout_
Definition: ms_sal.h:378
#define _Outptr_result_maybenull_
Definition: ms_sal.h:428
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_FLT_DO_NOT_ATTACH
Definition: ntstatus.h:1436
#define L(x)
Definition: ntvdm.h:50
#define CONST
Definition: pedump.c:81
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_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
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE _In_opt_ __drv_aliasesMem WDFCONTEXT CompletionContext
Definition: wdfrequest.h:898
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ULONG SectorSize
Definition: halfuncs.h:291