Kernel32AttachConsole Method
Attaches the calling process to the console of the specified process.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function AttachConsole (
pid As Integer
) As Boolean
Dim pid As Integer
Dim returnValue As Boolean
returnValue = Kernel32.AttachConsole(pid)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static bool AttachConsole(
int pid
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member AttachConsole :
pid : int -> bool
No code example is currently available or this language may not be supported.
- 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.
Boolean
If the function succeeds, the return value is
, otherwise,
.