View on GitHub

SARAFF SOFTWARE

All products / Saraff.Twain.DS / Contents

XferEnvironment Category

Instead of using the MemXferBufferSizeAttribute you can directly set value of XferEnvironment.MemXferBufferSize property.

this.XferEnvironment.MemXferBufferSize=64*1024U; /*64K*/

Pending transfers

protected override void OnEndXfer() {
    this._Dispose();
    if(this.XferEnvironment.PendingXfersIndeterminate) {
        if(!this._HasMoreData()) {
            this.EndOfXfers(); /* finish the indeterminate series */
        }
    } else if(this.XferEnvironment.PendingXfers>0) {
        this._Acquire();
    }

    base.OnEndXfer();
}

Call EndOfXfers() when the Source has no more data for an indeterminate (ICAP_XFERCOUNT = -1) series. See EndOfXfers.