EP_RegKeyCreationDate
EP_RegKeyCreationDate function serves for retrieving the Registration key creation date. See Creating Keys for more details. See also the extended function EP_RegKeyCreationDateEx.
Parameters
- Year - the year of the key creation date.
- Month - the month of the key creation date.
- Day - the day of the key creation date.
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:
- there is no valid registration key;
- the application is not protected.
Definition
Show/Hide C++ function definition
extern "C" __declspec( dllimport ) __stdcall BOOL EP_RegKeyCreationDate( int* Year, int* Month, int* Day );
Show/Hide Delphi function definition
function EP_RegKeyCreationDate( var Year, Month, Day : integer) : boolean; stdcall;
Show/Hide Visual Basic function definition
Public Declare Function EP_RegKeyCreationDate Lib "enigma_ide.dll" (ByRef Year As Long, ByRef Month As Long, ByRef Day 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_RegKeyCreationDate(ref Int32 Year, ref Int32 Month, ref Int32 Day);
}
Examples
Show/Hide Delphi function example
uses
enigma_ide;
procedure TfrmMain.OnRegistration(Name, Key : string);
var
wYear, wMonth, wDay : integer;
begin
if EP_RegCheckKey(PAnsiChar(Name), PAnsiChar(Key)) then
begin
if EP_RegKeyCreationDate(wYear, wMonth, wDay) then
begin
eKeyCreation.Color := clLime;
eKeyCreation.Text := format('%.2d/%.2d/%.2d', [wMonth, wDay, wYear]);
end;
end;
end;
See function examples in the installation folder.