WR_Activate

This function is used to display the activation dialog, which allows the user to perform an activation. The last parameter of the function accepts a handle to the application's primary window, but you may set this parameter to 0 if you do not want the activation dialogs to run as modal dialogs attached to your application window.

To see a working example of this function select the Upgrade Instant Protection PLUS 3 License item in Instant Protection PLUS 3 under the Help menu.

Syntax

Visual Basic
Declare Function WR_Activate(ByVal flags As Long, ByVal action As Long, ByVal action_flags As Long, ByVal hWnd As Long) As Long
C/C++
LONG WR_Activate(LONG flags, LONG action, LONG action_flags, HWND hWnd);

Arguments

flags
Reserved. Set to 0.
action
Reserved. Always set to 1.
action_flags
Reserved. Set to 0
hWnd
A handle to the application's window.

Returns

If the call fails, any of the API Error Codes may be returned.

-3
The action parameter was not set to a value of 1 as required.
-2
The application has not been wrapped.
-1
The API is not available. Please check your settings in the wizard. See the Testing section in the API Setup topic for more information.
0
The activation failed or was canceled by the user.
1
The activation was completed successfully.