Queries the TWAIN file system.
public void QueryFileSystem(
Leadtools.Twain.TwainFileSystem fileSystem,
Leadtools.Twain.TwainFileSystemMessage message
)
Public Sub QueryFileSystem( _
ByVal fileSystem As Leadtools.Twain.TwainFileSystem, _
ByVal message As Leadtools.Twain.TwainFileSystemMessage _
)
public:
void QueryFileSystem(
Leadtools.Twain.TwainFileSystem^ fileSystem,
Leadtools.Twain.TwainFileSystemMessage message
)
fileSystem
TwainFileSystem contains file system information
message
Determines the TWAIN file system message.
A TwainFileSystem object that represents the specified TWAIN file system message
This method will query the TWAIN file system for digital cameras, and update the TWAIN file system based on the message passed to the fileSystemMsg parameters.
Imports Leadtools
Imports Leadtools.Twain
Public Sub QueryFileSystemExample(ByVal parent As IntPtr)
Dim session As TwainSession = New TwainSession()
Dim fileSystem As TwainFileSystem = New TwainFileSystem()
Dim msg As String
Try
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
session.QueryFileSystem(fileSystem, TwainFileSystemMessage.AutomaticCaptureDirectory)
' I changed the following line from "fileSystem.FileType" to "fileSystem.FileFormat"
msg = String.Format("Input Name = {0}" & Constants.vbLf & "Output Name = {1}" & Constants.vbLf & "Recursive = {2}" & Constants.vbLf & "FileType = {3}" & Constants.vbLf & "FileSize = {4}" & Constants.vbLf _
& "CreateTimeDate = {5}" & Constants.vbLf & "ModifiedTimeDate = {6}" & Constants.vbLf & "FreeMediaSpace = {7}" & Constants.vbLf & "NewImageSize = {8}" & Constants.vbLf & _
"NumberOfFiles = {9}" & Constants.vbLf & "NumberOfAudioSnippets = {10}" & _
Constants.vbLf & "DeviceGroupMask = {11}" & Constants.vbLf, fileSystem.InputName, fileSystem.OutputName, fileSystem.Recursive, fileSystem.FileFormat, fileSystem.FileSize, fileSystem.CreateTimeDate, fileSystem.ModifiedTimeDate, _
fileSystem.FreeSpace, fileSystem.NewImageSize, fileSystem.NumberOfFiles, fileSystem.NumberOfAudioSnippets, fileSystem.DeviceGroupMask)
MessageBox.Show(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
session.Shutdown()
End Try
End Sub
using Leadtools;
using Leadtools.Twain;
public void QueryFileSystemExample(IntPtr parent)
{
TwainSession session = new TwainSession();
TwainFileSystem fileSystem = new TwainFileSystem();
string msg;
try
{
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);
session.QueryFileSystem(fileSystem, TwainFileSystemMessage.AutomaticCaptureDirectory);
msg = String.Format(@"Input Name = {0}\nOutput Name = {1}\nRecursive = {2}\nFileType = {3}\nFileSize = {4}\nCreateTimeDate = {5}\nModifiedTimeDate = {6}\nFreeMediaSpace = {7}\nNewImageSize = {8}\nNumberOfFiles
= {9}\nNumberOfAudioSnippets = {10}\nDeviceGroupMask = {11}\n"
,fileSystem.InputName,
fileSystem.OutputName,
fileSystem.Recursive,
// I changed the following line from "fileSystem.FileType" to "fileSystem.FileFormat"
fileSystem.FileFormat,
fileSystem.FileSize,
fileSystem.CreateTimeDate,
fileSystem.ModifiedTimeDate,
fileSystem.FreeSpace,
fileSystem.NewImageSize,
fileSystem.NumberOfFiles,
fileSystem.NumberOfAudioSnippets,
fileSystem.DeviceGroupMask);
MessageBox.Show(msg);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
session.Shutdown();
}
}
![]() |
Products |
Support |
Feedback: QueryFileSystem Method - Leadtools.Twain |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.