<< Click to Display Table of Contents >> Navigation: WinLicense > Protecting an application > Plugins > SecureEngineGetApplicationStatus |
This function is called by WinLicense to report the current application status. The main status of an application is either Trial and Registered. You can also get extended status information like: Trial Expired, Trial Manipulated, Invalid Hardware ID, Corrupted License Key, etc. through this function.
STDCALL bool SecureEngineGetApplicationStatus( int ApplicationStatus, int ExtendedStatus, TTrialExpInfo* TrialExpInfo, TRegExpInfo* RegExpInfo ); |
function SecureEngineGetApplicationStatus( ApplicationStatus:Integer; ExtendedStatus:Integer; TrialExpInfo:TrialExpInfo; RegExpInfo:TRegExpInfo ):Boolean; stdcall; |
Parameters
ApplicationStatus
[in] This parameter specifies the status of the current application. The possible status are Trial (1) and Registered (0).
ExtendedStatus
[in] This parameter contains extended information about the current status of an application. The current extended status values are:
•wdcNoError (0): The application runs in either Trial or Registered mode with no errors or expiration in trial or registration
•wdcInvalidLicense (2): The current installed license is invalid or corrupted
•wdcInvalidHardwareLicense (3): The license is locked to another machine
•wdcNoMoreHwdChanges (4): No more hardware IDs changes are allowed
•wdcLicenseExpired (5): The current license key is expired. See RegExpInfo for more information about expirations
•wdcInvalidCountryLicense (6): The current license key is locked to a different country
•wdcLicenseStolen (7): The current license key has been marked as stolen
•wdcWrongLicenseExp (8): The current license key is a permanent key and only licenses that expire are allowed in the protected application
•wdcWrongLicenseHardware (9): The current license key does not have machine ID information (and machine ID is required in the protected application)
•wdcTrialExpired (10): The trial period has expired. See TrialExpInfo for more information about expirations
•wdcTrialManipulated (11): The trial period has been manipulated by external user/attacker
TrialExpInfo
[in] This parameter specifies a pointer to a TTrialExpInfo structure with information about the current trial expiration (days, executions, date...)
RegExpInfo
[in] This parameter specifies a pointer to a TRegExpInfo structure with information about the current license key expiration (days, executions, date...)
Return Values
If the function returns True, WinLicense will continue running the protected application.
If the function returns False, WinLicense will terminate the protected application immediately.