mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
- Implement handling a FastDeviceIoControl path (not yet used in portcls)
svn path=/trunk/; revision=40633
This commit is contained in:
parent
e84dcfd61b
commit
d9e5339b37
1 changed files with 18 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue