<p>I want to implement a paperless filing system and was looking to use WIA with C# for the image acquisition. There are quite a few sample projects on CodeProject, etc. However, after downloading every one of them that I can find, I have run into a problem.</p>

<p>In each and every one of them, the reference to WIALib is broken. When I go to add "Microsoft Windows Image Acquisition" as a reference, the only version available on my development workstation (also the machine that will run this) is 2.0.</p>

<p>Unfortunately, every one of these sample projects appear to have been coded against 1.x. The reference goes in as "WIA" instead of "WIALib". I took a shot, just changing the namespace import, but clearly the API is drastically different.</p>

<p>Is there any information on either implementing v2.0 or on upgrading one of these existing sample projects out there?</p>

[{'answer_id': 9026, 'author': 'J Wynia', 'author_id': 1124, 'author_profile': 'https://Stackoverflow.com/users/1124', 'pm_score': 0, 'selected': False, 'text': "<p>It doesn't <strong>need</strong> to be WIA. I was mostly looking at the WIA setup because it offers the same basic interface for different scanners. I've got 3 scanners on this machine and the TWAIN drivers/software for all of them suck (like blocking the screen during scanning).</p>\n\n<p>For document management, I'm really looking for simple 200dpi grayscale scans, so most of the stuff in the TWAIN drivers is overkill. </p>\n\n<p>That said, asking here was part of my last attempt to figure out how to do it in WIA before moving on to TWAIN.</p>\n"}, {'answer_id': 107940, 'author': 'Paul Jenkins', 'author_id': 657177, 'author_profile': 'https://Stackoverflow.com/users/657177', 'pm_score': 6, 'selected': True, 'text': '<p>To access WIA, you\'ll need to add a reference to the COM library, "Microsoft Windows Image Acquisition Library v2.0" (wiaaut.dll).\nadd a "using WIA;"</p>\n\n<pre><code>const string wiaFormatJPEG = "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}";\nCommonDialogClass wiaDiag = new CommonDialogClass();\nWIA.ImageFile wiaImage = null;\n\nwiaImage = wiaDiag.ShowAcquireImage(\n        WiaDeviceType.UnspecifiedDeviceType, \n        WiaImageIntent.GrayscaleIntent, \n        WiaImageBias.MaximizeQuality, \n        wiaFormatJPEG, true, true, false);\n\nWIA.Vector vector = wiaImage.FileData;\n</code></pre>\n\n<p>(System.Drawing)</p>\n\n<pre><code>Image i = Image.FromStream(new MemoryStream((byte[])vector.get_BinaryData()));\ni.Save(filename)\n</code></pre>\n\n<p>Thats a basic way, works with my flatbed/doc feeder. If you need more than one document/page at a time though, there is probably a better way to do it (from what I could see, this only handles one image at a time, although I\'m not entirely sure). While it is a WIA v1 doc, Scott Hanselman\'s <a href="http://blogs.msdn.com/coding4fun/archive/2006/10/31/912546.aspx" rel="noreferrer">Coding4Fun article on WIA</a> does contain some more info on how to do it for multiple pages, I think (I\'m yet to go further than that myself)</p>\n\n<p>If its for a paperless office system, you might want also check out MODI (Office Document Imaging) to do all the OCR for you.</p>\n'}, {'answer_id': 146127, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Another note: You have to download the WIA 2.0 dll from Microsoft.com and then browse to the dll and add it to your project.</p>\n'}, {'answer_id': 3321118, 'author': 'gideon', 'author_id': 368070, 'author_profile': 'https://Stackoverflow.com/users/368070', 'pm_score': 1, 'selected': False, 'text': '<p>Heres how to target WIA 1.0 also so you can ship your app to Windows Xp. Something I was desperately looking for!!\n<a href="https://stackoverflow.com/questions/678844/how-to-develop-using-wia-1-under-vista">How to develop using WIA 1 under Vista?</a></p>\n'}, {'answer_id': 7220414, 'author': 'gideon', 'author_id': 368070, 'author_profile': 'https://Stackoverflow.com/users/368070', 'pm_score': 1, 'selected': False, 'text': '<p><strong>Update</strong>: I\'m adding this separately since its a different answer (a year later). I learnt XP has WIA 1.0 and Vista onward has WIA2.0. You can however install WIA 2.0 for Windows XP Sp1+ from <a href="http://www.microsoft.com/download/en/details.aspx?id=18287" rel="nofollow">here</a>.</p>\n\n<p>I then also made a small library with code I found somewhere on the interweb here, it also has the ability to scan multiple pages:\n<a href="http://adfwia.codeplex.com/" rel="nofollow">http://adfwia.codeplex.com/</a></p>\n'}]
['https://Stackoverflow.com/questions/8966', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1124/']