ReactOS 0.4.15-dev-7674-gc0b4db1
Dispatch.c File Reference
#include "fltmgr.h"
#include "fltmgrint.h"
#include "fltmgr_shared.h"
#include <debug.h>
Include dependency graph for Dispatch.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS HandleLoadUnloadIoctl (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
 
NTSTATUS HandleFindFirstIoctl (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
 
NTSTATUS FltpDeviceControlHandler (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
 
NTSTATUS FltpDispatchHandler (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 15 of file Dispatch.c.

Function Documentation

◆ FltpDeviceControlHandler()

NTSTATUS FltpDeviceControlHandler ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PIRP  Irp 
)

Definition at line 37 of file Dispatch.c.

39{
40 PIO_STACK_LOCATION StackPtr;
43
46
47 ControlCode = StackPtr->Parameters.DeviceIoControl.IoControlCode;
48 switch (ControlCode)
49 {
52 break;
53
56 break;
57
60 break;
61
64 break;
65
68 break;
69
72 break;
73
76 break;
77
80 break;
81
84 break;
85
88 break;
89
92 break;
93
94 default:
96 break;
97 }
98
99 return Status;
100}
NTSTATUS HandleLoadUnloadIoctl(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: Dispatch.c:119
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define FLT_ASSERT(_e)
Definition: fltkernel.h:49
#define IOCTL_FILTER_CREATE
Definition: fltmgr_shared.h:5
#define IOCTL_FILTER_DETATCH
Definition: fltmgr_shared.h:7
#define IOCTL_FILTER_UNLOAD
Definition: fltmgr_shared.h:4
#define IOCTL_FILTER_FIND_FIRST
Definition: fltmgr_shared.h:11
#define IOCTL_FILTER_GET_INFO
Definition: fltmgr_shared.h:13
#define IOCTL_FILTER_FIND_NEXT
Definition: fltmgr_shared.h:12
#define IOCTL_FILTER_GET_MESSAGE
Definition: fltmgr_shared.h:9
#define IOCTL_FILTER_REPLY_MESSAGE
Definition: fltmgr_shared.h:10
#define IOCTL_FILTER_ATTATCH
Definition: fltmgr_shared.h:6
#define IOCTL_FILTER_LOAD
Definition: fltmgr_shared.h:3
#define IOCTL_FILTER_SEND_MESSAGE
Definition: fltmgr_shared.h:8
Status
Definition: gdiplustypes.h:25
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793

Referenced by FltpDeviceControl().

◆ FltpDispatchHandler()

NTSTATUS FltpDispatchHandler ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PIRP  Irp 
)

Definition at line 103 of file Dispatch.c.

105{
106 PIO_STACK_LOCATION StackPtr;
108 UNREFERENCED_PARAMETER(StackPtr);
109
110 // implement me
111
112 return STATUS_SUCCESS;
113}
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_SUCCESS
Definition: shellext.h:65

Referenced by FltpDispatch().

◆ HandleFindFirstIoctl()

NTSTATUS HandleFindFirstIoctl ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PIRP  Irp 
)

◆ HandleLoadUnloadIoctl()

NTSTATUS HandleLoadUnloadIoctl ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PIRP  Irp 
)

Definition at line 119 of file Dispatch.c.

121{
122 PIO_STACK_LOCATION StackPtr;
124 PFILTER_NAME FilterName;
128
129 /* Get the IOCTL data from the stack pointer */
131 BufferLength = StackPtr->Parameters.DeviceIoControl.InputBufferLength;
132 ControlCode = StackPtr->Parameters.DeviceIoControl.IoControlCode;
133
135
136 /* Make sure the buffer is valid */
137 if (BufferLength < sizeof(FILTER_NAME))
139
140 /* Convert the file name buffer into a string */
141 FilterName = (PFILTER_NAME)Irp->AssociatedIrp.SystemBuffer;
142 Name.Length = FilterName->Length;
143 Name.MaximumLength = FilterName->Length;
144 Name.Buffer = (PWCH)((PCHAR)FilterName + FIELD_OFFSET(FILTER_NAME, FilterName[0]));
145
146 /* Forward the request to our Flt routines */
148 {
150 }
151 else
152 {
154 }
155
156 return Status;
157}
NTSTATUS NTAPI FltLoadFilter(_In_ PCUNICODE_STRING FilterName)
Definition: Filter.c:62
NTSTATUS NTAPI FltUnloadFilter(_In_ PCUNICODE_STRING FilterName)
Definition: Filter.c:86
struct NameRec_ * Name
Definition: cdprocs.h:460
struct _FILTER_NAME * PFILTER_NAME
#define PCHAR
Definition: match.c:90
WCHAR * PWCH
Definition: ntbasedef.h:410
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771

Referenced by FltpDeviceControlHandler().