SendData Method

Navigation:  Reference Guide > Serial Communication >

SendData Method

Previous pageReturn to chapter overviewNext page

Transmits data for a communication channel (direct serial connection or modem connection).

SendData(

  short ChannelID,

  short *Buffer,

  long NumberOfBytesToSend,

  long *NumberOfBytesSent,

  VARIANT_BOOL *Result);

Parameters

ChannelID

    A channel ID (0-7) used to identify a communication channel.

Buffer

     A pointer to the buffer containing the data to be transmitted to the remote side.

NumberOfBytesToSend

     Number of bytes to be transmitted to the remote side.

NumberOfBytesSent

     A pointer to the variable that receives number of bytes successfully transmitted.

Result

    If the method succeeds, the value of variable pointed to by Result is VARIANT_TRUE, otherwise the value is VARIANT_FALSE.