Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS TWAIN C++ Class Library Help

LTwain::IsAvailable

Show in webframe

#include "ltwrappr.h"

virtual L_BOOL LTwain::IsAvailable()

Determines whether a TWAIN source is installed.

Returns

TRUE

At least one TWAIN source is installed.

FALSE

No TWAIN source is installed.

Comments

You can use this function when deciding whether to enable or disable TWAIN menu items.

Required DLLs and Libraries

LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LTwain::Acquire, LTwain::AcquireList, LTwain::InitSession, LTwain::EndSession, LTwain::OpenTemplateFile, LTwain::CloseTemplateFile, LTwain::TemplateDlg, LTwain::AddCapabilityToFile, LTwain::GetNumofCapsInFile, LTwain::GetCapabilityFromFile, LTwain::SetVersion

Topics:

TWAIN Functionality: Property Functions

Example

L_INT LTwain__IsAvailableExample(HWND hWnd, HBITMAPLIST hBitmap)
{
   L_BOOL            bAvailable;
   L_INT             nRet;
   LTwain            MyClass;
   APPLICATIONDATA   AppData;
   /* Check to see if TWAIN is installed */
   bAvailable = MyClass.IsAvailable();
   if (bAvailable)
   {
      AppData.hWnd = hWnd; 
      AppData.uStructSize = sizeof(APPLICATIONDATA);
      lstrcpy (AppData.szManufacturerName, TEXT("LEAD Technologies, Inc.")); 
      lstrcpy (AppData.szAppProductFamily, TEXT("LEAD Test Applications"));
      lstrcpy (AppData.szVersionInfo, TEXT("Version 1.0"));
      lstrcpy (AppData.szAppName, TEXT("TWAIN Test Application"));
      AppData.uLanguage = TWLG_ENGLISH_USA;
      AppData.uCountry = TWCY_USA;
      nRet = MyClass.InitSession(&AppData); 
      if (nRet != SUCCESS) 
         return nRet;
      nRet = MyClass.AcquireList(hBitmap, NULL, LTWAIN_SHOW_USER_INTERFACE);
      if(nRet != SUCCESS)
         return nRet;
      nRet = MyClass.EndSession();
      if(nRet != SUCCESS)
         return nRet;
   }
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.