ntoskrnl.exe: Implement IoBuildAsynchronousFsdRequest.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-05-02 13:20:52 +02:00 committed by Alexandre Julliard
parent d5a6a2675c
commit a11cdd2231
3 changed files with 29 additions and 9 deletions

View File

@ -1366,18 +1366,17 @@ PIRP WINAPI IoBuildDeviceIoControlRequest( ULONG code, PDEVICE_OBJECT device,
return irp; return irp;
} }
/***********************************************************************
/********************************************************** * IoBuildAsynchronousFsdRequest (NTOSKRNL.EXE.@)
* IoBuildSynchronousFsdRequest (NTOSKRNL.EXE.@)
*/ */
PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG majorfunc, PDEVICE_OBJECT device, PIRP WINAPI IoBuildAsynchronousFsdRequest(ULONG majorfunc, DEVICE_OBJECT *device,
PVOID buffer, ULONG length, PLARGE_INTEGER startoffset, void *buffer, ULONG length, LARGE_INTEGER *startoffset,
PKEVENT event, PIO_STATUS_BLOCK iosb) IO_STATUS_BLOCK *iosb)
{ {
PIRP irp; PIRP irp;
PIO_STACK_LOCATION irpsp; PIO_STACK_LOCATION irpsp;
TRACE("(%d %p %p %d %p %p %p)\n", majorfunc, device, buffer, length, startoffset, event, iosb); TRACE( "(%d %p %p %d %p %p)\n", majorfunc, device, buffer, length, startoffset, iosb );
if (!(irp = IoAllocateIrp( device->StackSize, FALSE ))) return NULL; if (!(irp = IoAllocateIrp( device->StackSize, FALSE ))) return NULL;
@ -1414,11 +1413,31 @@ PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG majorfunc, PDEVICE_OBJECT device,
} }
irp->RequestorMode = KernelMode; irp->RequestorMode = KernelMode;
irp->UserIosb = iosb; irp->UserIosb = iosb;
irp->UserEvent = event; irp->UserEvent = NULL;
irp->UserBuffer = buffer; irp->UserBuffer = buffer;
return irp; return irp;
} }
/***********************************************************************
* IoBuildSynchronousFsdRequest (NTOSKRNL.EXE.@)
*/
PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG majorfunc, PDEVICE_OBJECT device,
PVOID buffer, ULONG length, PLARGE_INTEGER startoffset,
PKEVENT event, PIO_STATUS_BLOCK iosb)
{
IRP *irp;
TRACE("(%d %p %p %d %p %p)\n", majorfunc, device, buffer, length, startoffset, iosb);
irp = IoBuildAsynchronousFsdRequest( majorfunc, device, buffer, length, startoffset, iosb );
if (!irp) return NULL;
irp->UserEvent = event;
return irp;
}
static void build_driver_keypath( const WCHAR *name, UNICODE_STRING *keypath ) static void build_driver_keypath( const WCHAR *name, UNICODE_STRING *keypath )
{ {
static const WCHAR driverW[] = {'\\','D','r','i','v','e','r','\\',0}; static const WCHAR driverW[] = {'\\','D','r','i','v','e','r','\\',0};

View File

@ -330,7 +330,7 @@
@ stub IoAttachDeviceByPointer @ stub IoAttachDeviceByPointer
@ stdcall IoAttachDeviceToDeviceStack(ptr ptr) @ stdcall IoAttachDeviceToDeviceStack(ptr ptr)
@ stub IoAttachDeviceToDeviceStackSafe @ stub IoAttachDeviceToDeviceStackSafe
@ stub IoBuildAsynchronousFsdRequest @ stdcall IoBuildAsynchronousFsdRequest(long ptr ptr long ptr ptr)
@ stdcall IoBuildDeviceIoControlRequest(long ptr ptr long ptr long long ptr ptr) @ stdcall IoBuildDeviceIoControlRequest(long ptr ptr long ptr long long ptr ptr)
@ stub IoBuildPartialMdl @ stub IoBuildPartialMdl
@ stdcall IoBuildSynchronousFsdRequest(long ptr ptr long ptr ptr ptr) @ stdcall IoBuildSynchronousFsdRequest(long ptr ptr long ptr ptr ptr)

View File

@ -1559,6 +1559,7 @@ PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN);
PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*); PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*);
PIO_WORKITEM WINAPI IoAllocateWorkItem(PDEVICE_OBJECT); PIO_WORKITEM WINAPI IoAllocateWorkItem(PDEVICE_OBJECT);
PDEVICE_OBJECT WINAPI IoAttachDeviceToDeviceStack(PDEVICE_OBJECT,PDEVICE_OBJECT); PDEVICE_OBJECT WINAPI IoAttachDeviceToDeviceStack(PDEVICE_OBJECT,PDEVICE_OBJECT);
PIRP WINAPI IoBuildAsynchronousFsdRequest(ULONG,DEVICE_OBJECT*,void*,ULONG,LARGE_INTEGER*,IO_STATUS_BLOCK*);
PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*); PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*);
PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PLARGE_INTEGER,PKEVENT,IO_STATUS_BLOCK*); PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PLARGE_INTEGER,PKEVENT,IO_STATUS_BLOCK*);
NTSTATUS WINAPI IoCallDriver(DEVICE_OBJECT*,IRP*); NTSTATUS WINAPI IoCallDriver(DEVICE_OBJECT*,IRP*);