f



Use Intel Fortran DLL in VB.net application

When trying to use an entry in a Fortran DLL (Intel(R) Compiler 16.0 Update 3 (package 207)) I get the message  "An attemt was made to load a program with an incorrect format. Exception result HRESULT: 0x8007000B).
On the development PC everything works. Any suggestions ?
0
jensen
12/22/2016 1:27:32 PM
comp.lang.fortran 11941 articles. 2 followers. Post Follow

2 Replies
549 Views

Similar Articles

[PageSpeed] 38

On Thursday, December 22, 2016 at 8:27:34 AM UTC-5, jense...@gmail.com wrot=
e:
> When trying to use an entry in a Fortran DLL (Intel(R) Compiler 16.0 Upda=
te 3 (package 207)) I get the message  "An attemt was made to load a progra=
m with an incorrect format. Exception result HRESULT: 0x8007000B).
> On the development PC everything works. Any suggestions ?


You may want to try posting your question(s) on the Intel Fortran Forum for=
 Windows for more informed and pertinent responses:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-w=
indows

Some experienced and expert user might be able to guess correctly what the =
problem might be (e.g., .NET assembly with x64 configuration trying to load=
 Fortran DLL built with Win32 configuration or missing/wrong Intel Fortran =
redistributables on the PC where the occurs as opposed to development PC an=
d so forth), but my hunch is you will need to provide more details on your =
Fortran DLL and its API settings for external procedures (Intel default ver=
sus STDCALL, etc.), VB.NET code and assembly configuration, development PC =
versus the PC where the error happens.

And/or you may want to research by yourself on the Intel site and the forum=
, for there is ton of valuable information available there.  For example, t=
ake a look at this link, there is a complete example of VB.NET calling Fort=
ran DLL:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-w=
indows/topic/509148
0
FortranFan
12/22/2016 4:34:09 PM
On 12/22/2016 8:27 AM, jensen.j.h@gmail.com wrote:
> When trying to use an entry in a Fortran DLL (Intel(R) Compiler 16.0 Update 3 (package 207)) I get the message  "An attemt was made to load a program with an incorrect format. Exception result HRESULT: 0x8007000B).
> On the development PC everything works. Any suggestions ?
>

Change the VB target platform from "Any CPU" to "X86" (or "X64" if you 
built your DLL for x64). You'll get this problem when running an "Any 
CPU" VB program on a 64-bit system where the DLL is 32-bit.

-- 
Steve Lionel
Developer Products Division
Intel Corporation
Merrimack, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
   http://software.intel.com/en-us/forums/
Intel Software Development Products Support
   http://software.intel.com/sites/support/
My Fortran blog
   http://www.intel.com/software/drfortran

Refer to http://software.intel.com/en-us/articles/optimization-notice 
for more information regarding performance and optimization choices in 
Intel software products.
0
Steve
12/22/2016 5:00:21 PM
Reply: