Any questions? Ask us: support@enigmaprotector.com

Help

Manual
Additional
Manual

EP_RegKeyInformationW

EP_RegKeyInformationW extracts internal information from the registration key. Please note, this function cannot be used to verify registration, this function just extracts information from a particular pair of registration name and key. To verify the program registration, the functions like EP_RegCheckKey, EP_RegLoadAndCheckKey and EP_RegCheckAndSaveKey should be used.

Parameters

  • AName - the registration name - a pointer to the null terminated wide string;
  • AKey - the registration key - a pointer to the null terminated wide string;
  • AKeyInfo - TKeyInformation - a pointer to the TKeyInformation structure.

TKeyInformation contains the following members:

  • Stolen - indicates if the registration key is stolen. See License Manager - Edit License
  • CreationYear - the key creation year
  • CreationMonth - the key creation month
  • CreationDay - the key creation day
  • UseKeyExpiration - indicates of the registration key contains the expiration date
  • ExpirationYear - the key expiration year
  • ExpirationMonth - the key expiration month
  • ExpirationDay - the key expiration day
  • UseHardwareLocking - indicates if the registration key is hardware locked
  • UseExecutionsLimit - shows if the registration key contains the executions limit
  • ExecutionsCount - the number of executions
  • UseDaysLimit - shows if the registration key contains the days limit
  • DaysCount - the number of days
  • UseRunTimeLimit - shows if the registration key contains the run-time limit
  • RunTimeMinutes - the number of run-time minutes
  • UseGlobalTimeLimit - shows if the registration key contains the Global Time limit
  • GlobalTimeMinutes - the number of the Global Time minutes
  • UseCountyLimit - shows if the registration key contains the country lock
  • CountryCode - the country code
  • UseRegisterAfter - shows if the registration key contains the register after date
  • RegisterAfterYear - the year of the register after date
  • RegisterAfterMonth - the month of the register after date
  • RegisterAfterDay - the day of the register after date
  • UseRegisterBefore - shows if the registration key contains the register before date
  • RegisterBeforeYear - the year of the register before date
  • RegisterBeforeMonth - the month of the register before date
  • RegisterBeforeDay - the month of the register before date
  • EncryptedSections - a 16-value array of encrypted sections that the registration key decrypts

Return Value

If the function fails, the return value is 0. If the function succeeds, the return value is not zero and the TKeyInformation structure contains information extracted from the passed registration key.

Remark

The function fails in the following cases:

  • the registration information is incorrect;
  • the application is not protected.

Definition

Show/Hide C++ function definition

typedef struct TKeyInformation {
        BOOL Stolen;               // {out} is key stolen
        DWORD CreationYear;        // {out} key creation year
        DWORD CreationMonth;       // {out} key creation month
        DWORD CreationDay;         // {out} key creation day
        BOOL UseKeyExpiration;     // {out} has key expiration date?
        DWORD ExpirationYear;      // {out} key expiration year
        DWORD ExpirationMonth;     // {out} key expiration month
        DWORD ExpirationDay;       // {out} key expiration day
        BOOL UseHardwareLocking;   // {out} hardware locked key
        BOOL UseExecutionsLimit;   // {out} limit key by executions?
        DWORD ExecutionsCount;     // {out} number of executions
        BOOL UseDaysLimit;         // {out} limit key by days?
        DWORD DaysCount;           // {out} number of days
        BOOL UseRunTimeLimit;      // {out} limit key by run time?
        DWORD RunTimeMinutes;      // {out} run time minutes
        BOOL UseGlobalTimeLimit;   // {out} limit key by global time?
        DWORD GlobalTimeMinutes;   // {out} global time minutes
        BOOL UseCountyLimit;       // {out} limit key by country?
        DWORD CountryCode;         // {out} country code
        BOOL UseRegisterAfter;     // {out} register key after date?
        DWORD RegisterAfterYear;   // {out} register after year
        DWORD RegisterAfterMonth;  // {out} register after month
        DWORD RegisterAfterDay;    // {out} register after day
        BOOL UseRegisterBefore;    // {out} register key before date?
        DWORD RegisterBeforeYear;  // {out} register before year
        DWORD RegisterBeforeMonth; // {out} register before month
        DWORD RegisterBeforeDay;   // {out} register before day
        BOOL EncryptedSections[NUMBER_OF_CRYPTED_SECTIONS]; // {out} Crypted sections
} TKeyInformation, *PKeyInformation;

extern "C" __declspec( dllexport ) __stdcall BOOL EP_RegKeyInformationW(wchar_t* AName, wchar_t* AKey, PKeyInformation AKeyInfo);

Show/Hide Delphi function definition

Show/Hide C# (.NET) function definition

See function examples in the installation folder, Examples\KeyInformation subfolder.