GenActCodeCompoParamFPThe GenActCodeCompoParamFP function generates an Activation Code from a embedded FingerPrint value for a specific license project file. The Authorization Definition to generate the Activation Code for must take a (run-time) composite parameter. Syntax
ParametersLPJFileNamePath [IN] This is a wide string value that indicates the full path and filename of the license project file to use to generate the Activation Code. The file must exist and must be an .LPJ file.
AuthID [IN] This is a numeric value that contains Authorization Definition ID that you wish to generate an Activation Code for. This must be a value between 0 and 63 inclusive and must represent a valid ID in the specified license.
EmbedFingerPrint [IN] This is a numeric value that contains the "embed length" FingerPrint that you wish to embed in the Activation Code. This must be a 26 bit unsigned value (0x0 to 0x3FFFFFF inclusive).
EmbedCompositeDefinitions [IN] This is a value that contains the composite parameter you wish to embed in the generated Activation Code. It must be within the range of a 16-bit unsigned value (0x0 to 0xFFFF inclusive). Each bit of the parameter represents one definition in the license project. The least significant bit represents definition ID #0 and the most significant bit represents definition #15. See remarks below for more information.
OverrideShelfLife [IN] This is a numeric value that contains a value to use to override the default Shelf-Life of the specified Authorization Definition. If you wish to use the default Shelf-Life for the corresponding definition, use the value -1. Otherwise use 0 to turn off the Shelf-Life feature or a positive value to use for the number of days that the Shelf-Life will last. See remarks below for more information.
ActivationCode [OUT] This is (a pointer to) a wide string value that returns with holding the Activation Code if the function call is successful.
ACG_return_code [OUT] This is (a pointer to) a numeric value that returns with a ACG_RETURN_CODE that identifies the outcome of the operation. See remarks below for more information. RemarksUse GenActCodeCompoParamFP to generate an Activation Code from a FingerPrint value using a specified license project file which takes a (run-time) composite parameter. You can pre-determine if an Authorization Request Code takes a numeric parameter by first calling the DecodeARC function and inspecting its AuthParamType parameter. You may wish to use this function if:
The EmbedCompositeDefinitions parameter you pass to this function is a bit-field. It must be within the range of a 16-bit unsigned value (0x0 to 0xFFFF inclusive). Each bit of the parameter represents one definition in the license project. The least significant bit represents definition ID #0 and the most significant bit represents definition #15. For example, to generate a composite Activation Code that will activate definitions 0, 1, 3, and 7; we must construct a parameter value that has each of these bits turned on. In binary, this is equal to value 10001011, which is equal to decimal value 139. So we would pass value 139 in the EmbedCompositeDefinitions parameter to generate an Activation Code that will activate these definitions on the clients machine. The ACG_return_code parameter will return holding ACG_FALSE_MISSING_MAIN_LF if the LPJFileNamePath parameter does not indicate a file that exists. If the license project file exists, but is an invalid filename, it returns holding ACG_FALSE_BAD_MAIN_LF_FILENAME. If the License project exists and seems to be the correct format but an error occurred during loading it returns holding ACG_FALSE_MAIN_LF_CORRUPT. The ACG_return_code parameter will return holding ACG_FALSE_CODE_INVALID_BAD_ID if the AuthID parameter specified is not valid for the license. The ACG_return_code parameter will return holding ACG_FALSE_PARAM_OUT_OF_RANGE if the EmbedNumericParameter parameter is not in the valid range (16-bit unsigned). The ACG_return_code parameter will return holding ACG_FALSE_WRONG_PARAM_TYPE if the AuthID parameter specified does not correspond to an Authorization Definition which takes a numeric parameter. The ACG_return_code parameter will return holding ACG_FALSE_FP_OUT_OF_RANGE if the specified embed FingerPrint parameter (EmbedFingerPrint) is not valid. This parameter must be a 26-bit unsigned value (0x0 to 0x3FFFFFF inclusive). The ACG_return_code parameter will return holding ACG_FALSE_SHELF_LIFE_OUT_OF_RANGE if the OverrideShelfLife parameter contains an invalid value. (Any value less than -1). The ACG_return_code parameter will return holding ACG_TRUE_ACT_CODE_GENERATED if an Activation Code was successfully generated. In which case, the ActivationCode parameter will return holding the Activation Code itself. Return ValueAs with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value. Function Information
|