Delphi 2010 Support

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
snura
Posts: 15
Joined: Sat Sep 05, 2009 11:58 pm

Delphi 2010 Support

Post by snura » Sun Sep 13, 2009 2:51 am

There is a compatibility issues for the delphi header when implementing on delphi 2010 or delphi 2009?iam just newbie in delphi,i take a shoot and trying to 'fix' it myself,it's easy
originally posted by KhanDelphi :
Delphi 2009 <> Delphi 2007 (any old version) is STRING type:

+ In Delphi2009 (12),
type STRING = UnicodeString
UnicodeString is not the same WideString

+ In Delphi 2007 (6,7,8,9,10,11)
STRING is the same AnsiString
WideString support for Unicode.

Because any different type in old version with Delphi 2009, someone must change anything in the PAS files of the old version:

+ In package, replace VclJpg with VclImg
+ Replace WideString with string
+ Replace WideChar with Char.
You look WideCharToMultibyte, MultibyteToWideChar may be error! Because "WideChar"-->"Char"

+ Replace WChar with Char

+ Replace AnsiStrComp with StrComp
Do that with any Ansi function.
+ Find some words as "Ansi" to remove it if you need.
other resources : http://www.jacobthurman.com/?p=27

based on both of these,here is the new delphi header for 2009 & 2010,tested on 2010,dunno really sure since i just newcomer in delphi ,attached below just replace your old header on : C:\Program Files\The Enigma Protector\EnigmaSDK\Delphi & C:\Program Files\The Enigma Protector\EnigmaSDK .
You do not have the required permissions to view the files attached to this post.

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

Re: Delphi 2010 Support

Post by Enigma » Sun Sep 13, 2009 8:42 am

The problem is very simple, you just mixed some versions.. the bug that you are describing was solved few versions ago (seems you are used SDK files from Enigma 1.71, in latest DEMO or FULL it is solved). See attached enigma_ide.pas from the latest version, there all PChar was replaced with PAnsiChar, this file should not cause errors!
You do not have the required permissions to view the files attached to this post.

snura
Posts: 15
Joined: Sat Sep 05, 2009 11:58 pm

Re: Delphi 2010 Support

Post by snura » Sun Sep 13, 2009 5:05 pm

you have missunderstand me,i was just sharing the 'fixed' one,i have already tried the 1.77 sdk got some error when compiling :
[DCC Error] test_unit.pas(52): E2033 Types of actual and formal var parameters must be identical
[DCC Error] test_unit.pas(82): E2010 Incompatible types: 'Char' and 'AnsiChar'
[DCC Error] test_unit.pas(82): E2010 Incompatible types: 'Char' and 'AnsiChar'
[DCC Fatal Error] test.dpr(6): F2063 Could not compile used unit 'test_unit.pas'
the project is "\The Enigma Protector\Examples\HardwareID\Delphi", after i change in the header from PAnsiChar into PChar,it worked :),as suggested with article above.

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

Re: Delphi 2010 Support

Post by Enigma » Mon Sep 14, 2009 7:23 am

Ahh, undersrtand, thanks for the info!

Anyway, I will download D2010 trial and take a look at this issue!

Thanks!

Post Reply