Log in

View Full Version : Finding GDI Objects count for a process


Lizardsoft
01-08-2004, 10:55 AM
One of the really neat things that 2K/XP Task Manager can do is show you how many GDI Objects are in use by a process (ie how many bitmaps, fonts, brushes, etc it is using). I have searched multiple times and simply cannot find this information anywhere. It's absolutely CRITICAL info for being able to detect certain resource leaks or abnormally high use during runtime. Does anyone know how task manager accomplishes retrieving this bit of info?

Lizardsoft
01-08-2004, 11:21 AM
Wow! Finally found it. If anyone wants to know, the trick is a function introduced in Win2K called GetGuiResources. Here's the article that pointed me to it finally:

http://www.vbaccelerator.com/home/VB/Utilities/GUI_Resource_Tracer/article.asp