This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C3FCCD.814DCA40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=3D 0;
DWORD dwRetBytes =3D 0;
DWORD dwRet =3D EngDeviceIoControl( hDriver, IOCTL_MIRROR_GET_SHM, NULL, =
0, &dwDataPtr, sizeof(dwDataPtr), &dwRetBytes);
...
}



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

UserModeMem_t g_SharedMemory =3D { 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 =3D=3D =
RequestPacket->IoControlCode.\n"));
RequestPacket->StatusBlock->Status =3D NO_ERROR;
*(unsigned long*)RequestPacket->OutputBuffer =3D (unsigned =
long)&g_SharedMemory;
RequestPacket->OutputBufferLength =3D sizeof(&g_SharedMemory);
break;
}

return TRUE;
}


Thanks,
Nadav.

------=_NextPart_000_000D_01C3FCCD.814DCA40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>Hi,<BR><BR>I am writing a mirror display =
drive, I am=20
tring to communicate between the Display driver and the miniport driver =
using=20
EngDeviceIoControl, BUT of some strange reason when the mimiport gets =
the=20
HwStartIO request 'RequestPacket-&gt;OutputBuffer' has a pointer =
different then=20
the one passed through the EngDeviceIoControl call, when the =
EngDeviceIoControl=20
returns ( after the MirrorStartIO took place ) the content of the Output =
buffer=20
doesn't change ( although it was update in the Miniports HwStartIO =
request ).=20
What may cause this problem?</FONT></P>
<P><FONT face=3DArial size=3D2>The Display Driver=20
code:<BR>****************************</FONT></P>
<P><FONT face=3DArial size=3D2>DHPDEV DrvEnablePDEV( .... =
)<BR>{<BR>...<BR>DWORD=20
dwDataPtr=3D 0;<BR>DWORD dwRetBytes =3D 0;<BR>DWORD dwRet =3D=20
<STRONG>EngDeviceIoControl</STRONG>( hDriver, IOCTL_MIRROR_GET_SHM, =
NULL, 0,=20
&amp;dwDataPtr, sizeof(dwDataPtr), =
&amp;dwRetBytes);<BR>...<BR>}</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>The miniport=20
code:<BR>*********************</FONT></P><FONT size=3D2>
<P>UserModeMem_t g_SharedMemory =3D { 0 };</P></FONT>
<P><FONT face=3DArial size=3D2>BOOLEAN MirrorStartIO(<BR>&nbsp;&nbsp; =
PVOID=20
HwDeviceExtension,<BR>&nbsp;&nbsp; PVIDEO_REQUEST_PACKET=20
RequestPacket<BR>&nbsp;&nbsp; =
)<BR>{<BR>&nbsp;VideoDebugPrint((Trace,"StartIO=20
Called.\n"));</FONT></P>
<P><FONT face=3DArial=20
size=3D2>&nbsp;switch(RequestPacket-&gt;IoControlCode)<BR>&nbsp;{<BR>&nbs=
p;case=20
IOCTL_MIRROR_GET_SHM:<BR>&nbsp;&nbsp;VideoDebugPrint((Trace,"IOCTL_MIRROR=
_GET_SHM=20
=3D=3D=20
RequestPacket-&gt;IoControlCode.\n"));<BR>&nbsp;&nbsp;RequestPacket-&gt;S=
tatusBlock-&gt;Status&nbsp;=3D=20
NO_ERROR;<BR>&nbsp;&nbsp;*(unsigned =
long*)RequestPacket-&gt;OutputBuffer&nbsp;=3D=20
(unsigned=20
long)&amp;g_SharedMemory;<BR>&nbsp;&nbsp;RequestPacket-&gt;OutputBufferLe=
ngth&nbsp;=3D=20
sizeof(&amp;g_SharedMemory);<BR>&nbsp;&nbsp;break;<BR>&nbsp;}</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;return TRUE;<BR>}<BR></FONT></P>
<P><FONT face=3DArial size=3D2>Thanks,<BR>&nbsp;&nbsp; =
Nadav.</FONT><FONT face=3DArial=20
size=3D2></P></FONT></DIV></BODY></HTML>

------=_NextPart_000_000D_01C3FCCD.814DCA40--