#include "ltwrappr.h"

virtual L_INT LWia::GetSelectedDeviceType(puDeviceType)

Gets the currently selected device type.


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.


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


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

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

LEADTOOLS WIA C++ Class Library Help