tags:

views:

1129

answers:

1

How do you get a image from the scanner using .NET (C#) on Vista? Preferably to have the possibility to set the DPI.

There are a few controls on the market that do this, but they don't seem to work very well.

+2  A: 

You can P/Invoke into twain_32.dll, like with the CodeProject sample at http://www.codeproject.com/KB/dotnet/twaindotnet.aspx.

There's also Window Image Aquisition automation in wiaaut.dll, for which you get an automatically-generated wrapper as in the Coding4Fun sample at http://blogs.msdn.com/coding4fun/archive/2006/10/31/912546.aspx

Mark Cidade