Desktop Functions:

   Smart Device Functions:

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

Terms of Use
Privacy Policy
getclassinfo (user32)

C# Signature:

static extern bool GetClassInfo(IntPtr hInstance, string lpClassName,
   out WNDCLASS lpWndClass);

VB .NET Signature:

Declare Function GetClassInfo Lib "user32.dll" (hInstance As IntPtr, _
   lpClassName As String, <Out> ByRef lpWndClass As WNDCLASS) As Boolean

User-Defined Types:



21/12/2015 - The string parameters cause some problems, so use IntPtr instead and convert them later with Marshal.PtrToStringAuto.

Also use [in, Out] instead of ref or out. ref does not work and out is definitely wrong.

07/30/2008 - The last parameter should be ref instead of out. The function expects an instance.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

System.Windows.Forms.Form.CreateParams.ClassStyle and misc. properties of Form (BackColor, Icon, Menu), Control (Cursor, Name), and Component (Events).


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 directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version