<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Trial Functions > WLTrialCustomCounterInc |
The WLTrialCustomCounterInc function increments a custom counter by a specific value. This is a general-purpose function that can be used by applications that needs 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. Calling this function every time that an email has been sent.
int WLTrialCustomCounterInc( int Value, int CounterID ); |
function WLTrialCustomCounterInc( Value:Integer; CounterID:Integer ):Integer; stdcall; |
Public Declare Function WLTrialCustomCounterInc Lib "WinLicenseSDK.dll" ( ByVal Value As Integer, ByVal CounterID As Integer ) As Integer |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern int WLTrialCustomCounterInc(int Value, int CounterId);
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLTrialCustomCounterInc(Value As Integer, CounterId As Integer) As Integer End Function |
Parameters
Value
This parameter specifies the value to increment a specific counter ID.
CounterID
This parameter specifies the counter ID to increment.
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 zero.
If the function fails, the return value is wlInvalidCounter.
See Also
WLTrialCustomCounterDec, WLTrialCustomCounter, WLTrialCustomCounterSet