COPP Video Miniport Driver IOCTL Template Code
This section applies only to Windows Server 2003 SP1 and later, and Windows XP SP2 and later.
The video miniport driver must implement a HwVidStartIO function to process the I/O requests that originate in the display driver. The following example code shows only how the video miniport driver processes COPP IOCTLs:
BOOLEAN
HwVidStartIO(
PHW_DEVICE_EXTENSION pHwDeviceExtension,
PVIDEO_REQUEST_PACKET pVideoRequestPacket
)
{
VP_STATUS vpStatus;
switch (pVideoRequestPacket->IoControlCode)
{
case IOCTL_COPP_OpenDevice:
vpStatus = IoctlCOPPOpenDevice(pHwDeviceExtension, pVideoRequestPacket);
break;
case IOCTL_COPP_GetCertificateLength:
vpStatus = IoctlCOPPGetCertificateLength(pHwDeviceExtension, pVideoRequestPacket);
break;
case IOCTL_COPP_KeyExchange:
vpStatus = IoctlCOPPKeyExchange(pHwDeviceExtension, pVideoRequestPacket);
break;
case IOCTL_COPP_StartSequence:
vpStatus = IoctlCOPPStartSeqence(pHwDeviceExtension, pVideoRequestPacket);
break;
case IOCTL_COPP_Command:
vpStatus = IoctlCOPPCommand(pHwDeviceExtension, pVideoRequestPacket);
break;
case IOCTL_COPP_Status:
vpStatus = IoctlCOPPStatus(pHwDeviceExtension, pVideoRequestPacket);
break;
case IOCTL_COPP_CloseDevice:
vpStatus = IoctlCOPPCloseDevice(pHwDeviceExtension, pVideoRequestPacket);
break;
default:
vpStatus = ERROR_INVALID_FUNCTION;
break;
}
pVideoRequestPacket->StatusBlock->Status = vpStatus;
return TRUE;
}