Beispiel #1
0
 public void Finish()
 {
     this.CloseSrc();
     if (this.appid.Id != IntPtr.Zero)
     {
         TwRC twRC = Twain.DSMparent(this.appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.CloseDSM, ref this.hwnd);
     }
     this.appid.Id = IntPtr.Zero;
 }
Beispiel #2
0
        public void Init(IntPtr hwndp)
        {
            this.Finish();
            TwRC twRC = Twain.DSMparent(this.appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.OpenDSM, ref hwndp);

            if (twRC == TwRC.Success)
            {
                twRC = Twain.DSMident(this.appid, IntPtr.Zero, TwDG.Control, TwDAT.Identity, TwMSG.UserSelect, this.srcds);
                if (twRC == TwRC.Success)
                {
                    this.hwnd = hwndp;
                }
                else
                {
                    twRC = Twain.DSMparent(this.appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.CloseDSM, ref hwndp);
                }
            }
            TwIdentity twIdentity = this.srcds;
        }