LWia::GetSelectedDevice

#include "ltwrappr.h"

virtual L_TCHAR * LWia::GetSelectedDevice()

Gets a string pointer that contains the ID for currently selected device.

Returns

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 this function to get a string that represents the ID for the currently selected device.

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

Note that if you are using the LWia::AcquireSimple function to automatically acquire from your device then it is not necessary to call either of the two mentioned functions above before calling the LWia::GetSelectedDevice (LWia::AcquireSimple function internally calls the LWia::SelectDeviceDlg function and this will assure you have a device currently selected).

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.

See Also

Functions:

LWia::SelectDevice, LWia::GetSelectedDeviceType, LWia::SelectDeviceDlg, LWia::AcquireSimple, LWia::InitSession, LWia::EndSession, Class Members

Topics:

Managing WIA Sources

 

WIA Functionality: Property Functions

Example

For an example, refer to LWia::EnumDevices.