public ScannerManager(IntPtr hwnd)
 {
     this.hwnd = hwnd;
     tw        = isTwain2Enable ? new Twain64NativeMethods() : (TwainNativeMethods) new Twain32NativeMethods();
     CreateAppId();
     CurrentScanner  = -1;
     evtmsg          = new TwEvent();
     evtmsg.EventPtr = Marshal.AllocHGlobal(Marshal.SizeOf(winmsg));
     OpenDSM();
 }
 public static extern TwRC DSevent([In, Out] TwIdentity origin, [In, Out] TwIdentity dest, TwDG dg, TwDAT dat, TwMSG msg, ref TwEvent evt);
 public bool ProcessEvent(TwIdentity dataSourceId, ref TwEvent result)
 {
   TwRC rc = LibTwain32.DSevent(fApplicationId, dataSourceId, TwDG.Control, TwDAT.Event, TwMSG.ProcessEvent, ref result);
   return (bool)(rc != TwRC.NotDSEvent);
 }
예제 #4
0
 public TwRC DsEvent([In, Out] TwIdentity origin, [In, Out] TwIdentity dest, TwDG dg, TwDAT dat, TwMSG msg, ref TwEvent twevent)
 {
     return(DsEntryEvent(origin, dest, dg, dat, msg, ref twevent));
 }
예제 #5
0
 internal static extern TwRC DsEntryEvent([In, Out] TwIdentity origin, [In, Out] TwIdentity dest, TwDG dg, TwDAT dat, TwMSG msg, ref TwEvent twevent);