Ken,
I have declared the sub like this:
Declare Sub FServe Lib "FXAPS.dll" (ByVal ACTYPE As String, ByVal
STR_LEN As Integer, ByRef RFBKIN As Single, ByRef IFVOLM As Integer, ByRef
IFDENS As Integer, ByRef KFVOLM As Integer, ByRef RFDENS As Single, ByRef
ITANK As Integer, ByRef NT As Integer, ByRef FMETER As Single, ByRef FCOMP As
Single, ByRef FTOL As Single, ByRef KTANK() As Integer, ByRef WCFGTO As
Single, ByRef ERRMSG As Integer)
And call it like this:
Call FServe(sACType, iDummy, rFBkIn, iFVolm, iFDens, kFVolm, rFDens, iTank,
iNumTnk, rFMeter, rFComp, rFTol, kTank, rMTOGW, iERR)
This is how I would call some API if I were using some function not included
in the .NET framework. Am I missing something?
Thanks,
Erik
"Ken Tucker [MVP]" wrote:
Hi,
I believe that you have to call the functions in the dll like an
api.
http://msdn.microsoft.com/library/de...indowsAPIs.asp
Ken
------------------------------
"Engineerik" <En********@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...I am using VB.NET as a GUI to perform some calculations which are done in a
FORTRAN DLL. In the validating event handler for a text box I call a
subroutine in the FORTRAN DLL to do some calculations with the value in
the
text box.
I have verified using the FORTRAN debugger that the subroutine is being
called and all the arguments are passed as expected. When the DLL is done
and I return to my VB.NET code, the following error occurs.
"An unhandled exception of type 'System.ArgumentException' occurred in
WinAPS.exe
Additional information: Method's type signature is not Interop
compatible."
I haven't been able to locate any info on what this means.
Anybody know what this is all about?