Share via


HardTotals.Write Method

2/27/2008

Writes data to a totals file.

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

Syntax

'Declaration
Public MustOverride Sub Write ( _
    handle As Integer, _
    data As Byte(), _
    offset As Integer _
)
public abstract void Write (
    int handle,
    byte[] data,
    int offset
)
public:
virtual void Write (
    int handle, 
    array<unsigned char>^ data, 
    int offset
) abstract
public abstract void Write (
    int handle, 
    byte[] data, 
    int offset
)
public abstract function Write (
    handle : int, 
    data : byte[], 
    offset : int
)

Parameters

  • handle
    Totals file handle returned from a Create or Find method.
  • data
    Data buffer that contains the totals data to be written.
  • offset
    Starting offset for the data to be written.

Remarks

If a transaction is in progress, the write will be buffered until a CommitTrans or Rollback method is called.

Write may cause a PosControlException to be thrown with one of the following ErrorCodes.

Value

Meaning

Claimed

Cannot write data because either the totals file or the totals area is claimed by another application.

Illegal

The handle is invalid, or part of all the data range is outside the bounds of the totals file.

Extended

ExtendedErrorNoRoom:Cannot write because a transaction is in progress, and there is insufficient free space to prepare for the transaction commit.

ExtendedErrorValidation:A validation error has occurred while you read data.

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

HardTotals Class
HardTotals Members
Microsoft.PointOfService Namespace
HardTotals.Read Method
HardTotals.BeginTrans Method
HardTotals.CommitTrans Method
HardTotals.Rollback Method
FreeData