By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,301 Members | 1,741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,301 IT Pros & Developers. It's quick & easy.

GDI object count

P: n/a
We want to add a GDI object count (like that seen in Task Manager) to our
application's error reporting information. Is there a way to
programmatically get the number that task manager presents? I had a look
through performance monitor, but I couldn't find a category with GDI objects
as an option.

Niall
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Is there a way to
programmatically get the number that task manager presents?


You can use the GetGuiResources API where it's available.

http://msdn.microsoft.com/library/en...iresources.asp

[DllImport("user32.dll")]
static extern uint GetGuiResources(IntPtr hProcess, uint uiFlags);

const uint GR_GDIOBJECTS = 0;

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.