<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Trial Functions > WLTrialCustomCounter |
The WLTrialCustomCounter function retrieves the value of a specific counter. This is a general-purpose function used by applications that need a global counter to maintain the count of an expirable resource. For example, it can be used in an application that allows sending a maximum of 20 emails in trial period. Call this function to know how many emails have been sent.
int WLTrialCustomCounter( int CounterID ); |
function WLTrialCustomCounter( CounterID:Integer ):Integer; stdcall; |
Public Declare Function WLTrialCustomCounter Lib "WinLicenseSDK.dll" ( ByVal CounterID As Integer ) As Integer |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern int WLTrialCustomCounter(int CounterId);
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLTrialCustomCounter(CounterId As Integer) As Integer End Function |
Parameters
CounterID
This parameter specifies the counter ID to retrieve the value from.
The current version of WinLicense allows 3 different IDs (0, 1, 2). Each CounterID has its own local counter.
Return Values
If the function succeeds, the return value is the current value of the specified counter.
If the function fails, the return value is -1 (Invalid counter ID).
See Also
WLTrialCustomCounterInc, WLTrialCustomCounterDec, WLTrialCustomCounterSet