Partager via


ITransportConnection::ReadBytes (Windows CE 5.0)

Send Feedback

This method reads a packet that is sent over a transport connection from the connection stream.

HRESULT ReadBytes(  DWORDdwSize,   BYTE* pData,   LPDWORDpdwBytesAvailable,   LPDWORDpdwBytesRead);

Parameters

  • dwSize
    [in] Size of the buffer that was passed in.
  • pData
    [out] Pointer to the buffer.
  • pdwBytesAvailable
    [out] Size, in bytes, of the packet.
  • pdwBytesRead
    [out] Actual number of bytes that were read.

Return Values

The following table shows the return values for this method.

Return value Description
S_OK The call was successfully completed.
E_FAIL The call could not be completed.
E_READ_FAILED Unable to read packet.
E_INSUFFICIENT_BUFFER The buffer passed in was too small.

Remarks

This call should block until there is valid data to return. The call should also block if the buffer passed in is an insufficient size. When the ITransportConnection::Close method is called, or if a connection has been lost, this method should return with a failure condition.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Tl.h, Tl.idl.
Link Library: Tlcesrv.dll (ActiveSync Transport), Tlkitl.dll (KITL Transport), Tcpip.dll (TCP/IP Transport).

See Also

ITransportConnection::Close

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.