Property - CPAlgorithm

See Also: OverviewImplementationPropertiesMethodsEvents

Data Type:

Long

Default:

COMPNO_ENHANCED [65536]

Stored:

Stored in License File if EZTrial is non-zero; Persisted from design time property page otherwise

Example of use found in:

Implementing Single User Copy Protection and Advanced Licensing Sample

Description:

Sets which Computer ID algorithm is used during the optional Copy Protection tests.

COMPNO_ENHANCED [65536] - uses the Enhanced Computer ID Algorithms

The following values have been deprecated but are still available to maintain backwards compatibility.  Developers are recommended to use COMPNO_ENHANCED if possible.

The following lists currently supported values for this property. Older unsupported or deprecated algorithms are no longer listed. Refer to the Computer ID Number topic for more information.

COMPNO_HDSERIAL [2] - uses the drive volume serial number of drive CPAlgorithmDrive.

COMPNO_NETNAME [16] - uses network file server name and volume path of drive CPAlgorithmDrive.

COMPNO_WINPRODID [128] - uses Windows ProductID and ProductKey created when Windows is installed.

COMPNO_IPADDR [256] - uses TCP/IP address of server provided in property CPAlgorithmDrive.

COMPNO_SERVER_MACADDR [131072] - Provide a server's UNC path, host name, or IP address through either the CPAlgorithmFile or the CPAlgorithmDrive properties (you may leave one as an empty string) and this will compute a number based on that server's MAC  address.  Please be considerate of the possibility of  redundant Network Interface Cards (NIC) when using this algorithm (you may need to authorize the server once for each NIC).

Since the Enhanced algorithms is unsuitable for network licensing, the WINPRODID and HDSERIAL algorithms can be used if licensing the server in a peer-to-peer environment. However, it is now recommended to run the application installed on a peer server using the UNC path or mapped drive letter, just as a workstation would, so only the NETNAME algorithm is used and only a single activation is required to enable the entire network.

To use more than one algorithm, simply add the two values together. For example, using both COMPNO_WINPRODID (128) and COMPNO_HDSERIAL (2) would result in a CPAlgorithm of  130.

For COMPNO_HDSERIAL, COMPNO_IPADDR, COMPNO_SERVER_MACADDR and COMPNO_NETNAME algorithms, the property CPAlgorithmDrive must be set. For COMPNO_SERVER_MACADDR, the property CPAlgorithmFile can also be set.

Example:

object.CPAlgorithm = 65536