Leadtools.Wia Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
GetSelectedDevice Method
See Also 
Leadtools.Wia Namespace > WiaSession Class : GetSelectedDevice Method



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

Syntax

Visual Basic (Declaration) 
Public Function GetSelectedDevice() As String
Visual Basic (Usage)Copy Code
Dim instance As WiaSession
Dim value As String
 
value = instance.GetSelectedDevice()
C# 
public string GetSelectedDevice()
C++/CLI 
public:
String^ GetSelectedDevice(); 

Return Value

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

Example

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

Note:

If you are using the WiaSession.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 WiaSession.AcquireSimple method internally calls the WiaSession.SelectDeviceDlg method and this will assure you have a device currently selected.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Vista, Windows Server 2003 family, Windows Server 2008 family

See Also