Open topic with navigation
Determines if the current computer is authorized using threshold
Declare Function pp_copycheckth(ByVal handle As Long, ByVal flags As Long, ByVal comp_num As Long, ByVal threshold As Long) As Long
LONG pp_copycheckth(PPLFHANDLE handle, LONG flags, LONG comp_num, LONG threshold)
<handle> is the handle to the License File given by pp_lfopen()
<flags> is a parameter with available options, defined as:
COPYCHK_ENHANCED  - unlicensed workstations denied access
COMPNO_NO_WMI  - used in conjunction with the COPYCHK_ENHANCED flag when protecting a DLL to suppress WMI data, which causes the application to hang. Note, when using this flag it must also be in any call to pp_compno(), pp_copyadd() or pp_copycheck().
<comp_num> unused. Set to 0.
<threshold> is the threshold to use when performing the test. It is suggested to use 20 for this parameter.
Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, only PP_FALSE  (not authorized) or PP_TRUE  (authorized) is returned.
Determines if the current computer is authorized using the Enhanced Computer ID Algorithms.
This function performs the same test as pp_copycheck(), but will allow the developer to specify the threshold value when determining if the current computer is authorized. This allows more control over how many hardware changes the user is allowed.
If the computer is authorized and 90 days have passed
with no hardware changes, the License File is updated with the current
computer hardware information when this function is called.
' Check if this computer is authorized
' use a threshold of 20
Dim result As Long
result = pp_copycheckth(lfhandle, COPYCHK_ENHANCED, 0, 20
If (result <> PP_TRUE) Then
MsgBox "This computer is not authorized!"
PP_LFOPEN(), PP_COPYADD(), PP_COPYDELETE(), PP_COPYCHECK(), and PP_COMPNO()