<< Click to Display Table of Contents >>
Navigation: WinLicense > WinLicense SDK > Trial Functions >
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.
Public Declare Function WLTrialCustomCounter Lib "WinLicenseSDK.dll" (
ByVal CounterID As Integer
) As Integer
[DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)]
public static extern int WLTrialCustomCounter(int CounterId);
Public Shared Function WLTrialCustomCounter(CounterId As Integer) As Integer
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.
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).
WLTrialCustomCounterInc, WLTrialCustomCounterDec, WLTrialCustomCounterSet