From: Attributesoft on
Hi all.
How I can use this Mirror Display Driver with user-mode application.
I need to do that my application(user-mode), will be able to send
changes that happened on Display for example in 50ms, thought socked
to another computer.
I think I need to send them(changes) in rectangles raster format, but
how can I do that?
I have problem only with using Mirror Display Driver thought win32
application.
How can I get those changes?

From: Attributesoft on
I'm using src\video\displays\mirror from DDK.
And I found that I need to use DrvDrawEscape, but I don't imagine what
params I need to pass to this function.

From: Ivan Brugiolo [MSFT] on
In order to send changes to primary surface of your mirrors drivers
(or to your device bitmaps) to the network, you have two routes:

Push Model:
- Inside each DrvXXX call create a convenient network
representation for the drawing operation
- using the Miniport-Device-Object passed in DrvEnablePDEV,
push that that to the Device Object, via an IOCLT
- in the miniport, create a control interface (via custom IOCLT,
or via a separate device interface)
- this control interface will interact with a TDI-client
(or Kernel Winsock application, in Vista), that will push
the actual network representation to the wire.
- You can use DrvSynchronize to get a timer in NtUser to push `flush`
the content to you, instead of blocking in each DrvXXX call


Pull-Model:
- create a notification mechanism between the display
driver and a controlling user-mode application
(for example, a named event exchnaged via the MiniPort,
a handle to be agree-ed upon initialization,
for example as extra data in DEVMODEW
when you call ChangeDisplaySettingsEx)
- When the event rendez-vous has happened,
the controlling application will ask the display driver,
(for example, via [Ext|Draw]Escape) a convenient
representation of the changed content.
[The convenient representation may contain an accumulated dirty region,
or the delta content caused by each drawing operation].
- the controlling application will retrive the convenient represetation of
the
changed content, and will send that over the wire.
[Usual requirements of Same-Session MUST
be satisfied to use [Ext|Draw]Escape].

The push model is a 3/6 months project assuming good familiarity with
display drivers, TDI clients and kernel programming in general.

The pull-model is a 2/4 months work project assuming good familiarity with
display drivers, and generic user-kernel interaction.

The mirror driver in the DDX/WDK does implement DrvEscape, and,
you can return data to the calling application by filling-in the pvOut
buffer.
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


<Attributesoft(a)gmail.com> wrote in message
news:1181410678.768551.264400(a)m36g2000hse.googlegroups.com...
> I'm using src\video\displays\mirror from DDK.
> And I found that I need to use DrvDrawEscape, but I don't imagine what
> params I need to pass to this function.
>


From: Attributesoft on
Ivan Brugiolo, thank you very much for your answer.
>- When the event rendez-vous has happened,
>the controlling application will ask the display driver,
>(for example, via [Ext|Draw]Escape) a convenient
>representation of the changed content.
I want to get all changes for example in 50ms, I think this will more
better way.
So I need do that my Win32App will get only those changes thought
DrvEscape.
How can I do that my Win32App will get only changes for period 50ms?
Maybe I need to get bitmap and to clear mirror surface every time when
I call DrvEscape to get that result with only changes?

From: Tim on
On 10 Jun, 07:05, Attributes...(a)gmail.com wrote:
> Ivan Brugiolo, thank you very much for your answer.>- When the event rendez-vous has happened,
> >the controlling application will ask the display driver,
> >(for example, via [Ext|Draw]Escape) a convenient
> >representation of the changed content.
>
> I want to get all changes for example in 50ms, I think this will more
> better way.
> So I need do that my Win32App will get only those changes thought
> DrvEscape.
> How can I do that my Win32App will get only changes for period 50ms?
> Maybe I need to get bitmap and to clear mirror surface every time when
> I call DrvEscape to get that result with only changes?

With the Pull model above the mirror driver should accumulate the
dirty regions since the last time the user mode application asked for
the previous accumulation. Getting a normal user mode application to
be precise at 50ms is tricky, so maybe you could mark each record of a
dirty region with the current clock tick, and let the user mode
application sort it out (you're going to have lag over the network
anyway).

Is this a hobby, or a commercial replacement for VNC, Windows Remote
Desktop ...

Tim.