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

RequestActivation


The RequestActivation function returns an Authorization Request Code corresponding to an existing Authorization Definition in the currently loaded license.

Syntax

HRESULT RequestActivation (

long RequestedAuthCodeID, 
BSTR *
AuthRequestCode,
long
* return_code

);

Parameters

RequestedAuthCodeID 

[IN] This is the Authorization Definition ID (0 through 63 inclusive) for which your application is requesting the corresponding Authorization Request Code (for the host system).

 

AuthRequestCode 

[OUT] Wide character string which will return holding the Authorization Request Code corresponding to the RequestedAuthCodeID.

 

return_code 

[OUT] This is (a pointer to) a numeric value that returns with a RETURNCODE that identifies the outcome of the operation.

Remarks

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

The RequestActivation function takes as input a requested Authorization Definition ID (0 through 63) and returns the corresponding Authorization Request Code and a return code.

The value of the return_code parameter will contain the outcome of its processing. If the license has not been initialized successfully with a call to StartUp, the function will return with return_code holding FALSE_LICENSE_NOT_INITIALIZED.

If the ID corresponds to a Deactivation Authorization Definition, the function will return with return_code holding FALSE_DEACTIVATION_ID_ONLY.  

If the ID is out of range or does not correspond to a valid ID for the currently loaded license, the function will return with  return_code holding FALSE_CODE_INVALID_BAD_ID.

If the ID corresponds to a valid definition, the function will return with  return_code holding FALSE_WAITING_FOR_CODE. Note that FALSE_WAITING_FOR_CODE indicates that the code was generated successfully but that the ClientProtector took no specific action because it is waiting for an input (Activation) code.

The contents of AuthRequestCode should be ignored (it will be empty) unless the  return_code parameter contains FALSE_WAITING_FOR_CODE.

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