GetGuiResources function (winuser.h)
Retrieves the count of handles to graphical user interface (GUI) objects in use by the specified process.
DWORD GetGuiResources( [in] HANDLE hProcess, [in] DWORD uiFlags );
A handle to the process. The handle must refer to a process in the current session, and must have the PROCESS_QUERY_LIMITED_INFORMATION access right (see Process security and access rights).
If this parameter is the special value GR_GLOBAL, then the resource usage is reported across all processes in the current session.
Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: The GR_GLOBAL value is not supported until Windows 7 and Windows Server 2008 R2.
Windows Server 2003 and Windows XP: The handle must have the PROCESS_QUERY_INFORMATION access right.
The GUI object type. This parameter can be one of the following values.
If the function succeeds, the return value is the count of handles to GUI objects in use by the process. If no GUI objects are in use, the return value is zero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
A process without a graphical user interface does not use GUI resources, therefore, GetGuiResources will return zero.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||winuser.h (include windows.h)|
|API set||ext-ms-win-ntuser-misc-l1-1-0 (introduced in Windows 8)|