Share via


PosCommon.DevicePath Property

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Usage

'Usage
Dim posCommon1 As PosCommon

Dim returnValue As String
returnValue = posCommon1.DevicePath

Dim sampleValue As String
posCommon1.DevicePath = sampleValue

Syntax

'Declaration
Protected Property DevicePath() As String
protected string DevicePath {get; set;}
protected: property String^ DevicePath{
    String^ get();
    Void set(String^);
}
protected System.String get_DevicePath();
protected void set_DevicePath(System.String);
protected function get DevicePath() : String;
protected function set DevicePath(String);

Remarks

Contains the hardware path of a device.

The PosExplorer class attempts to initialize DevicePath to the hardware path of the physical device using the following algorithm:

  1. If the physical hardware supports Plug and Play and the service object is mapped to a specific hardware ID via the HardwareId custom attribute or a configuration XML file, PosExplorer class will set DevicePath to the HardwarePath of the physical device. Service objects can typically use this DevicePath to directly access the device.

  2. If the device does not support Plug and Play, but has been configured via Posdm.exe or WMI, DevicePath will be set to the path specified when the device was configured.

  3. If the device does not support Plug and Play and has not been configured via Posdm.exe or WMI, DevicePath will be set to empty string (“”) and must be set by the service object before the Open method in the base/basic class can be called.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

PosCommon Class
PosCommon Members
Microsoft.PointOfService Namespace
DeviceDescription
DeviceName