EP_TrialExecutions
EP_TrialExecutions function servers for retrieving the total trial period executions and the trial period executions left. The total executions count of the trial period should be defined in TRIAL CONTROL - Limitation of executions count panel. See also the extended functions EP_TrialExecutionsLeft and EP_TrialExecutionsTotal.
Parameters
- Total - the total number of trial executions.
- Left - the number of trial executions left.
Return Value
If the function succeeds, the return value is 1. If the function fails, the return value is 0.
Remark
The function fails in the following cases:
- the limitation of the executions count was not enabled;
- the application is not protected.
If the user's PC has several user accounts, the trial information will be different for each user.
Definition
Show/Hide C++ function definition
extern "C" __declspec( dllimport ) __stdcall BOOL EP_TrialExecutions( int* Total, int* Left );
Show/Hide Delphi function definition
function EP_TrialExecutions( var Total, Left : integer) : boolean; stdcall;
Show/Hide Visual Basic function definition
Public Declare Function EP_TrialExecutions Lib "enigma_ide.dll" (ByRef Total As Long, ByRef Left As Long) As Byte
Show/Hide C# (.NET) function definition
public class Enigma_IDE
{
[DllImport("enigma_ide.dll", CallingConvention = CallingConvention.StdCall)]
public static extern bool EP_TrialExecutions(ref Int32 Total, ref Int32 Left);
}
Examples
Show/Hide Delphi function example
uses
enigma_ide;
procedure CheckTrial;
var
TotalExecs : integer;
LeftExecs : integer;
begin
if EP_TrialExecutions(TotalExecs, LeftExecs) then
begin
if LeftExecs = 0 then
begin
MessageBox(0, 'Your trial period has expired! You must purchase application to take effect!', 'Application', 0);
ExitProcess(0);
end;
end else
MessageBox(0, 'I seem that you have forgotten to define executions trial limit in Enigma!', 'Application', 0);
end;
Show/Hide C++ function example
#include "include/enigma_api.h"
#pragma link "include/enigma_ide.lib"
void CheckTrial()
{
int TotalExecs;
int LeftExecs;
if (EP_TrialExecutions(&TotalExecs, &LeftExecs))
{
if (LeftExecs == 0)
{
MessageBox(0, "Your trial period has expired! You must purchase application to take effect!", "Application", 0);
ExitProcess(0);
}
} else
{
MessageBox(0, "I seem that you have forgotten to define days trial limit in Enigma!", "Application", 0);
}
}
See function examples in the installation folder, Examples\Trial subfolder.