GetClassName (coredll)
Last changed: -212.119.178.90

.
Summary
This function retrieves the name of the class to which the specified window belongs.

C# Signature:

   [DllImport("user32.dll")]
   public static extern int GetClassName(IntPtr hWnd, StringBuilder buf, int nMaxCount);

VB Signature:

   Declare Function GetClassName Lib "coredll.dll" _
   (hWnd as IntPtr, buf As StringBuilder, nMaxCount As Integer) As Integer

User-Defined Types:

None.

Notes:

None.

Sample Code:

   StringBuilder strClassName = new StringBuilder(256);
   IntPtr hWnd = GetDesktopWindow();
   GetClassName(hWnd, strClassName, strClassName.Capacity);

Documentation