After a handle to a WIA session has been established, the WIA source to use for acquiring images should be selected. WIA does not include a default device selection feature, so it is important to select a device. Use the LWia::EnumDevices function to determine the WIA sources available on the system. This function enumerates all available WIA sources and calls the LWia::EnumDevicesCallBack callback function for each WIA source found, retrieving its ID, name and description.
LEADTOOLS WIA offers two functions for selecting the WIA source to use for acquiring images:
LWia::SelectDeviceDlg. Displays a dialog that lists all available sources installed on the system in order for the user to select a device.
LWia::SelectDevice. Selects the WIA device without displaying the Select Device dialog. To do this, enumerate the WIA devices by calling the LWia::EnumDevices function. Then use it to keep a list of all received device IDs. Then call the LWia::SelectDevice function using the device ID for the device to be selected.
Once a device is selected, use the LWia::GetSelectedDevice function to get the selected device ID as string.
Also you can use the LWia::GetSelectedDeviceType function to determine the type of the device currently selected at the runtime to check whether its a scanner, camera or streaming video device.