Open topic with navigation
Determines if the current computer is authorized
Declare Function pp_copycheck(ByVal handle As Long, ByVal flags As Long, ByVal comp_num As Long) As Long
LONG pp_copycheck(PPLFHANDLE handle, LONG flags, LONG comp_num)
<handle> is the handle to the License File given by pp_lfopen()
<flags> is one of the following types:
COPYCHK_ENHANCED  - use the Enhanced Computer ID Algorithms to determine 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_copycheckth().
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.
This function is included for backward compatibility.
It was replaced by pp_copycheckth().
The newer function has a threshold parameter used when determining if
the current computer is authorized. This allows developers to specify
the threshold of hardware changes allowed.
This function calls pp_copycheckth() with a threshold of 20 by default, which is a number which most small hardware changes should be within.
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.
Refer to pp_copycheckth() for a description of the other parameters.
' Check if this computer is authorized.
Dim result As Long
result = pp_copycheck(lfhandle, COPYCHK_ENHANCED , 0)
If (result <> PP_TRUE) Then
MsgBox "This computer is not authorized!"
PP_LFOPEN(), PP_COPYADD(), PP_COPYDELETE(), PP_COPYCHECKTH(), and PP_COMPNO()