24U SimpleHASP Plug-In 1.1 Syntax

This file describes syntax of 24U SimpleHASP Plug-In's functions.
 

SHasp_Version ( { versionFormat } )
 
Returns version string of the active 24U SimpleHASP Plug-In, formatted as requested by the parameter. Use:

"short" to get just the version number
"long" to get the plug-in name followed by its version number
"platform" to get the platform of the code currently running
 

SHasp_Register ( registrationCode )
 
Attempts to unlock (register) your copy of 24U SimpleHASP Plug-In with the specified code. If the code is valid, 24U SimpleHASP Plug-In gets unlocked and stays in this state until you quit the FileMaker application, deactivate the plug-in, or the registration code expires. While unlocked, 24U SimpleHASP Plug-In is fully functional and does not bother the user with a shareware reminder.
 
Returns a non-zero result when operation is not permitted.
 

SHasp_Get( feature_id ; vendor_code ; selector )
 
Returns the current value of a HASP HL key parameter selected by selector.

feature_idIf you have solution with several modules, each module chan be protected separately by assigning it a specified number. Use 0 if you don't have more modules to protect.
vendor_codeis a unique code assigned by Aladdin to their customers to identify them for HASP HL keys. HASP keys which you have ordered have assigned unique vendor_code which is stored on Master Key. Tutorial and Examples for 24U SimpleHASP Plug-In use special DEMO vendor_code which works with DEMO key which can be ordered from Aladdin for free. 
selectorreturns information regarding a session context
    "rtc"    returns the current time from HASP HL Time key
    "session-info"    returns information regarding a session context
    "size"    returns the memory size of HASP HL Key in bytes

If an error occurs the function returns error code according to Aladdin API. See the list of common errors at the end of the document.
In case of syntax error the function returns -50.

Examples:

SHasp_Get( 0 ; vendor_code ; "rtc" )   returns the current time from HASP HL Time key
SHasp_Get( 0 ; vendor_code ; "session-info" )   returns information regarding a session context
SHasp_Get( 0 ; vendor_code ; "size" )   returns the memory size of HASP HL Key in bytes

SHasp_Encrypt( feature_id ; vendor_code ; data )
 
Returns encrypted data using AES encryption algorithm. The returned data is a text type. The data parameter can be any type of FileMaker Pro data.
If an error occurs the function returns error code according to Aladdin API. See the list of common errors at the end of the document.
In case of syntax error the function returns -50.

SHasp_Decrypt( feature_id ; vendor_code ; data )
 
Returns decrypted data using AES encryption algorithm. Input data parameter is a text representing encrypted data from SHasp_Encrypt function. The data in result is the original FileMaker Pro data of original type.
This function is not compatible with data encrypted with 24U SimpleHASP Plug-In 1.0.
If an error occurs the function returns error code according to Aladdin API. See the list of common errors at the end of the document.
In case of syntax error the function returns -50.

SHasp_Read( feature_id ; vendor_code ; fileid { ; offset { ; length } } )
 

fileid   Identifies file within HASP HL memory. Use 65520 for default file.

Reads a memory of HASP HL key and returns it.
If an error occurs the function returns error code according to Aladdin API. See the list of common errors at the end of the document.
In case of syntax error the function returns -50.

SHasp_Update( update_data )
 
Writes and update for a HASP HL license, returns acknowledgment code.
If an error occurs the function returns error code according to Aladdin API. See the list of common errors at the end of the document.
In case of syntax error the function returns -50.

SHasp_Write( feature_id ; vendor_code ; fileid ; offset ; length ; data )
 
Writes to a memory of HASP HL key. It returns 0.
Use 0 for the length parameter to determine data size automatically.
If an error occurs the function returns error code according to Aladdin API. See the list of common errors at the end of the document.
In case of syntax error the function returns -50.

List of most common HASP HL keys error codes

1 Your request exceeds the HASP HL memory range.
2 You have requested an unknown feature_id.
3 Your system is out of memory.
5 Access to feature is denied.
6 The legacy decryption function cannot work on the feature.
7 The HASP HL key is no longer available.
11 The installed driver is too old to execute the function.
12 A real-time clock (rtc) is not available.
14 The required driver is not installed.
22 You have passed an invalid vendor code.
23 The used hardware does not support the encryption type.
27 Program is running remotely on a Terminal Server.
31 The requested feature is no longer available.