ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / HASP key functions
  • Summary of the necessary parameters
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 for reading the cell 10 of key:
// the numbering starts from 0
FuncNum = 3 // READ_WORD function
Int1 = 10
Hasp(FuncNum, SeedCode, Lpt, Pass1, Pass2, ...
&Int1, &Int2, &Int3, &Int4)
IF Int3 = 0 THEN
Info("Content address memory 10 of key>" + Int2 + "<")
ELSE
Info("Error: return code = " + Int3)
END
Syntax
Hasp(<FunctionNum> , <SeedC> , <LPT> , <Pass1> , <Pass2> , <Int1> , <Int2> , <Int3> , <Int4>)
<FunctionNum>: Integer
Number of the HASP function to run:
  • 1: Checks the HASP key.
  • 2: <SeedC> is used to run a program in the key that will return 4 different integers for each value passed. This is used to check the presence of key and whether it is not simulated.
  • 3: Read the key content.
  • 4: Write the key content.
  • 5: Returns the key content and information about the parallel port.
  • 6: Returns the key identifier.
  • 50: Reads a block of data in the key.
  • 51: Writes a data block in the key.
For the functions used to read and write a fixed string (Str) in the key: <Int3> = 0, <Int4> = &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: memory size of the key
  • Type: type of key
  • Data: data to read or write
  • Row: length of the data to read/write in the key
  • Segm: 0
  • OffSet: &Text where Text is a string containing the information to read or write
  • Idlow: to rebuild the identifier of the key id = idHigh**65536+idLow
  • IdHigh: to rebuild the identifier of the key id = idHigh**65536+idLow
  • Status: status report of the function execution
  • r1...r4: integer containing the magic values according to a given Seed code and key.
Component: wd290rtf.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help