Unsafe code compiled in Delphi 2005

I have a Delphi code with pointer operator ^, it can not be compiled under Delphi 2005.
Can I set the compiler enviroment paramenters without change the source code?
Any suggestions?
 
ysimonAsked:
Who is Participating?
 
BlackTigerXConnect With a Mentor Commented:
try this directive
{$UNSAFECODE ON}
0
 
BlackTigerXCommented:
this is a Win32 application right?

somewhere in the Tools, Debugger... my Delphi 2005 broke =o(
0
 
ysimonAuthor Commented:
The code with @ and ^ can be compiled under Delphi 2005 Win32.
Now I am using it in an ASP.NET application under Delphi 2005.
It stoped at the line with @ and ^ operators.

ysimon
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
BlackTigerXCommented:
I don't think unsafe code is supported in Delphi.NET... that's why they introduced the unsafe warnings since Delphi 7... let me see if I can find some official references for this
0
 
ysimonAuthor Commented:
This doesn't work.
0
 
ysimonAuthor Commented:
It works, you should use it like:

{$UNSAFECODE ON}
procedure/function (..); unsafe;
begin
..

end;
{$UNSAFECODE OFF}

Thanks,

ysimon
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.