Available in the LEADTOOLS Imaging toolkit. |
InitSessionFlags Example for C++ 5.0 and later
ILEADRasterTwain_U * pRasterTwain; HRESULT hr = ::CoCreateInstance(CLSID_LEADRasterTwain_U, NULL, CLSCTX_ALL, IID_ILEADRasterTwain_U, (void **)&pRasterTwain); if (FAILED(hr) || !pRasterTwain) { ::MessageBox (NULL, _TEXT("Failed to create a Raster Twain Object"), _TEXT("Error"), MB_OK); return; } pltRasTwain->EnableMethodErrors = FALSE; pltRasTwain->ManName = TEXT("LEAD Technologies, Inc."); pltRasTwain->ProdFamily = TEXT("LEAD Twain COM Object"); pltRasTwain->Version = TEXT("Version 16"); pltRasTwain->AppName = TEXT("LEADTools Twain test sample"); pltRasTwain->InitSessionFlags = L_LTWAIN_INIT_MULTI_THREADED; pltRasTwain->InitSession ((long)GetSafeHwnd());