[This is preliminary documentation and subject to change.]
The GetGuiResources function returns the count of handles to graphical user interface (GUI) objects in use by the specified process.
DWORD GetGuiResource (
HANDLE hProcess, // identifies the process of interest
DWORD uiFlags // indicates the GUI object type
);
Value | Meaning |
---|---|
GR_GDIOBJECTS | Return the count of GDI objects. |
GR_USEROBJECTS | Return the count of USER objects. |
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.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Processes and Threads Overview, Process and Thread Functions, CreateProcess, GetCurrentProcess, OpenProcess