Click or drag to resize

MoveAsync

Moves data from the specified source to the specified destinationa asynchronously.


				virtual HRESULT MoveAsync(VisaAddressSpace eSrcSpace, UINT64 ullSrcOffset, VisaDataWidth eSrcWidth, VisaAddressSpace eDestSpace, UINT64 ullDestOffset, VisaDataWidth eDestWidth, UINT32 ulLength, UINT32* plJobId) abstract;
			
Parameters
eSrcSpace

[in] Address space from which the data will be moved.

ullSrcOffset

[in] Offset within eSrcSpace from which the data will be moved.

eSrcWidth

[in] Data width of the source data.

eDestSpace

[in] Address space to which the data will be moved.

ullDestOffset

[in] Offset within eDestSpace to which the data will be moved.

eDestWidth

[in] Data width of the destination data.

ulLength

[in] Number of elements (not byte) to transfer.

plJobId

[out] Identifier for the asychronous operation.

Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

The MoveAsync function moves data from the specified source to the specified destination asynchronously. The source and the destination can either be local memory or the offset of an address space within a register-based device. This function uses the specified data width and address space.

This function queues up the transfer in the system and then returns immediately without waiting for the transfer to carry out or complete. When the transfer terminates, an I/O completion event indicates the status of the transfer.

The plJobId is an integer job identifier for the MoveAsync operation. Each time an asynchronous move operation is called, it is assigned a unique job identifier.

Example

The following example demonstrates use of the Move function.

C++
// CoAcme4321.cpp
STDMETHODIMP Acme4321::IAcme4321_MoveBlock()
{
  HRESULT hr = S_OK;

  // Move 1000 bytes 16-bit words
  long lJobId;
  hr = io.Memory.MoveAsync(VisaA16Space, 0x10, VisaDataWidth16, VisaA16Space, 0x20, VisaDataWidth16, 1000, &lJobId);

  return hr;
}
See Also

Download a complete CHM version of this documentation here.