Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
getguiresources (user32)
 
.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern uint GetGuiResources(IntPtr hProcess, uint uiFlags);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

    /// uiFlags: 0 - Count of GDI objects
    /// uiFlags: 1 - Count of USER objects
    /// - Win32 GDI objects (pens, brushes, fonts, palettes, regions, device contexts, bitmap headers)
    /// - Win32 USER objects:
    ///      - WIN32 resources (accelerator tables, bitmap resources, dialog box templates, font resources, menu resources, raw data resources, string table entries, message table entries, cursors/icons)
    /// - Other USER objects (windows, menus)
    ///
    [DllImport("User32")]
    extern public static int GetGuiResources(IntPtr hProcess, int uiFlags);

    public static int GetGuiResourcesGDICount()
    {
        return GetGuiResources(Process.GetCurrentProcess().Handle, 0);
    }

    public static int GetGuiResourcesUserCount()
    {
        return GetGuiResources(Process.GetCurrentProcess().Handle, 1);
    }

Alternative Managed API:

Do you know one? Please contribute it!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions