Getting or Setting TWAIN File System Information

LEADTOOLS provides the ability to obtain information from the TWAIN file system, and change settings within the TWAIN file system using the L_TwainQueryFileSystem function.

The user can direct the TWAIN file system to perform a specific action like, change a device, domain, host, or image directory; create an image directory; delete an image or an image directory; format a storage device; rename an image or an image directory; or copy images across storage devices. The user can also direct the TWAIN file system to retrieve certain information or items such as, information on 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:

FILESYSTEM_MSG_CHANGEDIRECTORY

FILESYSTEM_MSG_CREATEDIRECTORY

FILESYSTEM_MSG_DELETE

FILESYSTEM_MSG_FORMATMEDIA

FILESYSTEM_MSG_RENAME

FILESYSTEM_MSG_COPY

the pTwFile parameter must contain the proper information before calling this function. This function will use the provided information to change settings within the TWAIN file system.

If the FileMsg parameter contains one of the following flags:

FILESYSTEM_MSG_GETCLOSE

FILESYSTEM_MSG_GETFIRSTFILE

FILESYSTEM_MSG_GETINFO

FILESYSTEM_MSG_GETNEXTFILE

This function, will update the pTwFile parameter with the corresponding information.

If the FileMsg parameter contains the following flag:

FILESYSTEM_MSG_AUTOMATICCAPTUREDIRECTORY

this function will use information stored within the pTwFile parameter and will update the pTwFile parameter with any appropriate information.

For 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.