IsAvailable Example for C++ 5.0 and later
BOOL bRet;
ILEADRasterTwain *pltRasTwain;
::CoCreateInstance(CLSID_LEADRasterTwain, NULL, CLSCTX_ALL, IID_ILEADRasterTwain, void **)&pltRasTwain);
bRet = pltRasTwain->IsAvailable ((long)m_hWnd);
if (bRet)
MessageBox(TEXT("Twain is installed"));
else
MessageBox(TEXT("Twain is not installed"));