ReactOS 0.4.16-dev-117-g38f21f9
Dispatch.c
Go to the documentation of this file.
1/*
2* PROJECT: Filesystem Filter Manager
3* LICENSE: GPL - See COPYING in the top level directory
4* FILE: drivers/filters/fltmgr/Dispatch.c
5* PURPOSE: Contains dispatch handler routines
6* PROGRAMMERS: Ged Murphy (gedmurphy@reactos.org)
7*/
8
9/* INCLUDES ******************************************************************/
10
11#include "fltmgr.h"
12#include "fltmgrint.h"
13#include "fltmgr_shared.h"
14
15#define NDEBUG
16#include <debug.h>
17
18
19/* DATA *********************************************************************/
20
25);
26
31);
32
33
34/* sdsfds *******************************************************************/
35
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}
101
105{
106 PIO_STACK_LOCATION StackPtr;
108 UNREFERENCED_PARAMETER(StackPtr);
109
110 // implement me
111
112 return STATUS_SUCCESS;
113}
114
115
116/* INTERNAL FUNCTIONS ******************************************************/
117
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}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
NTSTATUS HandleLoadUnloadIoctl(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: Dispatch.c:119
NTSTATUS FltpDispatchHandler(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: Dispatch.c:103
NTSTATUS HandleFindFirstIoctl(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
NTSTATUS FltpDeviceControlHandler(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: Dispatch.c:37
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
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
struct _FILTER_NAME * PFILTER_NAME
#define IOCTL_FILTER_SEND_MESSAGE
Definition: fltmgr_shared.h:8
Status
Definition: gdiplustypes.h:25
#define PCHAR
Definition: match.c:90
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
WCHAR * PWCH
Definition: ntbasedef.h:410
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define STATUS_SUCCESS
Definition: shellext.h:65
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55