Use the LTwain::QueryFileSystem function to obtain information about the TWAIN file system, and change settings within the TWAIN file system.
LTwain::QueryFileSystem can be used to direct the TWAIN file system to perform specific actions, such as 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 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.
Be sure to fill the pTwFile parameter of LTwain::QueryFileSystem with the proper information if the FileMsg parameter contains one of the following flags:
LTwain::QueryFileSystem will use the provided information to change settings within the TWAIN file system.
If the FileMsg parameter contains one of the following flags, LTwain::QueryFileSystem will update the pTwFile parameter with the corresponding information:
If the FileMsg parameter contains the FILESYSTEMMSG_AUTOMATICCAPTUREDIRECTORY
flag, LTwain::QueryFileSystem 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 FILESYSTEMMSG_GETINFO and call LTwain::QueryFileSystem. The pTwFile parameter will be updated with the appropriate information.