Open topic with navigation
Method - CPCheck
See Also: OverviewImplementationPropertiesMethodsEvents
object.CPCheck(ByVal action As Long) As Long
<action> is one of the following types:
ACTION_MANUAL  - unlicensed workstations denied access
ACTION_AUTOADD  - additional workstations licensed automatically
COPYCHK_STRICT  - 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  (not authorized) or PP_TRUE  (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