Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.8 KB

closepseudoconsole.md

File metadata and controls

63 lines (46 loc) · 1.8 KB
title description author ms.author ms.topic keywords topic_type api_name api_location api_type
ClosePseudoConsole function
See reference information about the ClosePseudoConsole function, which closes a pseudoconsole from the given handle.
miniksa
miniksa
article
console, character mode applications, command line applications, terminal applications, console api, conpty, pseudoconsole
apiref
ClosePseudoConsole
Kernel32.dll
API-MS-Win-Core-Console-l1-2-1.dll
KernelBase.dll
DllExport

ClosePseudoConsole function

Closes a pseudoconsole from the given handle.

Syntax

void WINAPI ClosePseudoConsole(
    _In_ HPCON hPC
);

Parameters

hPC [in]
A handle to an active pseudoconsole 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 the hOutput handle originally provided to CreatePseudoConsole 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 October 2018 Update (version 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