SetStdHandleEx function (processenv.h)

Sets the handle for the input, output, or error streams.

Syntax

BOOL SetStdHandleEx(
  DWORD   nStdHandle,
  HANDLE  hHandle,
  PHANDLE phPrevValue
);

Parameters

nStdHandle

A DWORD indicating the stream for which the handle is being set.

hHandle

The handle.

phPrevValue

Optional. Receives the previous handle.

Return value

Returns S_OK on success.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Header processenv.h