EP_RegCheckKeyW
EP_RegCheckKey 函数用来验证注册信息。
参数
- Name - 注册名称 - 指向以 \0 结尾的字符串指针;
- Key - 注册密匙 - 指向以 \0 结尾的字符串指针。
返回值
如果函数成功执行,返回值为 1 ,否则为 0 。
备注
使用UNICODE注册信息需注意激活对应选项,请参看常规选项.
在以下情况函数不会执行成功:
定义
Show/Hide C++ function definition
extern "C" __declspec( dllimport ) __stdcall BOOL EP_RegCheckKey( char* Name, char* Key );
Show/Hide Delphi function definition
function EP_RegCheckKey ( Name : PChar; Key : PChar) : boolean; stdcall;
Show/Hide Visual Basic function definition
Public Declare Function EP_RegCheckKey Lib "enigma_ide.dll" (Name As String, Key As String) As Boolean
Show/Hide C# (.NET) function definition
public class Enigma_IDE
{
[DllImport("enigma_ide.dll", CallingConvention = CallingConvention.StdCall)]
public static extern bool EP_RegCheckKey(string Name, string Key);
}
实例
Show/Hide Delphi function example
uses
enigma_ide;
function ProcessRegistration(Name, Key : string) : boolean;
begin
Result := fasle;
if EP_RegCheckKey(PChar(Name), PChar(Key)) then
begin
MessageBox(0, 'You have entered valid registration information'#10#13'You must call EP_RegSaveKey function to save it now!', 'Application', 0);
Result := true;
end;
end;
Show/Hide C++ function example
#include "include/enigma_api.h"
#pragma link "include/enigma_ide.lib"
BOOL ProcessRegistration(char* Name, char* Key)
{
if (EP_RegCheckKey(Name, Key))
{
MessageBox(0, "You have entered valid registration information\nYou must call EP_RegSaveKey function to save it now!", "Application", 0);
return TRUE;
}
return FALSE;
}
可以在安装文件夹下的 Examples 子文件夹查看函数实例。