Commit a78f8f29 authored by Alexandre Julliard's avatar Alexandre Julliard

ntoskrnl: Flesh out IoBuildSynchronousFsdRequest implementation.

parent c07a0561
......@@ -549,16 +549,30 @@ PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG majorfunc, PDEVICE_OBJECT device,
PIRP irp;
PIO_STACK_LOCATION irpsp;
FIXME("(%d %p %p %d %p %p %p) stub\n", majorfunc, device, buffer, length, startoffset, event, iosb);
TRACE("(%d %p %p %d %p %p %p)\n", majorfunc, device, buffer, length, startoffset, event, iosb);
irp = IoAllocateIrp( device->StackSize, FALSE );
if (irp == NULL)
return NULL;
if (!(irp = IoAllocateIrp( device->StackSize, FALSE ))) return NULL;
irpsp = IoGetNextIrpStackLocation( irp );
irpsp->MajorFunction = majorfunc;
/*irpsp->Parameters.DeviceIoControl.IoControlCode = IoControlCode;*/
irpsp->DeviceObject = device;
irpsp->CompletionRoutine = NULL;
irp->AssociatedIrp.SystemBuffer = buffer;
if (device->Flags & DO_DIRECT_IO) IoAllocateMdl( buffer, length, FALSE, FALSE, irp );
switch (majorfunc)
{
case IRP_MJ_READ:
irpsp->Parameters.Read.Length = length;
irpsp->Parameters.Read.ByteOffset = *startoffset;
break;
case IRP_MJ_WRITE:
irpsp->Parameters.Write.Length = length;
irpsp->Parameters.Write.ByteOffset = *startoffset;
break;
}
irp->RequestorMode = KernelMode;
irp->UserIosb = iosb;
irp->UserEvent = event;
irp->UserBuffer = buffer;
......
......@@ -1201,6 +1201,7 @@ PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR);
PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN);
PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*);
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*);
NTSTATUS WINAPI IoCallDriver(DEVICE_OBJECT*,IRP*);
VOID WINAPI IoCompleteRequest(IRP*,UCHAR);
NTSTATUS WINAPI IoCreateDevice(DRIVER_OBJECT*,ULONG,UNICODE_STRING*,DEVICE_TYPE,ULONG,BOOLEAN,DEVICE_OBJECT**);
......
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