IAsyncMessage::Read

Description

Reads data from the resource asynchronously.

The asynchronous read operation asynchronously transfers data.  The data read is returned in the I/O Completion event object.  This operation returns before the transfer terminates. An I/O Completion event will be posted when the transfer is actually completed.

The operation returns jobId, which you can use either with Terminate to abort the operation, or with an I/O Completion event to identify which asynchronous read operation completed.

VB Prototype

value As Long = Read(
  count As Long
)

C++ Prototype

HRESULT Read(
  long count,
  long* pJobId
);

Parameters

count

The number of bytes to read

pJobId

This job ID can be used to terminate the operation or to identify the event object resulting from this call.

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, Write, WriteString, Terminate, IAsyncMessage Overview