GetClassInfoEx (user32)
Last changed: -64.180.49.185

.
Summary

C# Signature:

[DllImport(user32, SetLastError = true)]
static extern Boolean GetClassInfoEx(IntPtr hInstance, String lpClassName, ref WNDCLASSEX lpWndClass);

User-Defined Types:

None.

Notes:

Be sure to set cbSize member of WNDCLASSEX structure before calling the GetClassInfoEx function.

Tips & Tricks:

Please add some!

Sample Code:

IntPtr hinstance = Marshal.GetHINSTANCE(GetType().Module);
String className = "Required Class Name";
WNDCLASSEX wndClass = new WNDCLASSEX { cbSize = (uint)Marshal.SizeOf(typeof(WNDCLASSEX)) };

if (GetClassInfoEx(hinstance, className, ref wndClass))
{
   // Class exists
}

Alternative Managed API:

Do you know one? Please contribute it!

Documentation