AddCapabilityToFile example for C++ Builder
HTWAINTEMPLATEFILE hFile;
int __fastcall TForm1::LEADTwain1EnumCapabilityEvent(DWORD uCap,
pTW_CAPABILITY pCapability)
{
return LEADTwain1->AddCapabilityToFile ( hFile, pCapability );
}
void __fastcall TForm1::btnAddCapabilityToFileClick(TObject *Sender)
{
L_INT nRet;
nRet= LEADTwain1->OpenTemplateFile ( &hFile, "c:\\temp.ltt", LTWAIN_TEMPLATE_OPEN_WRITE );
if ( nRet == SUCCESS )
{
LEADTwain1->EnableEnumCapabilityEvent = true;
LEADTwain1->EnumCapabilities ( LTWAIN_CAPABILITY_GETCURRENT );
LEADTwain1->CloseTemplateFile ( hFile );
}
}