-
April 1st, 2018, 05:57 AM
#1
[RESOLVED] CONVERT FROM C# vs2010 - FOR SCAN
Hi,
I am using the following code in C# to find the scanner & scan the image. But in Visual C++ windows forms I cannot find WIA reference. Once I add reference Microsoft Windows Image Acquisition Library v2.0 then I can found WIA on project references. But
in Visual C++ Once I add COM references, its showing in Interop.WIA.1.0.dll
And I used the following code in C#
Code:
private void button3_Click(object sender, EventArgs e)
{
var devicemanager = new DeviceManager();
WIA.DeviceInfo FirstScannerAvailable = null;
for (int j = 1; j <= devicemanager.DeviceInfos.Count; j++)
{
if (devicemanager.DeviceInfos[j].Type != WiaDeviceType.ScannerDeviceType)
{
continue;
}
FirstScannerAvailable = devicemanager.DeviceInfos[j];
break;
}
}
Does Anybody can help me.
Thanks
Last edited by 2kaud; April 1st, 2018 at 06:09 AM.
Reason: Fixed code tags
-
April 1st, 2018, 03:25 PM
#2
Re: CONVERT FROM C# vs2010 - FOR SCAN
Are you adding the correct COM reference in VC++? How are you adding the COM reference?
-
April 1st, 2018, 10:56 PM
#3
Re: CONVERT FROM C# vs2010 - FOR SCAN
Thanks Arjay, Added & Found the solution. Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|