Page 1 of 1

Delphi 2010 Support

Posted: Sun Sep 13, 2009 2:51 am
by snura
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 :

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 .

Re: Delphi 2010 Support

Posted: Sun Sep 13, 2009 8:42 am
by Enigma
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!

Re: Delphi 2010 Support

Posted: Sun Sep 13, 2009 5:05 pm
by snura
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.

Re: Delphi 2010 Support

Posted: Mon Sep 14, 2009 7:23 am
by Enigma
Ahh, undersrtand, thanks for the info!

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