Mirror Drv, EngDeviceIoControl problem

N

Nadav

Hi,

I am writing a mirror display drive, I am tring to communicate between the Display driver and the miniport driver using EngDeviceIoControl, BUT of some strange reason when the mimiport gets the HwStartIO request 'RequestPacket->OutputBuffer' has a pointer different then the one passed through the EngDeviceIoControl call, when the EngDeviceIoControl returns ( after the MirrorStartIO took place ) the content of the Output buffer doesn't change ( although it was update in the Miniports HwStartIO request ). What may cause this problem?

The Display Driver code:
****************************

DHPDEV DrvEnablePDEV( .... )
{
....
DWORD dwDataPtr= 0;
DWORD dwRetBytes = 0;
DWORD dwRet = EngDeviceIoControl( hDriver, IOCTL_MIRROR_GET_SHM, NULL, 0, &dwDataPtr, sizeof(dwDataPtr), &dwRetBytes);
....
}



The miniport code:
*********************

UserModeMem_t g_SharedMemory = { 0 };

BOOLEAN MirrorStartIO(
PVOID HwDeviceExtension,
PVIDEO_REQUEST_PACKET RequestPacket
)
{
VideoDebugPrint((Trace,"StartIO Called.\n"));

switch(RequestPacket->IoControlCode)
{
case IOCTL_MIRROR_GET_SHM:
VideoDebugPrint((Trace,"IOCTL_MIRROR_GET_SHM == RequestPacket->IoControlCode.\n"));
RequestPacket->StatusBlock->Status = NO_ERROR;
*(unsigned long*)RequestPacket->OutputBuffer = (unsigned long)&g_SharedMemory;
RequestPacket->OutputBufferLength = sizeof(&g_SharedMemory);
break;
}

return TRUE;
}


Thanks,
Nadav.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top