LWia::GetSelectedDeviceType

Summary

Gets the currently selected device type.

Syntax

#include "ltwrappr.h"

virtual L_INT LWia::GetSelectedDeviceType(puDeviceType)

Parameters

L_UINT32 * puDeviceType

The type of the device that is currently connected. Possible values are:

Value Meaning
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.

Returns

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

Comments

This feature is available in LEADTOOLS version 16 or higher.

Call [LWia:GetSelectedDeviceType to determine which device type is currently selected.

WIA does not have a default device selection. In order for [LWia:GetSelectedDeviceType to succeed, be sure to call either LWia::SelectDeviceDlg or LWia::SelectDevice before calling [LWia:GetSelectedDeviceType.

LWia::AcquireSimple Exception

When using LWia::AcquireSimple for automatic acquisition, it is not necessary to call either of the two functions mentioned above before calling [LWia:GetSelectedDeviceType. LWia::AcquireSimple calls LWia::SelectDeviceDlg internally, ensuring a device is currently selected.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to LWia::EnumDevices.

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

LEADTOOLS WIA C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.