LicenseLite public library

The library is provided as a dll file to be linked with the final program. It is able to check all DRM requirements. All technical concepts out of business are hidden for the developer (encryption, obfuscation, hash, network communications, multi threading,...). The library provides only high-level methods to facilitate the implementation of DRM. Please see the examples for more information about the implementation.

Namespace AFSLL.
Class PbcController.
File PbcController.dll, comes with examples. Do not use it to build production releases.



LOADING & VALIDITY


Shared Function
GetInstance(ByVal openId As String) As PbcController

- PbcController class implements the Singleton design pattern because the interpretation of the license must be unique within a same program. In such a case, the object runtime state is always obtained with this function.

Parameters :
- openId, String value necessary to authenticate the solution components and prevent their spread between different software.


Function validityCheckTime(ByVal dateMin As Object, ByVal dateMax As Object, Optional ByVal ensureNtp as Boolean = False) As Boolean
- Returns a state of the validity of the program, this feature bypasses the license to prevent the execution.

Parameters :
- dateMin, first date to run the software.
- dateMax, last date to run the sostware.
- ensureNtp, require time evaluation with Network Time Protocol.


Function validityGetLibraryId() As String
- Returns a string value necessary to authenticate the solution components and prevent their spread between different software, not to be confused with the additional value of openId.



LICENSE EVALUATION

 
Function licIsConsistent() As Boolean
- Returns a value that indicates whether the current license is consistent, independently of its validity. This state allows to grant limited rights to the user.


Function licIsExpired() As Boolean
- Returns a value the indicates whether the current license is expired.


Enum LEVEL_CHECKTIME
NONE = 0, time will not checked.
FIRST_RUN = 1, time will checked once.
ADJUSTMENT = 2, time will be selected only when the test is recognized as valid. Default value.
ALL_RUN = 3, time will be checked whenever. Internet access must be permanently available.
End Enum 


Function licCheckLicense(Optional ByVal checkTimeLevel As LEVEL_CHECKTIME = 2) As Boolean
- Complete evaluation process of current license.

Parameters :
- checkTimeLevel, the type of NTP time evaluation.


Function licGetDayLeft() As Long
- Returns the number of days remaining before the expiry of the current license.


Function licGetLastDay() As Date
- Returns the end date of validity of the current license.


Function licGetLevelId(Optional ByVal reload As Boolean = False) As Integer
- Returns the level of the software according of the current license.

Parameters :
- reload, requires a new evaluation process of the current license.


Function licGetUserId() As String
- Returns userId value from the crédentials.


Function licGetKey() As String
- Returns the license key value from the crédentials (Pin code is not returned).


Function licSetProductName(ByVal value As String) As Boolean
- Returns status of setting process of the program name.

Parameters :
- value, the name of the current program is necessary to limit the scope of the license.



LICENSE CREDENTIALS SET

 
Function setUserId(Optional ByVal value As String = "Trial") As Boolean
- Returns status of userId input.

Parameters :
- value, the userId discriminant value must beetwen 4 and 80 characters. It may be larger but it will not discriminant beyond the 80 characters.


Function setKey(ByVal value As String) As Boolean
- Returns status of key input.

Parameters :
- value, the key length is 35 characters.


Function setPin(ByVal value As String) As Boolean
- Returns status of pin code input.

Parameters :
- value, the pin code length is 5 characters.



DIGITAL IDENTITY

 
Function digIdGetMasterId() As String
- Returns a identifier based on the selected components parameters (See following sub digIdUse...*). This identifier must be used for key generation with the manager in case of hardware restrictions.


Sub
digIdUseLogicalDrive(Optional ByVal use As Boolean = True, Optional ByVal volumeLetter As Char = "C")*

Parameters :
- use, register the component for the development of the discriminant. Retrieve it with digIdGetMasterId function.
- volumeLetter, the system letter for access the disk.


Sub digIdUseFisrtHardDisk(Optional ByVal use As Boolean = True)*
Sub digIdUseMotherboard(Optional ByVal use As Boolean = True)*
Sub digIdUseNetworkAdapter(Optional ByVal use As Boolean = True)*
Sub digIdUseProcessor(Optional ByVal use As Boolean = True)*
Sub digIdUseVideoAdapter(Optional ByVal use As Boolean = True)*
- these functions are used to select the hardware compoments on the target computer.

Parameters :
- use, register the component for the development of the discriminant. Retrieve it with digIdGetMasterId function.


Sub digIdUseDongle(ByVal volumeName As String, Optional ByVal isNetworkAllowed As Boolean = False)
- Select a mobile device to extract its hardware features. The use of the mobile device is just a special case of hardware restriction with a not fixed component.

Parameters :
- volumeName, the system name for access the device.
- isNetworkAllowed,  indicates if the hardware restriction is based of a not fixed component considered as local or not. In case of multi-users access, it should use map drive with the volumeName to access the device.


Function digIdGetPinFromDongle(ByVal volumeName As String) As String
- Returns pin code that is read on the mobile device. Optional with the use of mobile device.


Function digIdGetKeyFromDongle(ByVal volumeName As String) As String
- Returns key that is read on the mobile device. Optional with the use of mobile device.



USER & LOCAL ENVIRONMENT

 
Enum LANGUAGE
ENG = 0, english. Default value.
FRE = 1, french.
GER = 2, germain.
SPN = 3, spanish.
RUS = 4, russian.
CHI = 5, chinese.
ITA = 6, italian.
ARA = 7, arabic.
End Enum


Sub userSetLanguage(Optional ByVal language As LANGUAGE = 0)
- Indicates the language of the end user to display error or information short messages.

Parameters :
- language, the language of the end user of the program.


Function userIsAdministrator() As Boolean
- Returns a value that indicates whether the current user has administrator rights.


Function timeIsNetworkAvailable() As Boolean
- Returns a value that indicates if the program can access the web.


Function
timeIsNtpAvailable() As Boolean
- Returns a value that indicates whether the time is available from a server of a public administration.

 

LOGGING & DEBUG


Function licSetOutputPath(ByVal applicationPath As String) As Boolean
- Indicates the program path outputs.

Parameters :
- applicationPath, String value selected according to the write permissions of the software.


Enum LEVEL_LOGGING
NONE = 0, no output.
PRODUCTION = 1, normal output. Default value.
DEBUG = 2, maximum output.
End Enum


Enum LEVEL_EXCEPTION
NONE = 0, no output.
PRODUCTION = 1, normal output. Default value.
DEBUG = 2, maximum output.
End Enum


Sub loggingSetLevel(Optional ByVal loggingLevel As LEVEL_LOGGING = 1, Optional ByVal exceptionLevel As LEVEL_EXCEPTION = 1)
- Indicates the output level for the managed informations in the library.

Parameters :
- loggingLevel, the level for the managed logging informations.
- exceptionLevel, the level for the managed exceptions.


 

 

Member account

Payments