FastConfigEvent Example for C++ 5.0 and later

void CRasterTwainSink::OnFastConfigEvent(ILTFastConfig_U * pltResConfig)
{
	CString csStr;

	if (pltResConfig->Success)
	{
		csStr.Format(TEXT("Transfer Mode = %d\nFile Format = %d\nBuffer Size = %d\nBits Per Pixel = %d\nRequired Time = %d\n"),
                   pltResConfig->TransferMode,
                   pltResConfig->FileFormat,
                   pltResConfig->BufferSize,
                   pltResConfig->BitsPerPixel,
                   pltResConfig->RequiredTime);

		MessageBox(NULL, csStr, TEXT("Resulting Scan Configurations..."), MB_OK);
   }
   else
		MessageBox(NULL, TEXT("The tested configuration failed..."), TEXT("Error!"), MB_OK);

	m_pView->m_pltRasTwain->StopFindFastConfig = FALSE;
}

void CTwainView::OnTwainAcquire() 
{
	pltRasTwain->UnlockSupport(L_SUPPORT_DOCUMENT, TEXT("test key"));
	pltRasTwain->InitSession((long)GetSafeHwnd());
	pltRasTwain->SelectSource();
	pltRasTwain->EnableFastConfigEvent = TRUE;
	pltRasTwain->FindFastConfig("c:\\Twain", L_LTWAIN_SHOW_USER_INTERFACE, 1, 1);
}