AttachConsole function kernel32

Win32Result<bool> AttachConsole(
  1. int dwProcessId
)

Attaches the calling process to the console of the specified process.

To learn more, see learn.microsoft.com/windows/console/attachconsole.

Implementation

Win32Result<bool> AttachConsole(int dwProcessId) {
  resolveGetLastError();
  final result_ = _AttachConsole(dwProcessId);
  return .new(value: result_ != FALSE, error: GetLastError());
}