Share via


HardTotals.Create Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Creates a totals file.

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

Syntax

'Declaration
Public MustOverride Function Create ( _
    fileName As String, _
    size As Integer, _
    errorDetection As Boolean _
) As Integer
public abstract int Create (
    string fileName,
    int size,
    bool errorDetection
)
public:
virtual int Create (
    String^ fileName, 
    int size, 
    bool errorDetection
) abstract
public abstract int Create (
    String fileName, 
    int size, 
    boolean errorDetection
)
public abstract function Create (
    fileName : String, 
    size : int, 
    errorDetection : boolean
) : int

Parameters

  • fileName
    The name to be assigned to the file.Must not exceed 10 characters. All displayable characters - characters ≥ 20-hex – are valid.
  • size
    The length of the file in bytes. When it is created, the file size cannot be changed: totals files are fixed-length files.
  • errorDetection
    The level of error detection desired for this file:If true, the service object enables advanced error detection if supported.If false, better performance access is required so that advanced error detection do not have to be enabled for this file.

Remarks

Creates a totals file that has the specified name, size, and error-detection level. The data area is initialized to binary zeros.

If CapSingleFile is true, only one file may be created, and its name must be the empty string (""). Otherwise, the number of totals files that may be created is limited only by the free space in the hard totals area.

Create returns a file handle if this is successful, and may cause a PosControlException to be thrown with one of the following ErrorCodes.

Value

Meaning

Claimed

Cannot create because the totals file area is claimed by another application.

Illegal

The fileName is too long or contains invalid characters.

Exists

fileName already exists.

Extended

ExtendedErrorNoRoom:There is insufficient room in the totals area to create the file.

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
Find
Delete
Rename