KG_VerifyRegistrationInfoFromProjectA is used for verifying the registration information and extracting registration key parameters from ANSI-based registration information. The function has two parameters, one of them is a pointer to the TKeyVerifyParamsA structure, the other one is ANSI - null terminated string - the path to the Enigma Protector project file. The function reads secure information from the project file, so it does not require secure parameters PublicKey, KeyMode, KeyBase and EncryptedConstant in the TKeyVerifyParamsA structure.
EP_NO_ERROR=0 |
the function succeeds, TKeyVerifyParamsA structure contains registration key parameters; |
EP_ERROR_UNKNOWN=1 |
unknown error |
EP_ERROR_KEYBUFFEREMPTY=2 |
memory buffer for registration key is not allocated |
EP_ERROR_KEYBUFFERISLESS=3 |
size of allocated memory for registration key is less than required |
EP_ERROR_REGINFOEMPTY=4 |
registration information is not specified |
EP_ERROR_REGINFOTOOLARGE=5 |
registration information is empty (has a null size) |
EP_ERROR_PRIVATEKEYISNOTSET=6 |
private key is not set |
EP_ERROR_PUBLICKEYISNOTSET=7 |
public key is not set |
EP_ERROR_PRIVATEKEYISINVALID=8 |
private key is invalid |
EP_ERROR_PUBLICKEYISINVALID=9 |
public key is invalid |
EP_ERROR_KEYMODEISINVALID=10 |
key mode is invalid |
EP_ERROR_KEYBASEISINVALID=11 |
key base is invalid |
EP_ERROR_CURRENTDATEISINVALID=12 |
current date is invalid |
EP_ERROR_EXPIRATIONDATEISINVALID=13 |
expiration date is invalid |
EP_ERROR_KEYISINVALID=14 |
key is invalid |
EP_ERROR_HARDWAREID=15 |
hardware id is invalid |
EP_ERROR_HARDWAREBUFFEREMPTY=16 |
hardware id buffer is empty |
EP_ERROR_HARDWAREIDINVALIDFORKEY=17 |
hardware id is invalid for the key |
EP_ERROR_PROJECTFILENOTFOUND=18 |
project file is not found |
EP_ERROR_INVALIDPROJECTFILE=19 |
project file is invalid |
EP_ERROR_EXECUTIONSNUMBERINVALID=20 |
executions number is invalid |
EP_ERROR_DAYSNUMBERINVALID=21 |
days number is invalid |
EP_ERROR_COUNTRYCODEINVALID=22 |
country code is invalid |
EP_ERROR_RUNTIMEINVALID=23 |
run-time value is invalid |
EP_ERROR_GLOBALTIMEINVALID=24 |
global time is invalid |
EP_ERROR_INSTALLBEFOREINVALID=25 |
register before date is invalid |
EP_ERROR_INSTALLAFTERINVALID=26 |
register after date is invalid |
public class Enigma_KeyGen_IDE
{
[DllImport("keygen.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
public static extern uint KG_VerifyRegistrationInfoFromProjectA(string FileName, ref TKeyVerifyParamsA kv);
}
See function examples in the installation folder, Examples\Keygen subfolder.