CallIp

This function is used to check the application's license status. If the application has not been activated, an activation dialog will be displayed (example below) giving the user the option to purchase, activate or evaluate the trial depending on the setting chosen in the Instant Protection PLUS 3 wizard. Once the trial has expired, the user must purchase and activate a license to continue using the application.

Important

Calling this function multiple times is not supported and may cause unforeseen behavior. It is recommended to only call the function once in your application code.

Using CallIpEx instead is recommended, as it contains additional arguments that may be useful now and/or in the future.

Syntax

Visual Basic
Declare FunctionCallIp(ByVal flags As Long, ByVal key As String, ByVal path As String) As Long
C/C++
LONG CallIp(LONG flags, LPCSTR key, LPCSTR path);

Arguments:

flags
FLAGS_NONE (0)
Use default behavior
FLAGS_USE_THREAD (1)
Uses a separate thread of execution. Use this flag if getting a stack overflow exception, such as with a Java application.
FLAGS_SILENT_MODE (2)
Sets the Instant Protection PLUS 3 dialogs to silent. Use this flag to prevent the activation dialog from ever appearing.
FLAGS_USE_XML_PATH (4)
Changes the Instant Protection PLUS 3 DLL's behavior so it treats the directory containing the encrypted XML file as the application directory. These causes it to load the primary license file (if not in the registry) and any other support files (such as images, language files) from the directory containing the encrypted XML file.
FLAGS_IGNORE_DPI (8)
Changes the Instant Protection PLUS 3 DLL's behavior so it does not attempt to detect the system's DPI setting and scale the internal dialog controls based on DPI. This flag should only be used if Instant Protection PLUS 3 is causing strange scaling issues with the protected application.
key
Project specific decryption key found on the File Output page (last page) of the Instant Protection PLUS 3 wizard.
path
Path to the project specific secure XML configuration file generated by the Instant Protection PLUS 3 wizard.
Important

It is recommended to construct an absolute path instead of a relative path when specifying the location of your XML configuration file. Using relative paths would require you to set your application's working directory for each method of execution(i.e. through a shortcut, installer, Windows Explorer,etc).

Returns:

When the application is licensed or a valid trial, the unique Return Key found on the File Output page (last page) of the Instant Protection PLUS 3 wizard is returned. When an error occurs, one of the errors listed below may be returned.

Zero (0)
The application is not licensed, the trial is expired or the user clicked Exit on the activation dialog.
RESULT_FILE_NOT_FOUND (7)
The XML configuration file specified in the path argument cannot be found.
RESULT_CANNOT_CREATE_THREAD (-99)
Unable to create the thread when the FLAGS_USE_THREAD flag is specified.
RESULT_INCOMPATIBLE_FILE_VERSION (-98)
The XML configuration file was generated with a different version of the wizard than that of the DLL being used.
RESULT_INVALID_XML (-97)
The XML file and the Key combination are invalid.