AllowSetForegroundWindow function user32

Win32Result<bool> AllowSetForegroundWindow(
  1. int dwProcessId
)

Enables the specified process to set the foreground window using the SetForegroundWindow function.

The calling process must already be able to set the foreground window.

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

Implementation

Win32Result<bool> AllowSetForegroundWindow(int dwProcessId) {
  final result_ = AllowSetForegroundWindow_Wrapper(dwProcessId);
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}