title: Twain scanner customizing for MVC
body: <p>I am using <a href="http://www.codeproject.com/Articles/1376/NET-TWAIN-image-scanner" rel="nofollow">http://www.codeproject.com/Articles/1376/NET-TWAIN-image-scanner</a> and I am trying to adapt it to MVC. The problem is in this line of code</p>
  
  <p>tw.Init(this.Handle);</p>
  
  <p>this.Handle is a IntPtr, and I dont know how to change that to use in MVC.</p>
  
  <p>tw.Init methods code:</p>
  
  <pre><code>public void Init( IntPtr hwndp )
  {
        Finish();
  
  TwRC rc = DSMparent( appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.OpenDSM, ref hwndp );           
  
  if( rc == TwRC.Success )
  
          {
  
  rc = DSMident( appid, IntPtr.Zero, TwDG.Control, TwDAT.Identity, TwMSG.GetDefault, srcds );
  
          if( rc == TwRC.Success )
  
              hwnd = hwndp;
  
          else
  
  rc = DSMparent( appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.CloseDSM, ref hwndp );
  
          }
  
      }
  </code></pre>