Share via


PosExplorer.CreateInstance Method

2/27/2008

Creates an instance of the service object based on the information supplied by the property values of the DeviceInfo object.

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

Syntax

'Declaration
Public Function CreateInstance ( _
    device As DeviceInfo _
) As PosDevice
public PosDevice CreateInstance (
    DeviceInfo device
)
public:
PosDevice^ CreateInstance (
    DeviceInfo^ device
)
public PosDevice CreateInstance (
    DeviceInfo device
)
public function CreateInstance (
    device : DeviceInfo
) : PosDevice

Parameters

  • device
    An object that describes the device that you want to create an instance of, and which is an instance of the DeviceInfo class. DeviceInfo contains Compatibility, Description, HardwareID properties and so on for the device.

Remarks

CreateInstance returns an instance of the specified service object class cast to PosDevice. An application must then cast it to a more specific class (such as Msr, Scanner, or PosPrinter).

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

PosExplorer Class
PosExplorer Members
Microsoft.PointOfService Namespace