mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
[VIDEOPRT] Implement IOCTL_VIDEO_ENUM_MONITOR_PDO
This commit is contained in:
parent
2f00ca4663
commit
29b5003455
1 changed files with 49 additions and 2 deletions
|
@ -622,6 +622,51 @@ VideoPortUseDeviceInSession(
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
NTSTATUS
|
||||||
|
VideoPortEnumMonitorPdo(
|
||||||
|
_In_ PDEVICE_OBJECT DeviceObject,
|
||||||
|
_Inout_ PVIDEO_MONITOR_DEVICE *ppMonitorDevices,
|
||||||
|
_Out_ PULONG_PTR Information)
|
||||||
|
{
|
||||||
|
PVIDEO_MONITOR_DEVICE pMonitorDevices;
|
||||||
|
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
PVIDEO_PORT_CHILD_EXTENSION ChildExtension;
|
||||||
|
ULONG i;
|
||||||
|
PLIST_ENTRY CurrentEntry;
|
||||||
|
|
||||||
|
/* Count the children */
|
||||||
|
i = 0;
|
||||||
|
CurrentEntry = DeviceExtension->ChildDeviceList.Flink;
|
||||||
|
while (CurrentEntry != &DeviceExtension->ChildDeviceList)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
|
}
|
||||||
|
|
||||||
|
pMonitorDevices = ExAllocatePoolZero(PagedPool,
|
||||||
|
sizeof(VIDEO_MONITOR_DEVICE) * (i + 1),
|
||||||
|
TAG_VIDEO_PORT);
|
||||||
|
if (!pMonitorDevices)
|
||||||
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
|
/* Add the children */
|
||||||
|
i = 0;
|
||||||
|
CurrentEntry = DeviceExtension->ChildDeviceList.Flink;
|
||||||
|
while (CurrentEntry != &DeviceExtension->ChildDeviceList)
|
||||||
|
{
|
||||||
|
ChildExtension = CONTAINING_RECORD(CurrentEntry, VIDEO_PORT_CHILD_EXTENSION, ListEntry);
|
||||||
|
|
||||||
|
ObReferenceObject(ChildExtension->PhysicalDeviceObject);
|
||||||
|
pMonitorDevices[i++].pdo = ChildExtension->PhysicalDeviceObject;
|
||||||
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppMonitorDevices = pMonitorDevices;
|
||||||
|
*Information = sizeof(pMonitorDevices);
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
VideoPortInitWin32kCallbacks(
|
VideoPortInitWin32kCallbacks(
|
||||||
|
@ -791,8 +836,10 @@ IntVideoPortDispatchDeviceControl(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_VIDEO_ENUM_MONITOR_PDO:
|
case IOCTL_VIDEO_ENUM_MONITOR_PDO:
|
||||||
WARN_(VIDEOPRT, "- IOCTL_VIDEO_ENUM_MONITOR_PDO is UNIMPLEMENTED!\n");
|
INFO_(VIDEOPRT, "- IOCTL_VIDEO_ENUM_MONITOR_PDO\n");
|
||||||
Status = STATUS_NOT_IMPLEMENTED;
|
Status = VideoPortEnumMonitorPdo(DeviceObject,
|
||||||
|
Irp->AssociatedIrp.SystemBuffer,
|
||||||
|
&Irp->IoStatus.Information);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_VIDEO_INIT_WIN32K_CALLBACKS:
|
case IOCTL_VIDEO_INIT_WIN32K_CALLBACKS:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue