GetSize Function

Description

Retrieves the byte size of a memory file from a Sentinel protection key.

Syntax

hasp_status_t HASP_CALLCONV hasp_get_size(
        hasp_handle_t handle,
        hasp_fileid_t fileid,
        hasp_size_t * size
        )

Parameters

handle

Handle for the session

fileid

Identifier for the file that is to be queried.

Possible values are:

>For default read-only memory: HASP_FILEID_RO

>For default read/write memory: HASP_FILEID_RW

>For a dynamic memory file (read-only, read/write, or read/write-once): The ID that was assigned to the file when the file was created. The ID is a value from 1 through 65471.

NOTE   Dynamic memory files are supported by Sentinel SL keys and Sentinel HL (Driverless configuration) keys (excluding HL Basic and HL Pro keys).

size

Pointer to the resulting file size.

Return Values

HASP_STATUS_OK

HASP_INV_HND

HASP_INV_FILEID

HASP_BROKEN_SESSION

HASP_DEVICE_ERR

HASP_LOCAL_COMM_ERR

HASP_REMOTE_COMM_ERR

HASP_IDENTITY_RATE_LIMIT_EXCEEDED

Usage Notes

This function is used to determine the size of a memory file in a Sentinel protection key. This information is useful when reading or writing to the memory of a Sentinel protection key.

Related Topics

Read Function

Write Function

hasp_get_size screen