Re: Desperately want GDIINFO, how can I obtain this structure?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: lucy (losemind_at_yahoo.com)
Date: 08/14/04


Date: Fri, 13 Aug 2004 22:35:51 -0700


"vipin" <vipin@nospam.com> wrote in message
news:O863$CQgEHA.3476@tk2msftngp13.phx.gbl...
> Hi Brian,
> GDIINFO is not part of the PDEV structure.I am not sure if
> the debugger has the ability of getting to the association of PDEV and
> GDIINFO,might be as you said windbg might be able to,that would be very
> interesting. I have to see then. As you already know,
> PDEV is a chunk of memory which the driver allocates in the
> DrvEnablePDev(...) and returns so it gets associated when DrvEnableSurface
> is called with a drawing surface. So not sure how an offset into pdev
> structure would give GDIINFO.
>
> Since you are the best person, I ask, do you know why microsoft has this,
> whats the history behind it?
> GeDeviceCaps
> PDEVICESIZE Reserved.
>
>
> Brian,Didn't you author a book on display drivers, Is it possible to get
> hold of the book., any pointers where to look for.
> thanks
> vipin
>
> "Brian Catlin" <brianc@sannas.org.bad> wrote in message
> news:OdGYhVPgEHA.3964@TK2MSFTNGP12.phx.gbl...
> > "lucy" <losemind@yahoo.com> wrote in message
> > news:%23xXOTfOgEHA.2536@TK2MSFTNGP09.phx.gbl...
> > >
> > > "Brian Catlin" <brianc@sannas.org.bad> wrote in message
> > > news:O9G26XJgEHA.1344@TK2MSFTNGP11.phx.gbl...
> > >> "lucy" <losemind@yahoo.com> wrote in message
> > >> news:OWIT5kCgEHA.644@tk2msftngp13.phx.gbl...
> > >> > Dear all,
> > >> >
> > >> > I am mad about this...
> > >> >
> > >> > GDIINFO is a Windows System structure, and it is global...
> > >> >
> > >> > But I just don't know where to access it...
> > >> >
> > >> > I searched many places but cannot find how to read its field out...
> > >> >
> > >> > Any thoughts? Please help me! Thank you so much!
> > >>
> > >> What information in the GDIINFO structure are you looking for? The
> Win32
> > > API
> > >> GetDeviceCaps will return pretty much everything in the GDIINFO
> structure
> > >>
> > >> -Brian
> > >>
> > >> Brian Catlin, Sannas Consulting 310-944-9492
> > >> Windows Network, Video, WDM Device Driver Training & Consulting
> > >> See WWW.AZIUS.COM.bad for courses and scheduling
> > >> REMOVE .BAD FROM EMAIL AND WEB ADDRESS
> > >>
> > >>
> > >
> > > Hi Brian,
> > >
> > > thank you very much for your help. I am in need of this field ULONG
> > > ulPhysicalPixelCharacteristics;
> > >
> > > from the GDIINFO desperately...
> > >
> > > I did not see this from GetDeviceCaps... do you have a way to get it?
> >
> > There is a kernel debugger extension DLL for display drivers called
> GDIKDX.DLL,
> > and it has the ability to display just about anything you would like to
> know
> > regarding display and print drivers, including their data structures.
> > Unfortunately, the extension isn't supported after Win2K. >:-{
> >
> > On the bright side, using that extension (specifically, the !dpdev
> command), you
> > can look at the global list of PDEVs, and the GDIINFO structure in them.
> > Unfortunately, the extension DLL doesn't display the
> > ulPhysicalPixelCharacteristics, but that's OK, you can find it using the
> > debugger. There is a global linked list of PDEVs starting at
> Win32K!gppdevlist.
> > With a little bit of effort, you should be able to find the offset of
the
> > GDIINFO structure within the PDEV structure.
> >
> > If this is too much of a hack for you, then you'll have to write what I
> call an
> > "intermediate display driver" (some people may refer to this as a filter
> driver,
> > but since I wrote the very first one, I get to name it). This is a
> display
> > driver that sits between GDI and the real display driver, allowing you
to
> see
> > everything being sent to and from the display driver.
> >
> > -Brian
> >
> > Brian Catlin, Sannas Consulting 310-944-9492
> > Windows Network, Video, WDM Device Driver Training & Consulting
> > See WWW.AZIUS.COM.bad for courses and scheduling
> > REMOVE .BAD FROM EMAIL AND WEB ADDRESS
> >
> >
>
>

Wah, you know a lot... Vipin... then why don't you tell me how to implement
this? Anyway, I learned a lot through your discussion. Thank you very much!


Quantcast