EP_CheckupCopies
EP_CheckupCopies 函数返回程序的限制进程数。在 进程实例数量限制 页面设置,参看EP_CheckupCopiesCurrent 和 EP_CheckupCopiesTotal函数。
参数
- Total - 允许程序运行的总进程数。
- Current - 程序正运行的进程数。
返回值
如果函数成功执行,返回值为1,否则为0。
备注
函数在以下情况不会执行成功:
定义
Show/Hide C++ function definition
extern "C" __declspec( dllimport ) __stdcall BOOL EP_TrialDays( int* Total, int* Left );
Show/Hide Delphi function definition
function EP_CheckupCopies( var Total, Current : Cardinal) : boolean; stdcall;
Show/Hide Visual Basic function definition
Public Declare Function EP_CheckupCopies Lib "enigma_ide.dll" (ByRef Total As Long, ByRef Current 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_CheckupCopies(ref Int32 Total, ref Int32 Current);
}
实例
Show/Hide Delphi function example
uses
enigma_ide;
procedure CheckCopies;
var
Total, Current : Cardinal;
begin
if EP_CheckupCopies(Total, Current) then
begin
MessageBox(0, PAnsiChar(format('There is set up %d of total executed copies,'#10#13'This is the %d-th runing copy!', [Total, Current])), 'Application', MB_OK or MB_ICONINFORMATION);
end else
begin
MessageBox(0, 'Unable to get executed copies count. To solve the problem, be sure:'#10#13'1. Application is protected,'#10#13'2. Checkup of executed copies is enabled.', 'Application', MB_OK or MB_ICONERROR);
end;
end;
可以在安装文件夹下 Examples\ExecutedCopies 子文件夹里查看函数使用实例。