473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Not Interop Compatable?

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?
Nov 21 '05 #1
2 6051
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?

Nov 21 '05 #2
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?


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: keefah | last post by:
Hi, I'm writing a C# web app that uses Outlook to send email. I use a reference to the Microsoft Outlook 11.0 Object Library, but it's giving me problems. I tracked down some stuff on the Net...
0
by: lacour | last post by:
I can't seem to figure out the difference between adding a COM dll reference in VS2003 and by using TLBIMP. I have a COM dll that references another COM dll, and I want the syntax of my...
10
by: E.T. Grey | last post by:
Hi, I have a C++ DLL that I want to use from a C# project. I am actually usng a lot of advanced C++ features like templates, partial/specialized templates, functors and callbacks. I am also...
6
by: paul | last post by:
Just wondering if anyone knows if the .net framework is backwards compatable? Should .NET apps developed in vers 1.03 work ok for version 1.1 .net framework? THanks Paul
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
4
by: Michael Yanowitz | last post by:
Hello: I am still using Python 2.4.3, I haven't upgraded yet. However, I would like to know if my 2.4.3 programs will run in 2.5 without modification. Is there any way to test that my software...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.