[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

how to get gdi and user objects info in windbg

Posted on 2008-01-30
3
Medium Priority
?
2,836 Views
Last Modified: 2013-12-03
Hi,
i want to get info about the gdi and user object owned by a process using windbg debugger.
i know how to get handle list and stacktrace, and i want somehting similar for gdi and user objects.
i also know that the process has a table with these handles somewhere, just dont now how to get/use it.

thanks,
A.
0
Comment
Question by:Agarici
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 1000 total points
ID: 20778593
You can use WinDbg to obtain the "Process Environment Block (PEB)" (see http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/default.aspx?loc=&fig=true#fig2) and it's GdiSharedHandleTable field, see also http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/#S2
0
 
LVL 3

Assisted Solution

by:primeMover2004
primeMover2004 earned 1000 total points
ID: 20787896
Get Windows DDK.
Fire up WinDBG
load your executable
break

!load gdikdx
!help
=======================================================================
GDIEXTS server debugger extentions:
--------------------------------------------------------------------
- general extensions -
dumphmgr -- handle manager objects
dumpobj [-p pid] [type] -- all objects of specific type
dh [object handle] -- HMGR entry of handle
dht [object handle] -- handle type/uniqueness/index
ddc [DC handle] -- DC obj (ddc -? for more info)
dpdev [PDEV ptr] -- PDEV object (dpdev -? for more info)
dldev [LDEV ptr]  LDEV
dco [CLIPOBJ ptr]  CLIPOBJ
dpo [PATHOBJ ptr]  PATHOBJ
dppal [EPALOBJ ptr]  EPALOBJ
dpbrush [BRUSH ptr]  BRUSH
dpsurf [SURFACE ptr]  SURFACE
dpso [SURFOBJ ptr] -- SURFACE struct from SURFOBJ
dblt [BLTRECORD ptr]  BLTRECORD
dr [REGION ptr]  REGION
cr [REGION ptr] -- check REGION
dddsurface [EDD_SURFACE ptr] -- EDD_SURFACE
dddlocal [EDD_DIRECTDRAW_LOCAL ptr] -- EDD_DIRECTDRAW_LOCAL
ddglobal [EDD_DIRECTDRAW_GLOBAL ptr] -- EDD_DIRECTDRAW_GLOBAL
rgnlog nnn -- last nnn rgnlog entries
stats -- accumulated statistics
hdc HDC [-?gltf]
dcl DCLEVEL*
dca DC_ATTR*
ca COLORADJUSTMENT*
mx MATRIX*
la LINEATTRS*
ef EFLOAT* [count]
mx MATRIX*
- font extensions -
tstats
gs FD_GLYPHSET*
gdata GLYPHDATA*
elf EXTLOGFONTW*
tm TEXTMETRICW*
tmwi TMW_INTERNAL*
helf HFONT
ifi IFIMETRICS*
fo RFONT* [-?axedtrfmoculhw]
pfe PFE*
pff PFF*
pft PFT*
stro STROBJ* [-?pheo]
gb GLYPHBITS* [-?gh]
gdf GLYPHDEF*
gp GLYPHPOS*
cache CACHE*
fh FONTHASH*
hb HASHBUCKET*
pubft -- dumps all PUBLIC fonts
devft -- dumps all DEVICE fonts
dispcache -- dumps glyph cache for display PDEV
client side extensions
clihelp
0
 
LVL 11

Author Comment

by:Agarici
ID: 20973646
thank you both for the reply.
A.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question