IsAvailable example for C++ Builder
void __fastcall TForm1::btnIsAvailableClick(TObject *Sender)
{
L_INT nRet;
bool bAvailable;
/* Check to see if TWAIN is installed */
bAvailable= LEADTwain1->IsAvailable ( (L_HANDLE)Handle );
if ( bAvailable )
{
LEADTwain1->ManName = "LEAD Technologies, Inc.";
LEADTwain1->ProdFamily = "LEAD Test Applications";
LEADTwain1->Version = "Version 1.0";
LEADTwain1->AppName = "TWAIN Test Application";
nRet= LEADTwain1->InitSession ( (L_HANDLE)Handle );
if ( nRet != SUCCESS )
return;
LEADTwain1->Acquire ( LTWAIN_SHOW_USER_INTERFACE );
LEADTwain1->EndSession ( );
}
}