From d9e5339b37a92194aca04782c45eeee8f9f06d53 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 21 Apr 2009 10:02:57 +0000 Subject: [PATCH] - Implement handling a FastDeviceIoControl path (not yet used in portcls) svn path=/trunk/; revision=40633 --- reactos/drivers/ksfilter/ks/misc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/reactos/drivers/ksfilter/ks/misc.c b/reactos/drivers/ksfilter/ks/misc.c index 1b2e15629e9..98ad7ff4002 100644 --- a/reactos/drivers/ksfilter/ks/misc.c +++ b/reactos/drivers/ksfilter/ks/misc.c @@ -265,6 +265,7 @@ KsSynchronousIoControlDevice( IN ULONG OutSize, OUT PULONG BytesReturned) { + PKSIOBJECT_HEADER ObjectHeader; PDEVICE_OBJECT DeviceObject; KEVENT Event; PIRP Irp; @@ -281,6 +282,23 @@ KsSynchronousIoControlDevice( if (!DeviceObject) return STATUS_UNSUCCESSFUL; + /* get object header */ + ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext; + /* check if there is fast device io function */ + if (ObjectHeader->DispatchTable.FastDeviceIoControl) + { + /* it is send the request */ + Status = ObjectHeader->DispatchTable.FastDeviceIoControl(FileObject, TRUE, InBuffer, InSize, OutBuffer, OutSize, IoControl, &IoStatusBlock, DeviceObject); + /* check if the request was handled */ + if (Status) + { + /* store bytes returned */ + *BytesReturned = IoStatusBlock.Information; + /* return status */ + return IoStatusBlock.Status; + } + } + /* initialize the event */ KeInitializeEvent(&Event, NotificationEvent, FALSE);