Partager via


COM_Write

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

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 Values

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

OS Versions: Windows CE 1.0 and later.
Header: Developer defined.
Library: Serial.lib.

See Also

COM_Open | COM_Read | WriteFile

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.