TransmitCommChar

This function transmits a specified character ahead of any pending data in the output buffer of the specified communications device.

At a Glance

Header file: Winbase.h
Windows CE versions: 1.0 and later

Syntax

BOOL TransmitCommChar(HANDLE hFile, char cChar);

Parameters

hFile

[in] Handle to the communications device. The CreateFile function returns this handle.

cChar

[in] Specifies the character to be transmitted.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The TransmitCommChar function is useful for sending an interrupt character (such as a CTRL+C) to a host system.

If the device is not transmitting, TransmitCommChar cannot be called repeatedly. Once TransmitCommChar places a character in the output buffer, the character must be transmitted before the function can be called again. If the previous character has not yet been sent, TransmitCommChar returns an error.

See Also

CreateFile, WaitCommEvent