Page 1 of 1

[MFC] GdPictureImaging -> Twain

Posted: Tue Nov 26, 2013 2:52 am
by AllanS
I am trying to bring up the TWAIN source selection dialog, but the call generates a MFC try catch error "No such interface supported".
below is my code snippet:

CGdPictureImaging gdPicImaging;
gdPicImaging.CreateDispatch(_T("GdPicture9.GdPictureImaging"));
gdPicImaging.TwainSelectSource((long)this->m_hWnd); ------> this line generate the MFC error
gdPicImaging.Dispose();

I have tried replacing the above line with gdPicImaging.WiaSelectSource(WiaSourceType_WiaSourceScanner); and that works.
but I need to use TWAIN for this specific scanner.
I am developing on GdPicture version 9.4.0.14 on windows 7 64-bit

Please advise.

PS: The TwainLogStart, TwainGetLastConditionCode, TwainGetLastResultCode all didn't return any results as the program just halts after executing that line.

Re: [MFC] GdPictureImaging -> Twain

Posted: Tue Nov 26, 2013 2:56 am
by AllanS
I forgot to mention that I have ran the c# sample program (Twain Scanning), and that works as well