LTwain::QueryFileSystem

#include "ltwrappr.h"

L_INT LTwain::QueryFileSystem (FileMsg, pTwFile)

Performs certain tasks, or retrieves certain information, depending on the value of the FileMsg parameter.

Parameters

FILESYSTEMMSG FileMsg

Files system messages that determine the behavior of the function. For possible values, refer to the FILESYSTEMMSG.

pTW_FILESYSTEM pTwFile

Pointer to a TW_FILESYSTEM structure. This structure will be updated with, or will contain information used to change, the current TWAIN file system settings. This structure must be allocated.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function is only valid for TWAIN file systems for digital cameras.

If the FileMsg parameter contains one of the following flags, the pTwFile parameter must contain the proper information before calling this function. The provided information is needed to change settings within the TWAIN file system.

If the FileMsg parameter contains one of the following flags, this function will update the pTwFile parameter with the corresponding information.

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.

For more information on the TW_FILESYSTEM structure, refer to the TWAIN specification.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LTwain__QueryFileSystemExample(HWND hWnd) 
{ 
   L_INT             nRet; 
   LTwain            TwainSession; 
   APPLICATIONDATA   AppData; 
   TW_FILESYSTEM     twFileSys; 
 
   memset(&AppData, 0, sizeof(APPLICATIONDATA)); 
 
   AppData.hWnd = hWnd;  
 
   AppData.uStructSize = sizeof(AppData); 
 
   lstrcpy (AppData.szManufacturerName, _T("LEAD Technologies, Inc."));  
   lstrcpy (AppData.szAppProductFamily, _T("LEAD Test Applications")); 
   lstrcpy (AppData.szVersionInfo, _T("Version 1.0")); 
   lstrcpy (AppData.szAppName, _T("TWAIN Test Application")); 
 
   nRet = TwainSession.InitSession(&AppData);  
   if (nRet != TWAIN_SUCCESS) 
   { 
      MessageBox(hWnd, TEXT("Error occurred during call InitSession"), TEXT("Notice"), MB_OK); 
      return nRet; 
   } 
 
   memset(&twFileSys, 0, sizeof(TW_FILESYSTEM)); 
 
   nRet = TwainSession.QueryFileSystem(FILESYSTEMMSG_AUTOMATICCAPTUREDIRECTORY, &twFileSys); 
   if (nRet != TWAIN_SUCCESS) 
   { 
      MessageBox(hWnd, TEXT("Error occurred during call QueryFileSystem"), TEXT("Notice"), MB_OK); 
      return nRet; 
   } 
 
   nRet = TwainSession.EndSession(); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.