• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

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?
 
0
ysimon
Asked:
ysimon
  • 3
  • 3
1 Solution
 
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
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
BlackTigerXCommented:
try this directive
{$UNSAFECODE ON}
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now