AttachConsole function kernel32
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());
}