CmActLicenseControl
Description
CmActLicenseControl is a helper function that provides all activation essentials and handles CmActLicense files.
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY CmActLicenseControl(HCMSysEntry hcmse, CMULONG flCtrl, const void *pvData, CMUINT cbData, void *pvReturn, CMUINT cbReturn)
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2. The required access mode depends on the operation set in flCtrl.
flCtrl contains one of the following flags to specify the action that is requested:
CM_GF_ACT_GETFILEINFO gets some information of a remote Context File (*.WibuCmRaC) as a CMBYTE array in pvData. It is also possible to get some information for other CmActLicense files (*.wbb, *.WibuCmRaU). pvReturn is filled with a
CMACTFILEINFO structure. hcmse can be Subsytem Access or any other access type.
|
CMACTFILEINFO receives information for any CmActLicense file, e.g license file (*.wbb) or Update File (*.WibuCmRaU). Syntax
Parameter tba.
|
CM_GF_ACT_GETFILEINFO2 gets some information of a remote Context File (*.WibuCmRaC) as a CMBYTE array in pvData. It is also possible to get some information for other CmActLicense files (*.wbb, *.WibuCmRaU). pvReturn is filled with a
CMACTFILEINFO2 structure. hcmse can be Subsytem Access or any other access type.
|
CMACTFILEINFO2 receives information for any CmActLicense file, e.g license file (*.wbb) or Update File (*.WibuCmRaU). Syntax
Parameter tba. mszHostInfoName contains the computer name with at maximum 23 characters. mausHostInfoFingerPrint contains four identification values which can be used for comparing two different licenses to see, if they are from the same system, e.g. on reactivation issues. Notes This structure is available since CodeMeter Version 4.30. The following members are only available and respected since CodeMeter Version 5.0: •mszHostInfoName •mausHostInfoFingerPrint
|
CM_GF_ACT_GET_INSTALLATION_ID receives the installation id needed for phone activation. pvData holds a
CMACTACTIVATION structure. pvReturn is filled with a CMACTACTIVATION structure. pvData and pvReturn may point to the same instance. hcmse must be Box Access, Firm Item Access or Entry Access.
|
CMACTACTIVATIONreceives information for CmActLicense activation. Syntax
Parameter tba.
|
CM_GF_ACT_LICENSE_BY_CODE enables a CmActLicense (activation by phone). pvData holds an array of at maximum CMACT_MAX_LEN_ACTIVATION_CODE chars. pvReturn is not filled. hcmse must be Box Access, Firm Item Access or Entry Access.
CM_GF_ACT_REGISTER registers a CmActLicense license file (*.wbb) or a CmActLicense Update File (*.WibuCmRaU) given as a CMBYTE array in pvData at the CodeMeter License Server. pvReturn is not filled. hcmse can be Subsytem Access or any other access type.
CM_GF_ACT_REMOVE removes the CmActLicense.
|
For CmActLicense Firm Codes the following applies: pvData holds an CMUINT that is true (1), if the license should be removed permanently. Then the license file is deleted from the disk. Or pvData holds an CMUINT that is false (0), if the license should only be removed (unloaded) until the next start of CodeMeter License Server. For Universal Firm Codes this distinction does not exist - the license is always permanently removed. Starting with CodeMeter Version 6.60 the error message "CMERROR_INVALID_PARAMETER" displays, if false (0) is specified. Then the license is neither removed nor unloaded. |
pvReturn is not filled. hcmse must be Box Access, Firm Item Access or Entry Access.
CM_GF_ACT_REQUEST creates a remote Context File (*.WibuCmRaC) to request the activation of a CmActLicense. pvData holds a
CMACTREQUEST structure. pvReturn is filled with a CMBYTE array containing the remote Context File (.WibuCmRaC). hcmse must be Box Access, Firm Item Access or Entry Access.
|
CMACTREQUEST holds information for creating a CmActLicense context file. Syntax
Parameter tba.
|
CM_GF_ACT_SPLIT_ACTIVATION_CODE gets the serial number information out of the Activation Code of a telephone activation. pvData holds the Activation Code a null-terminated ascii-string. pvReturn is filled with a CMACTACTIVATION structure, where either musBoxMask and mulSerialNumber (first activation) or mulGeneration (reactivation) are filled. hcmse can be Subsytem Access or any other access type.
pvData contains a pointer to an input buffer. The type of buffer depends on the flag set in flCtrl.
cbData contains the length of the input buffer pvData in number of bytes.
pvReturn contains a pointer to an output buffer. The type of buffer depends on the flag set in flCtrl.
cbReturn contains the length of the output buffer pvReturn in number of bytes.
Return
This function returns the number of bytes filled in pvReturn. If the command specified in flCtrl does not fill pvReturn by design, the function returns 1. If an error occurred, 0 will be returned.
Exception:
If pvReturn does not contain enough memory, the number of required bytes will be returned in cbReturn and error code CMERROR_BUFFER_OVERFLOW is set.
Notes
This function is available since CodeMeter Version 4.0.
The following flags (and the corresponding functionality) are only available since CodeMeter Version 4.30:
•CM_GF_ACT_GETFILEINFO2
•CM_GF_ACT_SPLIT_ACTIVATION_CODE
Syntax
This method is overloaded, i.e. the same method name is used with different type of parameters or different set of parameters.
Method 1:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, object Data, out byte[] Return)
|
This method overload returns a byte array.
Method 2:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, byte[] Data)
|
This method overload imports data.
Method 3:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, object Data)
|
This method overload allows the input.
Method 4:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, byte[] Data, out CmActFileInfo FileInfo)
|
This method overload imports data and returns FileInfo.
Method 5:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, byte[] Data, out CmActDigest Digest)
|
This method overload includes data and returns a digest.
Method 6:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, CmActActivation Data, out CmActActivation Return)
|
This method overload imports activation data and returns activation data.
Method 7:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, byte[] Data, out CmActFileInfo2 FileInfo2)
|
This method overload imports data and returns data in a FileInfo2 class structure.
Method 8:
public bool CmActLicenseControl(HCMSysEntry hcmse, CmActLicenseControlOption Ctrl, byte[] Data, out CmActSymKey SymKey)
|
This method overload imports data and return a simulated key.
Parameter
CmActLicenseControlOption contains one of the following commands:
CreateLicenseInformation tba.
SetupLicense tba.
SetupLicenseStep1 tba.
SetupLicenseStep2 tba.
Register registers a CmActLicense license file (*.wbb) or a CmActLicense Update File (*.WibuCmRaU) given as byte[] in Data at the CodeMeter License Server. hcmse can be Subsytem Access or any other access type.
UpdateLicenseData tba.
ActivationCode tba.
LicenseByCode enables a CmActLicense (activation by phone). tba. hcmse must be Box Access, Firm Item Access or Entry Access.
Request creates a remote Context File (*.WibuCmRaC) to request the activation of a CmActLicense. pvData holds a
CmActRequest structure. pvReturn is filled with a CMBYTE array containing the remote Context File (*.WibuCmRaC). hcmse must be Box Access, Firm Item Access or Entry Access.
|
CmActRequest holds information for creating a CmActLicense context file. Syntax
Parameter ProductSerialNumber tba. ProductSubType tba. LicensorData tba.
|
CreateActivationStep1 tba.
CreateActivationStep2 tba.
CreateActivationStep3 tba.
Remove removes the CmActLicense.
|
For CmActLicense Firm Codes the following applies: Data holds an uint that is true (1), if the license should be removed permanently. Then the license file is deleted from the disk. Or Data holds an uint that is false (0), if the license should only be removed (unloaded) until the next start of CodeMeter License Server. For Universal Firm Codes this distinction does not exist - the license is always permanently removed. Starting with CodeMeter Version 6.60 the error message "CMERROR_INVALID_PARAMETER" displays, if false (0) is specified. Then the license is neither removed nor unloaded. |
hcmse must be Box Access, Firm Item Access or Entry Access.
GetFileInfo gets some information of a remote Context File (*.WibuCmRaC) as a byte[] in Data. It is also possible to get some information for other CmActLicense files (*.wbb, *.WibuCmRaU). FileInfo is filled as
CmActFileInfo class. hcmse can be Subsytem Access or any other access type.
|
CmActFileInfo receives information for any CmActLicense file, e.g license file (*.wbb) or Update File (*.WibuCmRaU). Syntax
Parameter CmActSymKey SymKeyBoxMemory tba. CmActSymKey SymKeyDynData tba. CmActFileInfo.FileTypeOption tba.
FirmCode tba. ProductName tba. BoxMask tba. SerialNumber tba. TelephoneId tba. ProductIdMinor tba. ProductIdMajor tba. Generation tba. ProductSerialNumber tba. CmBoxStatus.Flags Status tba.
PluginName contains the name of the plugin in case of using activation scheme "Binding Extension". CmActLicenseInfo.LicenseOptionsFlags tba.
Platform contains the Platform ID of the OS, the version and the byte order of the system.
CmActProductDescription tba. LicensorInfo tba.
|
GetInstallationId receives the installation id needed for phone activation. Data holds a
CmActActivation class. Return is filled with a CmActActivation class. hcmse must be Box Access, Firm Item Access or Entry Access.
|
CmActActivation receives information for CmActLicense activation. Syntax
Parameter CmActActivation.Option currently empty. InstallationId tba. ProductSerialNumber tba. BoxMask tba. SerialNumber tba. ProductIdMinor tba. Generation tba. PaPuCount tba.
|
SplitInstallationId tba.
GetTemplateKey tba.
SplitActivationCode gets the serial number information out of the Activation Code of a telephone activation. Data holds the Activation Code a null-terminated ascii-string. Return is filled with a CmActActivation structure, where either BoxMask and SerialNumber (first activation) or Generation (reactivation) are filled. hcmse can be Subsytem Access or any other access type.
GetFileInfo2 gets some information of a remote Context File (*.WibuCmRaC) as a CMBYTE array in pvData. It is also possible to get some information for other CmActLicense files (*.wbb, *.WibuCmRaU). pvReturn is filled with a
CmActFileInfo2 class. hcmse can be Subsytem Access or any other access type.
|
CmActFileInfo receives information for any CmActLicense file, e.g license file (*.wbb) or Update File (*.WibuCmRaU). Syntax
Parameter CmActProductDescription tba. CmActSymKey SymKeyBoxMemory tba. CmActSymKey SymKeyDynData tba. HostInfoFingerPrint contains four identification values which can be used for comparing two different licenses to see, if they are from the same system, e.g. on reactivation issues. CmActFileInfo.FileTypeOption tba.
FirmCode tba. ProductName tba. BoxMask tba. SerialNumber tba. TelephoneId tba. CmActId tba. Generation tba. ProductSerialNumber tba. CmBoxStatus.Flags Status
PluginName contains the name of the plugin in case of using activation scheme "Binding Extension". CmActLicenseInfo.LicenseOptionsFlags
CmSystem.Option Platform
HostInfoName contains the computer name with at maximum 23 characters. LicensorInfo tba.
|
Return
tba.
Notes
This function is available since CodeMeter Version 4.0.
The following flags (and the corresponding functionality) are only available since CodeMeter Version 4.30:
•CmActGetFileInfo2
•CmActSplitActivationCode
Not implemented.