Kernel32AttachConsole Method

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

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static bool AttachConsole(
	int pid
)

Parameters

pid  Int32
The identifier of the process (PID) whose console is to be used.

Set this value to -1 to use the console of the parent of the current process.

Return Value

Boolean
If the function succeeds, the return value is , otherwise, .

Remarks

See Also