SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > OnAutoActivateResult

OnAutoActivateResult


OnAutoActivateResult is an event function of the ClientProtector dispatch interface.  This event will fire upon StartUp if you subscribed to OnPrepareAutoActivate and from that event informed the ClientProtector to perform an automated Serial Number Code Exchange.  This event will allow you to synchronously determine the precise outcome of the automated Serial Number Code Exchange.

Syntax

HRESULT OnAutoActivateResult (

BSTR ActivCodeRecieved,

long * return_code

) ;

Parameters

ActivCodeRecieved

[OUT] This is a string value that will contain the Activation Code that was received from the CheckPoint License Server if the automated Serial Number Code exchange was successful.

 

return_code 

[OUT] This is a numeric value that will contain a RETURNCODE that indicates the outcome of the attempted Serial Number Code Exchange.

Remarks

OnAutoActivateResult is an event function of the ClientProtector dispatch interface.  This event will fire upon StartUp if you subscribed to OnPrepareAutoActivate and from that event informed the ClientProtector to perform an automated Serial Number Code Exchange.  This event will allow you to synchronously determine the precise outcome of the automated Serial Number Code Exchange.

If you choose to subscribe to this event, you may wish to use it to inform the user of the outcome of the server communication.  

Note that the return_code parameter will contain the outcome of the communication operation itself - not the final outcome of the StartUp call that caused this event to fire.

In the scope of this event handler, the return_code can be interpreted as:

FALSE_INVALID_SN means that the Serial Number was invalid or was not found in the CheckPoint database.

FALSE_NO_ACTIVATIONS means that the Serial Number was valid, but all the available activations for it have been consumed.

TRUE_CODE_GENERATED means that the Serial Number Code Exchange was successful and in this case the ActivCodeRecieved parameter will return holding the Activation Code that was generated on the CheckPoint server for this user.

FALSE_MISSING_MAIN_LF means that on the server the license project file was not found or could not be opened.

FALSE_MAIN_LF_CORRUPT means that on the server the license project file was found but when opened was found to be corrupt.

FALSE_CODE_INVALID_FORMAT means that the Authorization Request Code passed to the server was invalid (format).

FALSE_CODE_INVALID_BAD_ID means that the Authorization Request Code passed to the server was a valid format, but when decoded, was found not to correspond to any valid Authorization Definition ID in the license project file.

FALSE_CONNECTION_FAILURE means that the CheckPoint server could not be contacted.

FALSE_INTERNAL_FAILURE is an internal failure on the server.

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:

"ISSCProtector"

Exposed In COM Server Binaries:

"SSCProt.dll" and "SSCProtD.dll"

Related Topics