FindWindow function user32
Retrieves a handle to the top-level window whose class name and window name match the specified strings.
This function does not search child windows. This function does not perform a case-sensitive search.
To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-findwindoww.
Implementation
Win32Result<HWND> FindWindow(PCWSTR? lpClassName, PCWSTR? lpWindowName) {
resolveGetLastError();
final result_ = _FindWindow(lpClassName ?? nullptr, lpWindowName ?? nullptr);
return .new(value: .new(result_), error: GetLastError());
}