Share via


PosCommon.DevicePath Property (POS for .NET v1.12 SDK Documentation)

2/27/2008

Gets or sets the hardware path of a device.

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

Syntax

'Declaration
Protected Property DevicePath As String
protected string DevicePath { get; set; }
protected:
property String^ DevicePath {
    String^ get ();
    void set (String^ value);
}
/** @property */
protected String get_DevicePath ()

/** @property */
protected void set_DevicePath (String value)
protected function get DevicePath () : String

protected function set DevicePath (value : String)

Remarks

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

  1. If the physical hardware supports Plug and Play and the Service Object is mapped to a specific hardware ID through the HardwareId custom attribute or a configuration XML file, the PosExplorer class sets the DevicePath property to the HardwarePath property of the physical device. Service Objects can typically use this DevicePath property to directly access the device.

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

  3. If the device does not support Plug and Play and has not been configured through Posdm.exe or WMI, the DevicePath property 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.

See Also

Reference

PosCommon Class
PosCommon Members
Microsoft.PointOfService Namespace
PosCommon.DeviceDescription Property
PosCommon.DeviceName Property