ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / HASP key functions
  • Summary of the necessary parameters
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Hasp (Function)
In french: Hasp
Interrogates an electronic HASP key (HASP-3, HASP-4, MemoHasp or NetHasp). Hasp is used to protect the applications developed in WINDEV or WEBDEV by Hasp keys.
Remarks:
  • To use Hasp, you must be familiar with the operating mode of Hasp keys and have the relevant documentation.
  • Hasp is not available in 64-bit mode. We recommend that you use the HaspHLxxx functions.
Example
// Test de lecture de la cellule 10 de la clé :
// la numérotation commence à 0
NumFonc = 3	// Fonction READ_WORD
Entier1 = 10
Hasp(NumFonc, SeedCode, Lpt, Passe1, Passe2, ...
	&Entier1, &Entier2, &Entier3, &Entier4)
IF Entier3 = 0 THEN
	Info("Contenu adresse mémoire 10 de la clé>" + Entier2 + "<")
ELSE
	Info("Erreur : code retour = " + Entier3)
END
Syntax
Hasp(<FunctionNum> , <SeedC> , <LPT> , <Pass1> , <Pass2> , <Int1> , <Int2> , <Int3> , <Int4>)
<FunctionNum>: Integer
Number of the HASP function to run:
  • 1: Checks Hasp key.
  • 2: <SeedC> executes a program in the key that returns 4 different integers for each value entered. This is used to check the presence of key and whether it is not simulated.
  • 3: Read the contents of the key.
  • 4: Write the contents of the key.
  • 5: Returns key content and parallel port information.
  • 6: Returns the key identifier.
  • 50: Reads a block of data from the key.
  • 51: Writes a block of key data.
For functions for reading and writing a fixed string (Ch) in the key: <Ent3> = 0, <Ent4> = &amp;Ch.
<SeedC>: Integer
Used only if <FunctionNum> = 2.
<LPT>: Integer
Port number. If <LPT> = 0, Hasp seeks the key on the "proper" parallel port (without having to specify its number).
<Pass1>: Integer
Parameter supplied by the manufacturer of the key. This parameter guarantees the security of the data stored in the key.
<Pass2>: Integer
Parameter supplied by the manufacturer of the key. This parameter guarantees the security of the data stored in the key.
<Int1>: Integer
Values passed by reference (with the & operator). These values can be read in input and/or modified in output.
<Int2>: Integer
Values passed by reference (with the & operator). These values can be read in input and/or modified in output.
<Int3>: Integer
Values passed by reference (with the & operator). These values can be read in input and/or modified in output.
<Int4>: Integer
Values passed by reference (with the & operator). These values can be read in input and/or modified in output.
Remarks

Summary of the necessary parameters

The table below summarizes the necessary parameters according to <FunctionNum>
<FunctionNum>I/OSeedCLptPass1Pass2Int1Int2Int3Int4
1Ex
1S0/1
2Exxxx
2Sr1r2r3r4
3Exxxaddr
3SDataStatus
4ExxxaddrData
4SStatus
5Exxx
5SM/STypeLpt
6Exxx
6SIdlowIdHighStatus
50ExxxaddrRowSegmOffSet
50SStatus
51ExxxaddrRowSegmOffSet
51SStatus
Legend:
  • addr: address of a key cell
  • M/S: key memory size
  • Type: type of key
  • Data: data to be read or written
  • Lng: length of data to be read from/written to the key
  • Segm: 0
  • OffSet: &Text where Text is a string containing information to be read or written
  • IdLow: to reconstitute the key identifier id = idHigh*65536+idLow
  • IdHigh: to reconstitute the key identifier id = idHigh*65536+idLow
  • Status: function execution report
  • r1...r4: integer containing magic values for a given seed code and key.
Component: wd300rtf.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help