[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
Re: CONVERT FROM C# vs2010 - FOR SCAN
Are you adding the correct COM reference in VC++? How are you adding the COM reference?
Re: CONVERT FROM C# vs2010 - FOR SCAN
Thanks Arjay, Added & Found the solution. Thanks.