LockSetForegroundWindow function user32

Win32Result<bool> LockSetForegroundWindow(
  1. FOREGROUND_WINDOW_LOCK_CODE uLockCode
)

The foreground process can call the LockSetForegroundWindow function to disable calls to the SetForegroundWindow function.

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

Implementation

Win32Result<bool> LockSetForegroundWindow(
  FOREGROUND_WINDOW_LOCK_CODE uLockCode,
) {
  final result_ = LockSetForegroundWindow_Wrapper(uLockCode);
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}