EP_RegCheckKey
EP_RegCheckKey function serves for verifying registration information.
Parameters
- Name - the registration name - a pointer to the null terminated ANSI string.
- Key - the registration key - a pointer to the null terminated ANSI string.
Return Value
If the function succeeds, the return value is 1. If the function fails, the return value is 0.
Remark
UNICODE Registration Scheme should be disabled at REGISTRATION FEATURES - Common panel.
The function fails in the following cases:
- the registration information is incorrect;
- the application is not protected.
Definition
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 : PAnsiChar; Key : PAnsiChar) : 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);
}
Examples
Show/Hide Delphi function example
uses
enigma_ide;
function ProcessRegistration(Name, Key : AnsiString) : boolean;
begin
Result := fasle;
if EP_RegCheckKey(PAnsiChar(Name), PAnsiChar(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;
}
See function examples in the installation folder, Examples subfolder.