typedef struct _DATATRANSFER
L_TCHAR szFileName ;
} DATATRANSFER, * pDATATRANSFER;
The DATATRANSFER structure provides information about data transferring.
|uStructSize||Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.|
|nFillOrder||Indicates how bytes in the image are to be filled by the source. Possible values are (according to the TWAIN 2.0 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.|
|nBufMemCompression||Specifies the compression to be used when having the transfer mode set to be memory. Possible values are (according to the TWAIN 2.0 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.|
|nTransferMode||Transfer mode to be used by the TWAIN source. Possible values are (according to the TWAIN 2.0 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.|
|nScanFileFormat||Determines the file format to use when saving the files from the TWAIN source. Possible values are (according to the TWAIN 2.0 specification) :|
|TWFF_TIFF||Tagged image file.|
|TWFF_BMP||Windows regular bitmap.|
|TWFF_JFIF||JPEG file interchange format.|
|TWFF_FPX||Flash pix file.|
|TWFF_TIFFMULTI||Multi-page tiff file format.|
|nMemBufSize||Specifies the memory buffer size to be used in data transfer.|
|bSaveToOneFile||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.|
|bAppendToFile||Flag that indicates whether to append pages to the end of the file when saving a multi-page file. Possible values are:|
|TRUE||Append pages to the end of the file.|
|FALSE||Do not append pages to the end of the file.|
|bDumpMemBufsToFile||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.