EP_RegHardwareID
EP_RegHardware function serves for retrieving unique user PC information. See Registration Features - Hardware Lock panel for more detailed information.
Parameters
The function does not have parameters
Return Value
If the function succeeds, the return value is a pointer to the null terminated ANSI string. If the function fails, the return value is 0.
Remark
UNICODE Registration Scheme should be disabled at REGISTRATION FEATURES - Common panel.
Definition
Show/Hide C++ function definition
extern "C" __declspec( dllimport ) __stdcall PANSICHAR EP_RegHardwareID();
Show/Hide Delphi function definition
function EP_RegHardwareID : PAnsiChar; stdcall;
Show/Hide Visual Basic function definition
Public Declare Function EP_RegHardwareID Lib "enigma_ide.dll" As String
Show/Hide C# (.NET) function definition
public class Enigma_IDE
{
[DllImport("enigma_ide.dll", CallingConvention = CallingConvention.StdCall)]
public static extern string EP_RegHardwareID();
}
Examples
Show/Hide Delphi function example
uses
enigma_ide;
procedure ShowHardwareID;
var
pcHardware : PAnsiChar;
begin
pcHardware := EP_RegHardwareID;
if pcHardware <> nil then
begin
MessageBox(0, format('The Hardware ID is: %s', [AnsiString(pcHardware)]), 'Application', 0);
end else
begin
MessageBox(0, 'Application is not protected...?', 'Application', 0);
end;
end;
Show/Hide C++ function example
#include "include/enigma_api.h"
#pragma link "include/enigma_ide.lib"
void ShowHardwareID()
{
char* cHardware = null;
cHardware = EP_RegHardwareID();
MainForm -> Text.c_str = cHardware;
}
See function examples in the installation folder, Examples subfolder.