GetClassName function user32

Win32Result<int> GetClassName(
  1. HWND hWnd,
  2. PWSTR lpClassName,
  3. int nMaxCount
)

Retrieves the name of the class to which the specified window belongs.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclassnamew.

Implementation

Win32Result<int> GetClassName(HWND hWnd, PWSTR lpClassName, int nMaxCount) {
  final result_ = GetClassNameW_Wrapper(hWnd, lpClassName, nMaxCount);
  return .new(value: result_.value.i32, error: result_.error);
}