LEADTOOLS can obtain information from the TWAIN file system and change settings within the TWAIN file system by using the L_TwainQueryFileSystem function.
Use the toolkit to direct the TWAIN file system to perform a specific action like changing a device, domain, host, or image directory; creating an image directory; deleting an image or an image directory; formatting a storage device; renaming an image or an image directory; or copying images across storage devices. It is also possible to direct the TWAIN file system to retrieve certain information or items such as information about the current file, the next file in the directory, the first file in the directory, etc.
If the FileMsg parameter of L_TwainQueryFileSystem contains one of the following flags, the pTwFile parameter must contain the proper information before calling the L_TwainQueryFileSystem function. This function will use the provided information to change settings within the TWAIN file system:
FILESYSTEM_MSG_CHANGEDIRECTORY
FILESYSTEM_MSG_CREATEDIRECTORY
FILESYSTEM_MSG_DELETE
FILESYSTEM_MSG_FORMATMEDIA
FILESYSTEM_MSG_RENAME
FILESYSTEM_MSG_COPY
If the FileMsg parameter contains one of the following flags, this function will update the pTwFile parameter with the corresponding information.:
FILESYSTEM_MSG_GETCLOSE
FILESYSTEM_MSG_GETFIRSTFILE
FILESYSTEM_MSG_GETINFO
FILESYSTEM_MSG_GETNEXTFILE
If the FileMsg parameter contains the following flag, this function will use information stored within the pTwFile parameter and will update the pTwFile parameter with any appropriate information:
FILESYSTEM_MSG_AUTOMATICCAPTUREDIRECTORY
As an example, to get information about the current file from the TWAIN file system, set the FileMsg parameter to FILESYSTEM_MSG_GETINFO and call L_TwainQueryFileSystem. The pTwFile parameter will be updated with the appropriate information.