Design own registration screen in Delphi?

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
DoctorJellybean
Posts: 5
Joined: Wed Aug 04, 2010 11:15 am

Design own registration screen in Delphi?

Post by DoctorJellybean » Wed Aug 04, 2010 11:24 am

Is it possible to design a custom registration screen in Delphi, instead of the Enigma application? If the user clicks a Register button on my form, that it displays the hardware ID. Also an edit box for user name and supplied key. I've looked at the samples and documentation, but there isn't anything which show or state how to get the hardware ID value.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: Design own registration screen in Delphi?

Post by Enigma » Wed Aug 04, 2010 1:59 pm

Hi,

Yes, surely, you may use own registration dialog.

To retrieve the Hardware ID you may use Enigma API function EP_RegHardwareID, to check and save registration keys - EP_RegCheckAndSaveKey. Licensing feature is very flexible and customizable.

Look at the manual, API Description section to learn more about Enigma API. Also there is an SDK in EnigmaSDK/Delphi folder and many useful examples in Examples folder.

Write me back if you will have any questions!

DoctorJellybean
Posts: 5
Joined: Wed Aug 04, 2010 11:15 am

Re: Design own registration screen in Delphi?

Post by DoctorJellybean » Wed Aug 04, 2010 2:28 pm

Thanks for reply.

I saw the Delphi SDK but there doesn't seem to be a manual/help for the SDK? So don't know how to install or use it .... will have another look.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: Design own registration screen in Delphi?

Post by Enigma » Wed Aug 04, 2010 2:48 pm

Are you using Delphi?

SDK usage is very simple. In your Delphi project, go to main menu - Project - Add to Project, and add the file enigma_ide.pas located in Enigma Protector\EnigmaSDK\Delphi folder. Then, open an unit where your custom registration form is located, Delphi - main menu - Files - Use Unit, and select enigma_ide.pas.

After that you will be able to use all set of Enigma API functions. Look at the Examples\HardwareID folder, this contains the example what are you looking for.

DoctorJellybean
Posts: 5
Joined: Wed Aug 04, 2010 11:15 am

Re: Design own registration screen in Delphi?

Post by DoctorJellybean » Wed Aug 04, 2010 8:34 pm

It is confusing, and I'm using Delphi 2010.

These are the files in the Examples\HardwareID\Delphi folder

Image

and this is the FormShow even code

Code: Select all

procedure TfrmMain.FormShow(Sender: TObject);
var
  pcName, pcKey : PAnsiChar;
begin
  eHardware.Text := string(EP_RegHardwareID); // Shows hardware after application start
  if EP_RegLoadAndCheckKey then                  // Is correct key found then will load registration infos
  begin
    EP_RegLoadKey(pcName, pcKey);                // Load registration information
    lbRegName.Caption := string(pcName);   // Set reg. name label caption

    eUserInfo.Text := string(pcName);      // Fill out name and key fields
    mKey.Text := string(pcKey);

    eUserInfo.Enabled := false;            // Disable name and key fields
    mKey.Enabled := false;
  end;
end;
Yet, when I run the test project, no ID code is displayed

Image

Am I missing something?

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: Design own registration screen in Delphi?

Post by Enigma » Thu Aug 05, 2010 5:10 am

Yes, you've missed the main thing. You have to protect file before using, Enigma API become to work only after protection.

Also, since you are using Delphi 10, I offer you to use Unicode API, functions with the W prefix, for example, use EP_RegHardwareIDW instead of EP_RegHardwareID. Read more about unicode in the manual.

DoctorJellybean
Posts: 5
Joined: Wed Aug 04, 2010 11:15 am

Re: Design own registration screen in Delphi?

Post by DoctorJellybean » Thu Aug 05, 2010 6:51 am

Somehow I missed this in the manual ... Warning: the Enigma API takes effect only after protection of the file! Do not forget to protect file before using. :(

So I have to protect the application with the Enigma program, then use the API to deal with registration inside my program? Also, and I'm sure I've missed this, does your enigma_ide.dll file needs to be supplied with protected programs?

Many thanks for your answers.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: Design own registration screen in Delphi?

Post by Enigma » Thu Aug 05, 2010 7:13 am

:) seems you have missed something again! No, enigma_ide.dll should not be distributed with the protected file. This dll is just empty library, all functions are failing there, dll is using only for allowing of execution of non protected application that uses Enigma API.

DoctorJellybean
Posts: 5
Joined: Wed Aug 04, 2010 11:15 am

Re: Design own registration screen in Delphi?

Post by DoctorJellybean » Thu Aug 05, 2010 7:29 am

Think I need some more coffee :D

I've just tried it and it works :) However, Norton AntiVirus 2011 flagged the protected file as a possible virus :o

Image

Users are not going to be impressed when they see that :( I'm going to try and run it outside program files folder and see if it still gets flagged.

Update: Yes, it still gets blocked. One can allow it in Norton to be restored and it runs fine after that, but I don't think that's ideal.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: Design own registration screen in Delphi?

Post by Enigma » Thu Aug 05, 2010 7:55 am

Such false positives may appear with the DEMO version, but it is more rarely with the FULL licensed version.

If false positive has appeared with the FULL version anyway, then there I've described what you have to do to solve this problem:
http://enigmaprotector.com/forum/viewto ... 1&start=20

After you submit false positive request to antivirus companies, they should solve it quickly, and you will not have problems.

Post Reply