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

AutoActivateSerialNumber


The AutoActivateSerialNumber function attempts to contact the CheckPoint server and perform a Serial Number Code Exchange.

Syntax

HRESULT AutoActivateSerialNumber (

BSTR ASerialNumber,

long * return_code

) ;

Parameters

ASerialNumber

[IN] This is a string value in which you pass the Serial Number the user entered that you wish to activate.

 

return_code

[OUT] This is (a pointer to) a numeric value that indicates the outcome of the operation.

Remarks

Note: This function is illustrated in the SoftwareShield Flowcharts - (see flow chart #5).

The AutoActivateSerialNumber function attempts to contact the CheckPoint server and perform a Serial Number Code Exchange.

If the license has not been correctly initialized with a call to StartUp, the return_code will return holding FALSE_LICENSE_NOT_INITIALIZED.

If a Serial Number was not passed in the ASerialNumber parameter, the return_code will return holding FALSE_NO_SN.

If there is no CheckPoint URL in the currently loaded license, the return_code will return holding FALSE_NO_CHECKPOINT_URL.

If a test connection to the CheckPoint server could not be established, the return_code will return holding FALSE_CONNECTION_FAILURE.  Note that the test connection and the subsequent operation to perform the Serial Number Code Exchange will be performed using any proxy server details that may be entered in the license.  (See: SetProxyServerInfo, GetProxyServerInfo and QuickTestCheckPointConnection).

Otherwise, an authorization request code is generated and sent to the CheckPoint server along with the Serial Number.

On the server, the Serial Number is validated. Regardless of the outcome of the server side operation, when it completes, the OnAutoActivateResult event will fire to allow your application a chance to respond to the specific server outcome.

The received Activation Code (if any) is validated and if found to be valid for the machine, it is activated and the license state is updated.  

When the call to returns, the value of the return_code parameter will contain the outcome of the remainder of the processing. The best way to understand which return_code values may return from this call is to refer to the SoftwareShield Flowcharts.

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