Determines if the current computer is authorized

Applies to:

Win32, Win64


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 [4] - use the Enhanced Computer ID Algorithms to determine access

COMPNO_NO_WMI [262144] - 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().

<comp_num> unused.  Set to 0.


Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, only PP_FALSE [0] (not authorized) or PP_TRUE [1] (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.  This allows a user to change pieces of hardware over time and not have the license de-authorize.

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!"

 Unload Me

End If

See Also:


Concept Link IconRelated Topics