Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
L_WiaGetSelectedDevice
#include "ltwia.h"
L_LTWIA_API L_TCHAR* EXT_FUNCTION L_WiaGetSelectedDevice(hSession)
HWIASESSION hSession; |
/* handle to an existing WIA session */ |
Gets a string pointer that contains the ID for currently selected device.
Parameter |
Description |
hSession |
Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This feature is available in 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 L_WiaSelectDeviceDlg or L_WiaSelectDevice before calling this function.
Note that if you are using the L_WiaAcquireSimple function to automatically acquire from your device then it is not necessary to call either of the two mentioned functions above before calling the L_WiaGetSelectedDevice (L_WiaAcquireSimple function internally calls the L_WiaSelectDeviceDlg 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. |
Platforms
Earlier and later operating systems than Windows XP for WIA Version 1.
Windows VISTA or later for WIA Version 2.
See Also
Functions: |
L_WiaSelectDevice, L_WiaGetSelectedDeviceType, L_WiaSelectDeviceDlg, L_WiaAcquireSimple, L_WiaInitSession, L_WiaEndSession. |
Topics: |
|
|
Example
For an example, refer to L_WiaEnumDevices.