DeviceNames

Description

Gets the names for a scanner device.

Applies to

BarcodeScanner objects

Syntax

Integer scanner.DeviceNames ( names )

Argument

Description

scanner

The scanner object associated with the scanner device for which you want to get a name

names

A string value for scanner device names that is passed by reference in the following format:

device_name<tab>user_friendly_name<tab>port_name

Returns

Integer. Returns 1 for success or one of the following negative values if an error occurs:

Usage

Call DeviceNames to determine the attached scanner device or devices. The default scanner device name is SCN1 for a Symbol scanner, and an empty string for a Socket scanner. You can parse the names argument value on the position of the tab characters to obtain separate strings for the short device name, the user-friendly (long) device name, and the port name used by the scanner device.

Examples

Example 1

The following example gets a string with the tab separated names for the scanner device and its port:

string l_names

li_rtn = l_scanner.DeviceNames(l_names)

See also