IMessage::Read

Description

Synchronously transfers data from a device. The data that is read is returned in the SAFEARRAY pBuffer. This function returns only when the transfer terminates. Only one synchronous read function can occur at any one time.

A read can terminate successfully due to receiving the requested number of bytes, receiving the read termination character (if enabled), or receiving the END signal.

VB Prototype

value As SAFEARRAY(BYTE) = Read(
  count As Long
)

C++ Prototype

HRESULT Read(
  long count,
  SAFEARRAY(BYTE)* pBuffer
);

Parameters

count

Number of bytes to read.

pBuffer

The data that was read.

Return Value

Refer to the table of return codes.

See Also

ComponentVersion, SpecVersion, HardwareInterfaceName, HardwareInterfaceNumber, HardwareInterfaceType, LockState, OptionString, ProgID, ResourceName, SessionType, SoftwareManufacturerID, SoftwareManufacturerName, Timeout, LastStatus, IOProtocol, SendEndEnabled, TerminationCharacter, TerminationCharacterEnabled, GetAttribute, SetAttribute, LockRsrc, UnlockRsrc, Init, Close, AssertTrigger, Clear, ReadSTB, Read, ReadString, Write, WriteString, IMessage Overview