SetSourceIncrement |
Specifies by how many elements the source offset is to be incremented after every InXX or MoveXX transfer.
virtual HRESULT SetSourceIncrement(long lIncrement) abstract;
[in] Number of elements by which the source offset is incremented.
Returns S_OK if successful, otherwise a failure HRESULT.
The default value increment is 1 -- that is, the source address will be incremented by 1 after each transfer, and the MoveInXX operations move from consecutive elements. If this attribute is set to 0, the MoveInXX operations will always read from the same element, essentially treating the source as a FIFO register.
The following example demonstrates use of the SetSourceIncrement function.
// CoAcme4321.cpp STDMETHODIMP Acme4321::IAcme4321_Read(SAFEARRAY** ppsaData) { // Increment by two elements after MoveIn16 hr = io.SetSourceIncrement(2); hr = io.Memory.MoveIn16(VisaA16Space, 0x10, ppsaData); return hr; }