Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

C# calling Fortran

kstultz
Beginner
390 Views

I'm working on a project where a C# GUI is being used to call a Fortran dll. Everything worked fine until I upgraded VS2005 with SP1. Now C# won't call my dll anymore. I get an error message that says: "An attempt was made to load a program with an incorrect format (Exception from HRESULT: 0x8007000B).....". On machines that have not been upgraded, the code works fine.

Have there been any other similar problems reported and dones anyone have an idea of what I should doother than try touninstall SP1?

Thanks, Kenny

0 Kudos
4 Replies
Steven_L_Intel1
Employee
390 Views
I just tried my C#-calls-Fortran example with VS2005 SP1 and Intel Fortran and it worked ok. I know there's a problem with Intel C++ and VS2005 SP1 (to be fixed in the next 9.1 update) but Fortran does not seem to be affected.
0 Kudos
kstultz
Beginner
390 Views

Steve,

FWIW, we've done some testing on this in the last few days and the problem occurs only when we are using a computer with Win64 as the operating system. As long as we stick with computers using Win32 we have no trouble getting C# to call Fortran.

Which operating system were you using?

Thanks, Kenny

0 Kudos
Steven_L_Intel1
Employee
390 Views
I was using 32-bit Windows. My understanding is that you can't mix 32 and 64 bit code and that you need to have a 64-bit DLL for this purpose on Win64. I have not tried this environment, however.
0 Kudos
wisperless
Beginner
390 Views
That's right. I am using 64 bits machine and I have to recompile everything using 64bit settings in the VC 2005. Otherwise, it won't work
0 Kudos
Reply