`Project Method: PlugInRegistration
`Call On Startup to get the key that matches the current 4D environment
`And register the plugin with the returned key
`Syntax:
`C_TEXT($key)
`C_LONGINT($result)
`$key:=PlugInRegistration ("My key 1";"My key 2"; … ; "My key n")
`$result:=$XX_Register($key)
C_TEXT(${1}) `All your license keys for the plugin
C_TEXT($0) `The key that matches the current setup
C_LONGINT($serialKey;$connectedUsers;$maxUsers;$loop)
C_STRING(80;$currentUser)
C_STRING(80;$companyName)
GET SERIAL INFORMATION($serialKey;$currentUser;$companyName;$connectedUsers;$maxUsers) `only the serial key matters here
$0:="No key received for "+String($serialKey) `return an error message with the current 4D Serial
For ($loop;1;Count parameters) `test all keys until we get the good one
If (Position(String($serialKey);${$loop})>0) `the 4D serial number is part of the plugin registration key
$0:=${$loop} `return the proper key
$loop:=Count parameters `no need to pursue
End if
End for
|