I am investigating GDI leaks issue in one of our smart-client application. I am looking for a tool (like tasklist) to get the GDI objects associated to a process. I can see the GDI objects in taskmanager, But my requirement to capture it periodically somewhere. For example in a text file.
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- Compile and build with single command line Java (L
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
The totally free Process Explorer ( http://www.sysinternals.com ) allows you to graphically inspect this and a zillion other aspects related to running processes. Add
GDI Objects
to the columns to display and you're off and running. The columnGDI Objects
can be found in theProcess Memory
tab in theSelect Columns
dialog.NOTE: Microsoft acquired their tools and I believe Mark Russinovich now works for Microsoft. Sysinternals tools don't typically require any installation other than to copy them to somewhere convenient and should be in your toolbox if they aren't already.
It should be quite straightforward to write a program to periodically log the number of GDI handles in use by a process, using the GetGuiResources API function.
Use GDIView, a free tool from NirSoft.
Their description:
You can save the list of GDI counters as regular, tab-delimited, comma-delimited, and tabular text files, as well as horizontal or vertical HTML file or an XML file.