BitBlt, GetDC and what's between them

Hello,

I have notice something strange, when I am trying to “dump” my desktop
window (e.g. GetDC(GetDesktopWindow()) ) and then using BitBlt to copy into
a memory.

Within my Display Driver (attached, example taken from DDK) the function
DrvBitBlt does not seems to be invoked.

Is there some sort of a cache that when reading from a Window DC into a
memory, the DrvBitBlt isn’t used? Is there something other called?

Thanks,

Itzik

On Sun, Dec 31, 2006 at 06:39:02PM +0200, Itzik Kotler wrote:

I have notice something strange, when I am trying to “dump” my desktop
window (e.g. GetDC(GetDesktopWindow()) ) and then using BitBlt to copy into
a memory.

Within my Display Driver (attached, example taken from DDK) the function
DrvBitBlt does not seems to be invoked.

For a simple blt, it’s possible for DrvCopyBits to be invoked instead.

Is there some sort of a cache that when reading from a Window DC into a
memory, the DrvBitBlt isn’t used? Is there something other called?

If there is nothing fancy in the blt and your surface is in a DIB format,
it’s possible for GDI to handle it all by itself.

Tim Roberts, xxxxx@probo.com
Providenza & Boeklheide, Inc.

Okay,

The goal of the Mirror Display Driver is to modify the result of which 3rd
party screen captures applications returns.

I am reviewing my options and so far from my understanding in the GDI
architecture (DirectX is not an issue) there are two options, one is
Using Mirror Display Driver as a filter and the other one is perhaps
hooking?

I am taking into the formula, that some applications are opening a DC
To the Display Driver and some are using GetDC() on Windows. I also always
assume that BitBlt() would be used for copying.

Are there any other options?

Thanks,
Itzik

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@probo.com
Sent: Monday, January 01, 2007 9:49 AM
To: Windows System Software Devs Interest List
Cc: Tim Roberts
Subject: Re: [ntdev] BitBlt, GetDC and what’s between them

On Sun, Dec 31, 2006 at 06:39:02PM +0200, Itzik Kotler wrote:

I have notice something strange, when I am trying to “dump” my desktop
window (e.g. GetDC(GetDesktopWindow()) ) and then using BitBlt to copy
into
a memory.

Within my Display Driver (attached, example taken from DDK) the function
DrvBitBlt does not seems to be invoked.

For a simple blt, it’s possible for DrvCopyBits to be invoked instead.

Is there some sort of a cache that when reading from a Window DC into a
memory, the DrvBitBlt isn’t used? Is there something other called?

If there is nothing fancy in the blt and your surface is in a DIB format,
it’s possible for GDI to handle it all by itself.

Tim Roberts, xxxxx@probo.com
Providenza & Boeklheide, Inc.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Itzik Kotler wrote:

The goal of the Mirror Display Driver is to modify the result of which 3rd
party screen captures applications returns.

The actions of a mirror driver have absolutely no effect on the primary
display surface. The two drivers are unrelated. GDI happens to send
all output requests to both drivers, but separately.

I am reviewing my options and so far from my understanding in the GDI
architecture (DirectX is not an issue) there are two options, one is
Using Mirror Display Driver as a filter and the other one is perhaps
hooking?

If you want to change what a screen capture app sees, a mirror driver
will not do it. You will have to use hooking, and that ain’t easy.

What are you actually trying to do? Remove the mouse pointer from a
screen capture app?

I am taking into the formula, that some applications are opening a DC
To the Display Driver and some are using GetDC() on Windows. I also always
assume that BitBlt() would be used for copying.

An app might use GetDIBits to fetch a copy of the screen, or even a
DirectDraw primary surface. That’s the fun thing about apps; no two are
alike.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.