How to GetGuiResources for all system processes?
Posted
by Krzysztof
on Stack Overflow
See other posts from Stack Overflow
or by Krzysztof
Published on 2010-03-22T17:08:16Z
Indexed on
2010/03/22
17:11 UTC
Read the original article
Hit count: 349
Hello,
I need to measure all used GDI objects in a Windows xp system. I found a GetGuiResources(__in HANDLE hProcess, __in DWORD uiFlags) method (with the GR_GDIOBJECTS flag). I call it for the process which I get from the method GetCurrentProcess() defined in WinBase.h.
I don't know how to call it for other system processes, which I get by System::Diagnostics::Process::GetProcesses(), because that function returns an array of Process pointers, and GetGuiResources takes a HANDLE.
Does anybody know a solution for that? How can I transform Process pointer to a Handle or get HANDLEs for all running system processes?
thanks for help in advance!
© Stack Overflow or respective owner