I am a real newbie on 64-Bit progr. so my question might sound a little stupid.
I have a VB.NET project which refered to a 32-Bit dll via COM-Interop.
I migrated the project and the COM invocation does not work anymore. I tried several compiler settings (anyCPU, x86) but nothing helped.
Then I found in my old C# book a method called DllImport (System.Runtime.InteropServices)
I declared the dll as follows:
<DllImport("fcvb.dll", CharSet:=CharSet.Auto)> _
Function dllBIN2_iv(ByVal price_u As Double, ByVal ex As Double, ByVal d_exp As Double, ByVal d_v As Double, ByVal price As Double, ByVal rate_ann As Double, ByVal acc_rate As Integer, ByVal cost_hldg As Double, ByVal acc_cost_hldg As Integer, ByVal option_type As Integer, ByVal iter As Integer, ByRef return_vlty_imp As Double) As Integer
When calling the Dll I got f... in the middle of the process saying:
errMsg = "System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)ÃÂ ÃÂ at Wcr_.NET_2005.Module1.dllBIN2_iv(Double price_u, Double ex, Double d_exp, Double d_v, Double price, Double rate_ann,...
I am running an AMD64-Bit Opteron with 2GIG of Mem on Windows Server 2003 (64-Bit) Standard.
Visual Studio 2005 Team Edition for SW Developers and .NET Framework 2.0
Any comments welcome I am open for both a COM wrapper .NET dll or n
View Complete Post