L_WiaSelectDeviceDlg

#include "ltwia.h"

L_LTWIA_API L_INT EXT_FUNCTION L_WiaSelectDeviceDlg(hSession, hWndParent, uDeviceType, uFlags)

HWIASESSION hSession;

handle to an existing WIA session

HWND hWndParent;

handle to your parent window

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.

Parameter Description
hSession Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.
hWndParent Handle to the parent window or dialog for the Select Device dialog.
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. 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

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.

Note:

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

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.

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS WIA C API Help