ntoskrnl: Copy the IRP I/O status block to the user I/O status block in IoCompleteRequest().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-02-10 21:42:36 -06:00 committed by Alexandre Julliard
parent eb5d94953a
commit c4cd339a21
2 changed files with 3 additions and 2 deletions

View File

@ -1941,6 +1941,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
if (irp->Flags & IRP_DEALLOCATE_BUFFER)
HeapFree( GetProcessHeap(), 0, irp->AssociatedIrp.SystemBuffer );
if (irp->UserIosb) *irp->UserIosb = irp->IoStatus;
if (irp->UserEvent) KeSetEvent( irp->UserEvent, IO_NO_INCREMENT, FALSE );
IoFreeIrp( irp );

View File

@ -877,8 +877,8 @@ static void test_call_driver(DEVICE_OBJECT *device)
irp->IoStatus.Status = STATUS_SUCCESS;
irp->IoStatus.Information = 123;
IoCompleteRequest(irp, IO_NO_INCREMENT);
todo_wine ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status);
todo_wine ok(iosb.Information == 123, "got information %#x\n", iosb.Information);
ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status);
ok(iosb.Information == 123, "got information %#x\n", iosb.Information);
KeInitializeEvent(&event, NotificationEvent, FALSE);