Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154.
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 listbox 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); } } } } }
WIA.DeviceManager deviceManager = new WIA.DeviceManagerClass();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)