UnhookWindowsHookEx function user32

Win32Result<bool> UnhookWindowsHookEx(
  1. HHOOK hhk
)

Removes a hook procedure installed in a hook chain by the SetWindowsHookEx function.

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

Implementation

Win32Result<bool> UnhookWindowsHookEx(HHOOK hhk) {
  resolveGetLastError();
  final result_ = _UnhookWindowsHookEx(hhk);
  return .new(value: result_ != FALSE, error: GetLastError());
}