SoftwareShield COM-Activator™ Component > COM-Activator™ Reference > GenActCodeNoParamFP

GenActCodeNoParamFP


The GenActCodeNoParamFP function generates an Activation Code from an embedded FingerPrint value for a specific license project file. The Authorization Definition to generate the Activation Code for must not take a parameter.

Syntax

HRESULT GenActCodeNoParamFP (

BSTR LPJFileNamePath,

long AuthID,

long EmbedFingerPrint,

long OverrideShelfLife,

BSTR * ActivationCode,

long * ACG_return_code

);

Parameters

LPJFileNamePath

[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).

 

OverrideShelfLife

[IN] This is a numeric value that contains a value to use to override the default Shelf-Life of the corresponding Authorization Definition.  If you wish to use the default Shelf-Life for the corresponding definition, use the value negative one (-1). Otherwise use zero (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.

Remarks

Use GenActCodeNumParamFP to generate an Activation Code from a FingerPrint value using a specified license project file which does not take a parameter.

You can pre-determine if an Authorization Request Code takes a parameter by first calling the DecodeARC function and inspecting its AuthParamType parameter.

You may wish to use this function if:

  • You have previously collected your clients machine FingerPrint from a call to the ClientProtector GetHostMachineFingerPrints function, or

  • You have decoded a previously generated Authorization Request Code from that client using the DecodeARC COM-Activator function, or

  • You are using a "blank" FingerPrint. A "blank" FingerPrint is one where your license has FingerPrinting turned off (FPCode = 0).  If you are using a "blank" FingerPrint, you do not have to have previously collected the target machines FingerPrint, however - you must use the BLANK_EMBEDDED_FINGERPRINT constant defined in the FINGERPRINT_CONST enumeration in the EmbedFingerPrint parameter.

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_WRONG_PARAM_TYPE if the AuthID parameter specified does not correspond to an Authorization Definition which does not take a 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 Value

As 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

Exposed By Interface:

"ISSCodeGenerator"

Exposed In COM Server Binary:

"SSCGen.dll"

 

Note: The COM Activator only comes with the Enterprise, Internet and Server Editions of the SoftwareShield DRM Kit.

  Related Topics