I'm trying to get a GDI Object count using the _WinAPI_GetGuiResources function. From what I understand, I should use the 0 flag to get a count of GDI Objects. The 2nd parameter is the PID. When I run the code below, I get the following output:
Output:
I know that PID 2836 is associated with 4 GDI Objects (according to TaskMan).
Any thoughts why this code isn't returning the correct number of GDI Objects?
Output:
PID: 2836
GDI Objects: 0
I know that PID 2836 is associated with 4 GDI Objects (according to TaskMan).
Any thoughts why this code isn't returning the correct number of GDI Objects?
[ autoit ]
#include <Array.au3>; Only for _ArrayDisplay() #include <Date.au3> #include <WinAPI.au3> #include <File.au3> #include <_ArraySize.au3> Global Const $GR_GDIOBJECTS = 0 Local $PID = 2836 ;WinGetProcess("RD Tabs") consolewrite(@crlf & "PID: " & $PID & @crlf & "GDI Objects: " & _WinAPI_GetGuiResources($GR_GDIOBJECTS,$PID) & @crlf & @CRLF) Exit