EP_RegKeyCreationDate
EP_RegKeyCreationDate 函数用来取得注册密钥的创建日期。参见 创建密钥 一节获取更多信息。或者查看函数 EP_RegKeyCreationDateEx。
参数
- Year - 密钥创建的年份。
- Month - 密钥创建的月份。
- Day - 密钥创建的日期。
返回值
如果函数成功执行,返回值为 1 ,否则为 0 。
备注
在以下情况函数不会执行成功:
定义
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);
}
实例
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;
可以在安装目录下查看函数实例。