[MFC] GdPictureImaging -> Twain

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
AllanS
Posts: 8
Joined: Thu May 16, 2013 2:46 am

[MFC] GdPictureImaging -> Twain

Post by AllanS » Tue Nov 26, 2013 2:52 am

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.

AllanS
Posts: 8
Joined: Thu May 16, 2013 2:46 am

Re: [MFC] GdPictureImaging -> Twain

Post by AllanS » Tue Nov 26, 2013 2:56 am

I forgot to mention that I have ran the c# sample program (Twain Scanning), and that works as well

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest