开发者

Finding the number of USER Objects used by a process

开发者 https://www.devze.com 2022-12-11 06:12 出处:网络
I\'m investigating a possible memory leak which is causing an \"Error creating window handle\" Win32Exception in my .NET 2.0 WinForms app.This is related to number of Handles and numb开发者_开发问答er

I'm investigating a possible memory leak which is causing an "Error creating window handle" Win32Exception in my .NET 2.0 WinForms app. This is related to number of Handles and numb开发者_开发问答er of USER objects (most likely) so I'm trying to log these metrics the next time the exception is thrown.

HandleCount is easy to find: Process.HandleCount.

Does anyone know how to find the Number of USER objects? (Value can be seen in a column of the Task Manager->Processes) .NET or win API functions will do.

Thanks!


Try GetGuiResources which you can call using P/Invoke


You can also see this in Windows Task Manager. 1. Select "Process" tab. 2. Select View > "Select Columns..." and check "User Objects"

0

精彩评论

暂无评论...
验证码 换一张
取 消