hi really i need help in this i typed this code to load all connected scanner device to acombobox but it work in windows 7 in windows xp i got this noisy exception
Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154.
this is my code
public static void LoadScanners(ComboBox c)
{
MC.enableWIA();
string deviceName = "";
c.Items.Clear();
WIA.DeviceManager deviceManager = new WIA.DeviceManagerClass();
// Loop through the list of devices and add the name to the combobox
foreach (WIA.DeviceInfo info in deviceManager.DeviceInfos )
{
if (info.Type == WIA.WiaDeviceType.ScannerDeviceType)
{
foreach (WIA.Property p in info.Properties)
{
if (p.Name == "Name")
{
deviceName = ((WIA.IProperty)p).get_Value().ToString();
c.Items.Add(deviceName);
}
}
}
}
}
exception occur at this line
WIA.DeviceManager deviceManager = new WIA.DeviceManagerClass();