Hi, I'm in bug trouble. I need to know if windows will
allow me to install a filter driver between the Graphic
engine (GDI) and the Graphic drivers? I need to filter
some packets. Any information will be appreciated. Thank
you.

Re: GDI and graphics driver filter? by Brian

Brian
Sat Jul 05 11:29:55 CDT 2003

"alex_ht" <ahtremblay@videotron.ca> wrote in message
news:019001c34248$e987b750$a101280a@phx.gbl...
> Hi, I'm in bug trouble. I need to know if windows will
> allow me to install a filter driver between the Graphic
> engine (GDI) and the Graphic drivers?

Yes, it is possible; I've done it. You will have to substitute your "filter
driver" for the real driver, and then load the real driver from within your
filter driver, using EngLoadImage

> I need to filter
> some packets. Any information will be appreciated. Thank
> you.

The graphics drivers are not like any other driver type; they do not implement
packet-driven I/O (IRPs). Graphics drivers are actually two drivers, a
"display" driver, which handles all drawing operations, and a "miniport" which
handles non-drawing operations (such as mode changes, cursor positioning, color
table setting, etc.)

-Brian

Brian Catlin, Sannas Consulting 310-798-8930
Windows Network, Video, WDM Device Driver Training & Consulting
See WWW.AZIUS.COM for courses and scheduling



Re: GDI and graphics driver filter? by Tim

Tim
Sat Jul 05 23:08:04 CDT 2003

"alex_ht" <ahtremblay@videotron.ca> wrote:
>
>Hi, I'm in bug trouble. I need to know if windows will
>allow me to install a filter driver between the Graphic
>engine (GDI) and the Graphic drivers? I need to filter
>some packets. Any information will be appreciated. Thank
>you.

Can you be more specific? Perhaps one of us can suggest an alternative
solution.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: GDI and graphics driver filter? by alex

alex
Wed Jul 09 17:06:43 CDT 2003

Hi Tim,

My boss wants me to create a small screen to display
bitmaps that always "stick" to the top of the screen. Such
as the small screens in the bottom-left corner of some
televisions where u can set a different channel or play a
video game. What I was thinking of doing is a driver that
would simply map a bitmap on a portion of the screen along
with the rest of the screen data. Do I need filter driver
for that?

Note that the bitmap must be always kept on top even when
a third party application running directx is in use.

>-----Original Message-----
>"alex_ht" <ahtremblay@videotron.ca> wrote:
>>
>>Hi, I'm in bug trouble. I need to know if windows will
>>allow me to install a filter driver between the Graphic
>>engine (GDI) and the Graphic drivers? I need to filter
>>some packets. Any information will be appreciated. Thank
>>you.
>
>Can you be more specific? Perhaps one of us can suggest
an alternative
>solution.
>--
>- Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
>.
>

Re: GDI and graphics driver filter? by Brian

Brian
Wed Jul 09 20:49:48 CDT 2003

"alex." <ahtremblay@videotron.ca> wrote in message
news:05d001c34667$6e2d8a80$a301280a@phx.gbl...
> Hi Brian,
>
> Okay, so what can I do with my filter driver onced I
> installed it? I need to "gain access" to the data of other
> drivers because I need to add a "sticky" bitmap to the
> screen. I was thinking of mapping the bitmap to the screen
> along with the rest of the screen info.

What do you mean by 'other drivers'? The filter driver would see all drawing
commands, and would have to pass the commands to the real display driver (or
nothing would ever be displayed). If you want to insert a command to draw a
bitmap, that is pretty straightforward to implement.

> Note; that bitmap will have to stay visible, even when a
> third party application is using directx.

This would be a bit harder, but should also be possible; however, if an
application is using DirectDraw (2D), then the frame buffer will be mapped into
the process' address space, allowing the application do draw whatever it wants
into the frame buffer - possibly overwriting your bitmap. On the bright side,
applications that use the DirectDraw APIs have been diminishing steadily for the
last several years, so that probably won't be much of a problem for you

> Can I gain access to this data with filter driver and can
> I modify it?

Sure

-Brian

Brian Catlin, Sannas Consulting 310-798-8930
Windows Network, Video, WDM Device Driver Training & Consulting
See WWW.AZIUS.COM for courses and scheduling

> thanks. alex
>
> >-----Original Message-----
> >"alex_ht" <ahtremblay@videotron.ca> wrote in message
> >news:019001c34248$e987b750$a101280a@phx.gbl...
> >> Hi, I'm in bug trouble. I need to know if windows will
> >> allow me to install a filter driver between the Graphic
> >> engine (GDI) and the Graphic drivers?
> >
> >Yes, it is possible; I've done it. You will have to
> substitute your "filter
> >driver" for the real driver, and then load the real
> driver from within your
> >filter driver, using EngLoadImage
> >
> >> I need to filter
> >> some packets. Any information will be appreciated. Thank
> >> you.
> >
> >The graphics drivers are not like any other driver type;
> they do not implement
> >packet-driven I/O (IRPs). Graphics drivers are actually
> two drivers, a
> >"display" driver, which handles all drawing operations,
> and a "miniport" which
> >handles non-drawing operations (such as mode changes,
> cursor positioning, color
> >table setting, etc.)
> >
> > -Brian
> >
> >Brian Catlin, Sannas Consulting 310-798-8930
> >Windows Network, Video, WDM Device Driver Training &
> Consulting
> >See WWW.AZIUS.COM for courses and scheduling
> >
> >
> >.
> >



Re: GDI and graphics driver filter? by Maxim

Maxim
Wed Jul 09 21:00:19 CDT 2003

> Note that the bitmap must be always kept on top even when
> a third party application running directx is in use.

I don't think that such task can be solved in principle.
DDraw apps have full control over the surface, which is mapped to
their address space. So, in this case, you will not be able to ensure
your bitmap being up.

Max



Re: GDI and graphics driver filter? by Maxim

Maxim
Wed Jul 09 23:02:43 CDT 2003

> applications that use the DirectDraw APIs have been diminishing
steadily for the
> last several years, so that probably won't be much of a problem for
you

Once there was a strange fashion of using DDraw for 2D and
not-fullscreen tasks like re-implementing the old DOS games in Win32.

For now, this is diminishing, since the good old StretchDIBits API is
much more convinient for this.

The proper use for DDraw is:
- a foundation for D3D
- overlays used in video renderers
- video memory page flipping, which requires fullscreen at least

In any other cases, DDraw will result in the same driver-level calls
as GDI, and so is not of much use. Note that MS is withdrawing the
DDraw docs from MSDN.

Max