Click or drag to resize

GetTerminationCharacter

Gets the termination character for read operations.

virtual HRESULT GetTerminationCharacter(UCHAR* pcTermChar) abstract;
Parameters
pcTermChar

[out] A single character that, when read from the device, causes the read operation to terminate.

Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

When the termination character is read and it has been enabled via the SetTerminationCharacterEnabled function, the read operation terminates.

The default termination character is set to the newline character (\n) and it is enabled by default.

Example

The following example demonstrates use of the GetTerminationCharacter function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::OnFinalInitialize()
{
  HRESULT hr = S_OK;

  // Get the current termination character)
  char ch;
  hr = io.GetTerminationCharacter(&ch);

  return hr;
}
See Also

Download a complete CHM version of this documentation here.