c# - WIA Scanning throws exception while using ADF Scanner -


i using adf scanner library gideon (http://adfwia.codeplex.com/) , have hit small problem. while can scan file throws exception when saving. i'll post full code:

private void button1_click(object sender, eventargs e)     {         adfscan _scanner;         int[] _colors = { 1, 2, 4 };         int count = 0;         _scanner = new adfscan();         _scanner.scanning += new eventhandler<wiaimageeventargs>(_scanner_scanning);         _scanner.scancomplete += new eventhandler(_scanner_scancomplete);         scancolor selectedcolor = scancolor.color;        // scancolor selectedcolor = (scancolor)_colors[combobox1.selectedindex];         int dpi = 300;         _scanner.beginscan(selectedcolor, dpi);       }     void _scanner_scancomplete(object sender, eventargs e)     {         messagebox.show("scan complete");     }     void _scanner_scanning(object sender, wiaimageeventargs e)     {//e.scannedimage system.drawing.image         int count = 0;         string filename = "c:\\test.jpg";         e.scannedimage.save(filename, imageformat.jpeg);//files returned bitmaps       } 

the program begins scan without issue, , in fact can scan multiple pages @ same time (what needed!) exception thrown one

the system cannot find file specified. (exception hresult: 0x80070002) 

huh? experience can me? lot in advance =)


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -