Method - CPCheck

See Also: OverviewImplementationPropertiesMethodsEvents


object.CPCheck(ByVal action As Long) As Long


<action> is one of the following types:

ACTION_MANUAL [0] - unlicensed workstations denied access

ACTION_AUTOADD [1] - additional workstations licensed automatically

COPYCHK_STRICT [2] - strict computer ID checking will be performed.


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.

Example of use found in:

Implementing Single User Copy Protection and Single User Copy Protection Sample


This method checks to see if the current computer has been authorized by seeing if the Computer ID number in the property CPCompNo is currently stored in the License File. The <action> parameter is combined with the property CPFlags, which means if COPYCHK_STRICT is stored in the property CPFlags, it is not necessary to set the <action> parameter to COPYCHK_STRICT.

When using the Enhanced Computer ID Algorithms set in CPAlgorithm, these flags are ignored.


If object.CPCheck(0) = PP_TRUE Then

MainForm.mnuTools.Enabled = True


MsgBox "This computer is not registered!"

MainForm.mnuTools.Enabled = False

End If