Share via


COM_Write (Windows Embedded CE 6.0)

1/6/2010

This function enables an application to transmit bytes to the serial port.

Syntax

ULONG COM_Write(
  HANDLE COM_Write,
  PUCHAR pSourceBytes,
  ULONG NumberOfBytes 
);

Parameters

  • COM_Write
    [in] Handle returned by the COM_Open function.
  • pSourceBytes
    [in] Pointer to the bytes to be written.
  • NumberOfBytes
    [in] Specifies the number of bytes to be written.

Return Value

The number of bytes written indicates success. A value of –1 indicates failure.

Remarks

This function is exported to users through the WriteFile function. This function must obey flow-control and time-out values.

Requirements

Header Developer Implemented
Library Serial.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Serial Port Driver MDD Functions
COM_Open
COM_Read

Other Resources

WriteFile