All products / Saraff.Twain.DS / Contents
XferEnvironment Category
- MemXferBufferSizeAttribute - Define preferred buffer size for a memory transfer mode
[MemXferBufferSize(64*1024U /*64K*/)/*TW_SETUPMEMXFER.Preferred on DG_CONTROL / DAT_SETUPMEMXFER / MSG_GET operation*/] public sealed class ScreenDataSource:BitmapDataSource {
Instead of using the MemXferBufferSizeAttribute you can directly set value of XferEnvironment.MemXferBufferSize property.
this.XferEnvironment.MemXferBufferSize=64*1024U; /*64K*/
Pending transfers
- PendingXfers - The number of transfers the Source is ready to supply to the application, upon demand.
- PendingXfersIndeterminate -
truewhen the number of pending transfers is indeterminate (ICAP_XFERCOUNTis-1). In this casePendingXfersis0and ignored,DAT_PENDINGXFERSreports0xFFFF, and the Source stays in State 6 until the series is finished.
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.