<< Click to Display Table of Contents >>
Navigation: WinLicense > WinLicense SDK > Registration Functions >
The WLRegGetStatus function retrieves information about the licensing status of the current application.
Public Declare Function WLRegGetStatus Lib "WinLicenseSDK.dll" (
pExtendedInfo As Any
) As Integer
[DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)]
public static extern int WLRegGetStatus(ref int ExtendedInfo);
Public Shared Function WLRegGetStatus(ByRef ExtendedInfo As Integer) As Integer
[out] Pointer to a variable that will receive extended information about the application status when "wlLicenseExpired (5)" is returned. When a different value from wlLicenseExpired is returned by WLRegGetStatus, this parameter contains zero.
The returned extended information can be:
•wlLicenseDaysExpired (1) when a license is expired on days.
•wlLicenseExecExpired (2) when a license is expired on executions.
•wlLicenseDateExpired (3) when a license is expired on date.
•wlLicenseGlobalExpired (4) when the global time in a license has expired.
•wlLicenseRuntimeExpired (5) when license runtime has expired.
The return value is the licensing status in the current application. The possible values are the followings:
•wlIsTrial (0) when an application is running in trial mode (not registered).
•wlIsRegistered (1) when an application is registered with a valid license key.
•wlInvalidLicense (2) when a license key is invalid.
•wlInvalidHardwareLicense (3) when the machine ID, inside a license key, is invalid for current machine.
•wlNoMoreHwdChanges (4) when no more machine ID changes are allowed in the current license key.
•wlLicenseExpired (5) when a license key has expired. Check pExtendedInfo to retrieve extra information.
•wlInvalidCountryLicense (6) when a license is locked to different country.
•wlLicenseStolen (7) when a license key is stolen.
•wlWrongLicenseExp (8) when a license key is a permanent key and only licenses that expire are allowed in an application.
•wlWrongLicenseHardware (9) when the current license key does not have machine ID information (and machine ID is required in an application).
•wlNoMoreInstancesAllowed (12) when the protected application has reached the maximum number of instances in a network.
•wlNetworkNoServerRunning (13) when a network license is locked to a server and the server is not running the protected application.
•wlInstallLicenseDateExpired (14) when a license has been installed after a specific installation date.
•wlLicenseDisabledInstance (15) when a license has been disabled for a specific application (When calling the function WLRegDisableKeyInCurrentInstance).
•wlNetworkCannotStartServer (17) when the server instance cannot be started in a network license. Check firewall and IP address.