Gets a string pointer containing the ID for the currently selected device.
#include "ltwrappr.h"
virtual L_TCHAR * LWia::GetSelectedDevice()
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:GetSelectedDevice to get a string representing the ID for the currently selected device.
WIA does not have a default device selection. In order for [LWia:GetSelectedDevice to succeed, be sure to call either LWia::SelectDeviceDlg or LWia::SelectDevice before calling [LWia:GetSelectedDevice.
When using LWia::AcquireSimple for automatic acquisition, it is not necessary to call either of the two functions mentioned above before calling [LWia:GetSelectedDevice. LWia::AcquireSimple calls LWia::SelectDeviceDlg internally, ensuring that a device is currently selected.
For an example, refer to LWia::EnumDevices.