Open topic with navigation
Adds the current computer to the list of valid computers
Declare Function pp_copyadd(ByVal handle As Long, ByVal flags As Long, ByVal comp_num As Long) As Long
LONG pp_copyadd(PPLFHANDLE handle, LONG flags, LONG comp_num)
<handle> is the handle to the License File given by pp_lfopen()
<flags> sets miscellaneous options, defined as:
COPYADD_ENHANCED  - adds the current Computer ID to the license file using the Enhanced Computer ID Algorithms.
COMPNO_NO_WMI  - used in conjunction with the COPYADD_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_copycheck() or pp_copycheckth().
Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, PP_SUCCESS  (ID was added) is returned.
Adds the current Computer ID to the license file
using the Enhanced
Computer ID Algorithms. If a Computer ID is already in the license
file it will be replaced with the current Computer ID.
The License File variable VAR_AUTHORIZED_COMPS will be set to 1.
' Authorize this computer.
Dim result As Long
result = pp_copyadd(lfhandle, COPYADD_ENHANCED, 0)
If result = PP_SUCCESS Then
' This computer is now authorized which means that a
' call to pp_copycheck will return PP_SUCCESS
PP_LFOPEN(), PP_COPYCHECK(), PP_COPYDELETE(), and PP_COMPNO()