IMessage::ReadString

Description

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

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

VB Prototype

value As String = ReadString(
  count As Long
)

C++ Prototype

HRESULT ReadString(
  long count,
  BSTR* 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