Share via


PosCommon.CompareFirmwareVersion Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Determines whether the version of the specified firmware is newer than, older than, or the same as the version of firmware in the physical device.

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

Syntax

'Declaration
Public Overridable Function CompareFirmwareVersion ( _
    firmwareFileName As String _
) As CompareFirmwareResult
public virtual CompareFirmwareResult CompareFirmwareVersion (
    string firmwareFileName
)
public:
virtual CompareFirmwareResult CompareFirmwareVersion (
    String^ firmwareFileName
)
public CompareFirmwareResult CompareFirmwareVersion (
    String firmwareFileName
)
public function CompareFirmwareVersion (
    firmwareFileName : String
) : CompareFirmwareResult

Parameters

  • firmwareFileName
    The name of the file that contains the firmware, or the name of a file that contains a list of firmware files.

Remarks

Before it tries to perform the comparison, the Service Object should verify that the specified firmware file exists and that its contents are valid for the device.

Note

If the firmwareFileName parameter specifies a list of files, all those component firmware files should reside in the same directory as the firmware list file. This will allow for distribution of the updated firmware without requiring a modification to the firmware list file.

If it is successful, CompareFirmwareVersion returns one of the following values of the CompareFirmwareResult enumeration.

Member

Description

Different

Indicates that the version of one or more of the firmware files differs from the firmware in the device, but either:

  • The chronological relationship cannot be determined, or

  • The relationship is inconsistent, one or more are older while one or more are newer.

Newer

Indicates that the version of one or more of the firmware files is newer than the firmware in the device and that none of the firmware files is older than the firmware in the device.

Older

Indicates that the version of one or more of the firmware files is older than the firmware in the device and that none of the firmware files is newer than the firmware in the device.

Same

Indicates that the versions of all the firmware files are the same as the firmware in the device.

Unknown

Indicates that a relationship between the two firmware versions could not be determined. A possible reason for this result could be an attempt to compare Japanese and US versions of firmware.

CompareFirmwareVersion may throw a PosControlException exception with the following values:

Value

Meaning

Illegal

The CapCompareFirmwareVersion property is set to false, indicating the Service Object or device does not support firmware comparison.

NoExist

The file specified by firmwareFileName does not exist, or if firmwareFileName specifies a list of files, one or more of the component firmware files is missing.

ExtendedErrorFirmwareBadFile

ExtendedErrorFirmwareBadFile. Either the firmware file is in an incorrect format or is corrupted.

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
CapCompareFirmwareVersion