ClosePseudoConsole function

Closes a pseudoconsole from the given handle.

Syntax

void WINAPI ClosePseudoConsole(
    _In_ HPCON hPC 
);

Parameters

hPC [in]
A handle to an active psuedoconsole as opened by CreatePseudoConsole.

Return value

none

Remarks

Upon closing a pseudoconsole, client applications attached to the session will be terminated as well.

A final painted frame may arrive on hOutput from the pseudoconsole when this API is called. It is expected that the caller will drain this information from the communication channel buffer and either present it or discard it. Failure to drain the buffer may cause the Close call to wait indefinitely until it is drained or the communication channels are broken another way.

Requirements

Minimum supported client

Windows 10 1809 [desktop apps only]

Minimum supported server

Windows Server 2019 [desktop apps only]

Header

ConsoleApi.h (via Wincon.h, include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Pseudoconsoles

CreatePseudoConsole

ResizePseudoConsole