Commit b45395f5 authored by Alexandre Julliard's avatar Alexandre Julliard

ntoskrnl: Forward IRP_MJ_CREATE and IRP_MJ_CLOSE requests to the loaded driver.

parent bf269501
......@@ -183,6 +183,8 @@ static NTSTATUS dispatch_create( const irp_params_t *params, void *in_buff, ULON
irp->UserIosb = irp_handle; /* note: we abuse UserIosb to store the server irp handle */
irp->UserEvent = NULL;
if (device->DriverObject->MajorFunction[IRP_MJ_CREATE]) return dispatch_irp( device, irp );
irp->IoStatus.u.Status = STATUS_SUCCESS;
IoCompleteRequest( irp, IO_NO_INCREMENT );
return STATUS_SUCCESS;
......@@ -226,8 +228,12 @@ static NTSTATUS dispatch_close( const irp_params_t *params, void *in_buff, ULONG
irp->UserIosb = irp_handle; /* note: we abuse UserIosb to store the server irp handle */
irp->UserEvent = NULL;
if (!device->DriverObject->MajorFunction[IRP_MJ_CLOSE])
{
irp->IoStatus.u.Status = STATUS_SUCCESS;
IoCompleteRequest( irp, IO_NO_INCREMENT );
}
else dispatch_irp( device, irp );
HeapFree( GetProcessHeap(), 0, file ); /* FIXME: async close processing not supported */
return STATUS_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment