Author: tfaber
Date: Sun Sep 6 10:45:37 2015
New Revision: 69053
URL:
http://svn.reactos.org/svn/reactos?rev=69053&view=rev
Log:
[VIDEOPRT]
- Correctly stub power IRP handling. Fixes IRP leaks on shutdown.
- Correctly stub IntVideoPortDispatchSystemControl to avoid IRP leak.
CORE-10117 CORE-10105
Modified:
trunk/reactos/win32ss/drivers/videoprt/dispatch.c
Modified: trunk/reactos/win32ss/drivers/videoprt/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/d…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/dispatch.c [iso-8859-1] Sun Sep 6 10:45:37
2015
@@ -834,7 +834,32 @@
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
- return STATUS_NOT_IMPLEMENTED;
+ PIO_STACK_LOCATION IrpSp;
+ NTSTATUS Status = Irp->IoStatus.Status;
+ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
+
+ IrpSp = IoGetCurrentIrpStackLocation(Irp);
+
+ if (DeviceExtension->Common.Fdo)
+ {
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(DeviceExtension->NextDeviceObject, Irp);
+ }
+ else
+ {
+ switch (IrpSp->MinorFunction)
+ {
+ case IRP_MN_QUERY_POWER:
+ case IRP_MN_SET_POWER:
+ Status = STATUS_SUCCESS;
+ break;
+ }
+ PoStartNextPowerIrp(Irp);
+ Irp->IoStatus.Status = Status;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return Status;
+ }
}
NTSTATUS
@@ -843,7 +868,20 @@
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
- return STATUS_NOT_IMPLEMENTED;
+ NTSTATUS Status;
+ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
+
+ if (DeviceExtension->Common.Fdo)
+ {
+ IoSkipCurrentIrpStackLocation(Irp);
+ return IoCallDriver(DeviceExtension->NextDeviceObject, Irp);
+ }
+ else
+ {
+ Status = Irp->IoStatus.Status;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return Status;
+ }
}
VOID