L_WiaSelectDeviceDlg

#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.

Parameters

HWIASESSION hSession

Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.

HWND hWndParent

Handle to the parent window or dialog for the Select Device dialog.

L_UINT32 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.

L_UINT32 uFlags

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.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

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

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS WIA C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.