KsTransmitCommChar
The availability of this function depends on what the device supports.
Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
Syntax
BOOL KsTransmitCommChar(
HANDLE hFile,
char cChar
);
Parameters
hFile: a handle to the communications device. The KsCreateComm function returns this handle.
cChar: the character to be transmitted.
Return value
If the function succeeds, it returns TRUE, otherwise FALSE. To get extended error information, call GetLastError.
Remarks
The KsTransmitCommChar function is useful for sending an interrupt character (such as a CTRL+C) to a host system.
If the device is not transmitting, KsTransmitCommChar cannot be called repeatedly. Once KsTransmitCommChar 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, KsTransmitCommChar returns an error.
Example
N/A
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | kscom.h | kscom.h |
Library | KsApi_Rtss.lib | ksapi.h |
See also