mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
- Implement PcForwardIrpSynchronous
svn path=/trunk/; revision=38762
This commit is contained in:
parent
be69d2aa50
commit
f8e5a94969
1 changed files with 40 additions and 4 deletions
|
@ -119,7 +119,7 @@ PortClsPnp(
|
|||
if ( ! NT_SUCCESS(status) )
|
||||
{
|
||||
DPRINT("StartDevice returned a failure code [0x%8x]\n", status);
|
||||
resource_list->lpVtbl->Release(resource_list);
|
||||
//resource_list->lpVtbl->Release(resource_list);
|
||||
|
||||
Irp->IoStatus.Status = status;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
@ -261,14 +261,50 @@ PcCompleteIrp(
|
|||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
IrpCompletionRoutine(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN PVOID Context)
|
||||
{
|
||||
KeSetEvent((PRKEVENT)Context, IO_NO_INCREMENT, FALSE);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
PcForwardIrpSynchronous(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
KEVENT Event;
|
||||
PCExtension* DeviceExt;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT1("PcRegisterSubdevice\n");
|
||||
|
||||
DeviceExt = (PCExtension*)DeviceObject->DeviceExtension;
|
||||
|
||||
/* initialize the notification event */
|
||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||
|
||||
/* setup a completion routine */
|
||||
IoSetCompletionRoutine(Irp, IrpCompletionRoutine, (PVOID)&Event, TRUE, FALSE, FALSE);
|
||||
|
||||
/* now call the driver */
|
||||
Status = IoCallDriver(DeviceExt->PrevDeviceObject, Irp);
|
||||
/* did the request complete yet */
|
||||
if (Status == STATUS_PENDING)
|
||||
{
|
||||
/* not yet, lets wait a bit */
|
||||
KeWaitForSingleObject(&Event, Executive, FALSE, FALSE, NULL);
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue