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

OnAttemptDeactivate


OnAttemptDeactivate is an event function of the ClientProtector dispatch interface.  If you are using a Deactivation Authorization Definition in the license and invoke the RequestDeactivation function - this event will fire. Your application can respond to this event by implementing it and subscribing to the event interface, providing a synchronous means for the user to have a "last-chance" to abort the deactivation (for which you control the user interface).

Syntax

void OnAttemptDeactivate (

VARIANT_BOOL * AllowDeactivate

);

Parameters

AllowDeactivate    

[OUT] This is a (pointer to a) boolean value that you return to the ClientProtector when responding to this event. It should be set to true if your user wishes to allow the deactivation to complete, false otherwise.

Remarks

OnAttemptDeactivate is an event function of the ClientProtector dispatch interface.  If you are using a Deactivation Authorization Definition in the license and invoke the RequestDeactivation function - this event will fire. Your application can respond to this event by implementing it and subscribing to the event interface, providing a synchronous means for the user to have a "last-chance" to abort the deactivation (for which you control the user interface).

If you are using deactivation functionality in your license, you should implement this function.  However, you can choose not to if you do not need to prompt the user.

The event handler provides a synchronous method for you to inform the user of the consequences of deactivating the license and give them a last chance to abort the operation.

Set AllowDeactivate to false if you wish to abort the deactivation.

Note that if you do not subscribe to the event, or you do subscribe to it, but fail to set the AllowDeactivate parameter to false - the deactivation will proceed.

See the SoftwareShield ClientProtector Control Flow Charts for more information about where this event fires and how it handles the logic around RequestDeactivation.

Return Value

Your event handler does not need to return a value.

Function Information

Exposed By Interface:

"ISSCProtector"

Exposed In COM Server Binaries:

"SSCProt.dll" and "SSCProtD.dll"

Related Topics