Forums › TWAIN Classic › Application crashes when acquiring image › Reply To: Application crashes when acquiring image
June 24, 2009 at 1:44 pm
#24923
OK, I’ve fixed the triplet to set the transfer method to native. I changed the code to the following and the last parameter on the capability (TwType.UInt16) seems to have fixed it:
cap = new TwCapability(TwCap.IXferMech, (short)TwIXferMechType.TWSX_NATIVE, TwType.UInt16);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
The application still crashes when transfering the image though, which is my biggest problem (rc = DSixfer(appid, srcds, TwDG.Image, TwDAT.ImageNativeXfer, TwMSG.Get, ref hbitmap);)
Thanks.