LEADTOOLS WIA (Leadtools.Wia assembly)
LEAD Technologies, Inc

GetSelectedDevice Method






Gets a string that contains the ID for currently selected device.
Syntax
public string GetSelectedDevice()
'Declaration
 
Public Function GetSelectedDevice() As String
'Usage
 
Dim instance As WiaSession
Dim value As String
 
value = instance.GetSelectedDevice()
public string GetSelectedDevice()
 function Leadtools.Wia.WiaSession.GetSelectedDevice()
public:
String^ GetSelectedDevice(); 

Return Value

String that contains the ID for currently selected device. If an error occurs, an exception is thrown.
Remarks

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 SelectDeviceDlg or SelectDevice before calling this method.

Note:

If you are using the AcquireSimple method to automatically acquire from your device then it is not necessary to call either of the two mentioned functions above before calling the GetSelectedDevice since AcquireSimple method internally calls the SelectDeviceDlg method and this will assure you have a device currently selected.
Example
Refer to WiaSession.EnumDevices
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

WiaSession Class
WiaSession Members
Startup Method
Shutdown Method
EnumDevices Method
SelectDeviceDlg Method
SelectedDeviceType Property
AcquireSimple Method

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.