#include "ltwrappr.h"
virtual L_INT LWia::SelectDeviceDlg(uDeviceType, uFlags)
L_UINT32 uDeviceType; |
WIA device type |
L_UINT32 uFlags; |
optional flags |
Displays a dialog box that enables the user to select a WIA hardware device for image acquisition. You can specify the parent window for this dialog by calling the LScanner::SetWindow function.
Parameter | Description | |
uDeviceType | 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. |
uFlags | 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. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This feature is available in LEADTOOLS 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 LWia::SelectDeviceDlg does not display the Select Device dialog box. Override this behavior and force the LWia::SelectDeviceDlg 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. |
Note: |
You do not need to call LWia::EndSession if you are using the high-level LWia::AcquireSimple function, since it handles session initialization, session end, and device selection automatically |
Required DLLs and Libraries
LTWIA For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
For an example, refer to LWia::IsAvailable.