# Hasp.GetFile Method

Namespace: Aladdin.Hasp

## Description

Returns an instance of the HaspFile class. The instance references the same key as the instance of the Hasp class.

## Syntax

    HaspFile GetFile(HaspFileId fileId)

## Parameters

`fileId` | Identifier for the file. 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).

## Return Values

An instance of the HaspFile class.

## Overloaded Methods

The following overloaded methods are provided. They differ from the method above only in the argument type that they accept.

    HaspFile GetFile ( int fileId )