Open topic with navigation
CallIpEx
This function is an extension of the CallIp function. An hWnd
parameter has been added to make the dialogs modal, allowing the Instant Protection PLUS 3 dialogs (example below) to force being on top of the window for which the handle is given. Several reserved arguments
have also been added for future use.
CallIpEx 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.
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.
Syntax
- Visual Basic
- Declare Function CallIpEx(ByVal hWnd As Long,
ByVal flags As Long,
ByVal key As String,
ByVal path As String,
ByVal reserved1 As String,
ByVal reserved2 As String,
ByVal reserved3 As String,
ByVal reserved4 As Long,
ByVal reserved5 As Long,
ByVal reserved6 As Long)
As Long
- C/C++
- LONG CallIpEx(PPHWND hWnd,
LONG flags,
LPCSTR key,
LPCSTR path,
LPSTR reserved1,
LPSTR reserved2,
LPSTR reserved3,
LONG reserved4,
LONG reserved5,
LONG reserved6);
Arguments
- hWnd
- A handle to the application's window to make the Instant Protection PLUS 3 dialogs modal, so they are forced to stay on top of the window for which the handle is given.
- Pass in zero (0) or NULL to ignore this parameter in cases where there is no handle available such as an application without a user interface or a DLL.
- 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.
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).
- reserved1 - reserved3
- Reserved. Pass an empty string ("")
or NULL
- reserved4 - reserved6
- Reserved. Pass zero (0) or NULL
Return Values
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.