Share via


COM_Read (Windows CE 5.0)

Send Feedback

This function enables an application to receive characters from the serial port.

ULONG COM_Read(HANDLE pContext,PUCHAR pTargetBuffer,ULONG BufferLength,PULONGpBytesRead);

Parameters

  • pContext
    [in] Pointer to a handle returned by the COM_Open function.
  • pTargetBuffer
    [in] Pointer to valid memory.
  • BufferLength
    [in] Specifies the size, in bytes, of pTargetBuffer.
  • pBytesRead
    [out] Pointer to a ULONG that contains the number of bytes read*.*

Return Values

The number of bytes read indicates success. A value of -1 indicates failure.

Remarks

This function sets the buffer and buffer length requested by the caller. It writes the number of bytes transacted and returns the status of the call.

This function is exported to users through the ReadFile function.

This function must obey time-out values set for the serial port.

Requirements

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

See Also

COM_Open | COM_Write | ReadFile

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.