#include "ltwia.h"
L_LTWIA_API L_INT EXT_FUNCTION L_WiaSelectDeviceDlg(hSession, hWndParent, uDeviceType, uFlags)
Displays a dialog box that enables the user to select a WIA hardware device for image acquisition.
Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.
Handle to the parent window or dialog for the Select Device dialog.
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. Can be set to any of the following values:
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 version 16 or higher.
This function creates and displays the Select Device dialog box so the user can select a WIA device for image acquisition.
Particular types of devices may be displayed to the user by specifying the device types through the uDeviceType parameter.
If only one device meets the specification, the L_WiaSelectDeviceDlg does not display the Select Device dialog box. Override this behavior and force the L_WiaSelectDeviceDlg to display the Select Device dialog box by passing L_WIA_SELECT_DEVICE_NODEFAULT as the value for the uFlags parameter.
✎ NOTE
WIA 2.0 does not support cameras or streaming video.
You do not need to call L_WiaEndSession if you are using the high-level L_WiaAcquireSimple function, since it handles session initialization, session end, and device selection automatically.
Required DLLs and Libraries
For an example, refer to L_WiaIsAvailable.