The DATATRANSFER structure provides information about data transferring.
Size of this structure in bytes, for versioning. Use the sizeof() operator to calculate this value.
Indicates how bytes in the image are to be filled by the source. Possible values are (according to the TWAIN specification):
|TWBO_LSBFIRST||Bytes are to be transferred with the least significant byte first.|
|TWBO_MSBFIRST||Bytes are to be transferred with the most significant byte first.|
Specifies the compression to be used when having the transfer mode set to be memory. Possible values are (according to the TWAIN specification):
|TWCP_NONE||No compression is to be used.|
|TWCP_PACKBITS||Pack Bits compression.|
|TWCP_GROUP31D||CCITT Group 3 compression with no End of Line.|
|TWCP_GROUP31DEOL||CCITT Group 3 compression with End of Line.|
|TWCP_GROUP32D||CCITT Group 3 compression (use cap for K Factor).|
|TWCP_GROUP4||CCITT Group 4 compression.|
|TWCP_LZW||LZW compression (like gifs).|
|TWCP_JBIG||JBIG compression, used mostly for bitonal images.|
|TWCP_BITFIELDS||Bit Fields compression.|
Transfer mode to be used by the TWAIN source. Possible values are (according to the TWAIN specification):
|TWSX_NATIVE||Native transfer mode.|
|TWSX_MEMORY||Memory buffered transfer mode. The source will be transferring strips of data to the application according to the buffer size given.|
|TWSX_FILE||File transfer mode. This will use a specified file to have the image data saved to. This will have a certain format specified by the properties.|
Output file format. Valid values depend on the transfer mode used.
Specifies the memory buffer size to be used in data transfer.
Flag that indicates whether to save multiple pages to a single file. Possible values are:
|TRUE||Save to a single file.|
|FALSE||Do not save to a single file.|
Flag that indicates whether to append pages to the end of the file when saving a multipage file. Possible values are:
|TRUE||Append pages to the end of the file.|
|FALSE||Do not append pages to the end of the file.|
Flag that indicates whether to use the file name specified in szFileName field to dump the memory buffers received from the scanner. In this case the Bitmap Handle will not get the Bitmap Data, all the data will be saved to the file. Possible values:
|TRUE||Use file name.|
|FALSE||Do not use file name.|
Character string that contains the file name used in the file transfer mode. Use this member only if:
The nTransferMode member is set to TWSX_FILE.
The nTransferMode member is set to TWSX_MEMORY and the bDumpMemBufsToFile member is set to TRUE.
pDATATRANSFER is a pointer to a DATATRANSFER structure. Where the function parameter type is pDATATRANSFER, you can declare a DATATRANSFER variable, update the structure's fields and pass the variable's address in the parameter. Declaring a pDATATRANSFER variable is necessary only if your program requires a pointer.
DATATRANSFER is used with the LTWAINPROPERTIES structure.
If the nTransferMode member value is set to TWSX_MEMORY and the bDumpMemBufsToFile member value is set to TRUE, then the L_TwainAcquire and L_TwainAcquireList functions will dump the memory buffers received from the scanner (whether compressed or not) directly to the output file specified by szFileName member.
If the nTransferMode member value is set to TWSX_MEMORY, the nBufMemCompression member is set to values other than TWCP_NONE, and the bDumpMemBufsToFile member value is set to FALSE, then the L_TwainAcquire and L_TwainAcquireList functions will decompress the memory buffers received from the scanner, and generate a BITMAPHANDLE as a result.
This generated BITMAPHANDLE will be returned in the pBitmap parameter of LTWAINBITMAPCALLBACK function when it is fired by calling the L_TwainAcquire function, or added to the bitmap list pointed to by the hBitmap parameter of L_TwainAcquireList function when this function is being used.