Module: wine Branch: master Commit: b45395f589277c2d2d6874a3409f4d32bf19d33e URL: http://source.winehq.org/git/wine.git/?a=commit;h=b45395f589277c2d2d6874a340...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jul 8 18:56:42 2015 +0900
ntoskrnl: Forward IRP_MJ_CREATE and IRP_MJ_CLOSE requests to the loaded driver.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index bff3ca1..c2ffdf3 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -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;
- irp->IoStatus.u.Status = STATUS_SUCCESS; - IoCompleteRequest( irp, IO_NO_INCREMENT ); + 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;