Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Delphi calling 64-bit dll.

normcler
Beginner
2,196 Views
IVF Comrades:

My current application is a Delphi 7 executable calling an IVF 9.1 generated dll. Everything, host, target, chips, etc., is IA-32. It works splendidly.

Now I will want to generate a EM64T dll for a Core 2 Duo chip running Microsoft Windows XP Pro x64 edition. Can I call this dll from my 32-bit Delphi executable?

Norm

0 Kudos
5 Replies
Steven_L_Intel1
Employee
2,196 Views
I don't think so. When you run a 32-bit executable on Windows x64, you are in an environment known as WoW (Windows on Windows), and 64-bit code is not accessible to you in any direct manner. There would probably need to be some sort oif intermediary code inserted to make it work. What benefit are you looking for from the 64-bit DLL?
0 Kudos
TimP
Honored Contributor III
2,196 Views
If you search MSDN online, you should find answers to this question, such as
http://msdn.microsoft.com/msdnmag/issues/06/05/x64/default.aspx
Hope I found the right one, it's been rare lately that the forum would accept replies at the same time as MSDN is accessible.
There are specific provisions for switching and sharing data between 32-bit processes running under WOW and 64-bit processes, specifically not including mode switching for invoking a .dll.

0 Kudos
normcler
Beginner
2,196 Views
Thanks Steve,

Well, I was hoping that a 64-bit DLL would run faster than a 32-bit one on a given chip. Will it?

Norm
0 Kudos
normcler
Beginner
2,196 Views
Thanks Tim.

Norm
0 Kudos
Steven_L_Intel1
Employee
2,196 Views
normcler:
Well, I was hoping that a 64-bit DLL would run faster than a 32-bit one on a given chip. Will it?


Maybe. It all depends on what it does. Theoretically, 64-bit code could be faster because of more registers, but if there is a lot of address manipulation, 64-bit addresses take double the room and that means more memory traffic. I've seen test results go either way.

But as we've established, you have to choose. You can't have a mixed 32/64 bit application.
0 Kudos
Reply