Creates and displays the Select Device dialog box so a WIA device for image acquisition can be selected. Specify the parent window for this dialog by calling the LScanner::SetWindow function.
#include "ltwrappr.h"
virtual L_INT LWia::SelectDeviceDlg(uDeviceType, uFlags)
Specifies which type of WIA device to use. Possible values are:
Value | Meaning |
---|---|
WiaDeviceTypeDefault | Generic WIA device. During device enumerations, this constant is used to enumerate all WIA devices. This is the default value. |
WiaDeviceTypeScanner | The device is a scanner. |
WiaDeviceTypeDigitalCamera | The device is a camera. Cameras are not supported by Windows Vista and later. |
WiaDeviceTypeStreamingVideo | The device contains streaming video. Streaming video is not supported by Windows Server 2003, Windows Vista, or later. |
Specifies dialog box behavior. Possible values are:
Value | Meaning |
---|---|
0 | Use the default behavior. This is the default value. |
L_WIA_SELECT_DEVICE_NODEFAULT | Display the dialog box even if there is only one matching device. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This feature is available in LEADTOOLS version 16 or higher.
Creates and displays the Select Device dialog box so a WIA device for image acquisition can be selected.
Use the uDeviceType parameter to specify which types of devices to display in the dialog.
If only one device meets the specification, the [LWia:SelectDeviceDlg does not display the Select Device dialog box. Override this behavior and force [LWia:SelectDeviceDlg to display the Select Device dialog box by passing L_WIA_SELECT_DEVICE_NODEFAULT as the value for the uFlags parameter.
Notes
WIA 2.0 does not support cameras or streaming video.
If you are using the high-level LWia::AcquireSimple, you do not need to call LWia::InitSession, LWia::SelectDevice, or LWia::EndSession because it handles session initialization, device selection, and session end automatically.
For an example, refer to LWia::IsAvailable.