- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a program that runs fine as an executable. I made a DLL out of it and called it from VB. That all works fine until it comes to the part of the F90 code where there's an array of Types. As soon as it references a member of the type MB(I)%Time, it throws an access violation. I tried declaring the array of Types as both Static and Dynamic, it still ACCVIO's out. I wonder if this is something in the security model?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Summary descriptions of code are not useful in diagnosing problems. There are many issues relating to passing arguments between VB and Fortran. If you'll show us the VB code and the Fortran code we may be able to help. (And by code I don't mean snippets - Ideally a minimal example that shows the problem.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. It looks like the problem was declaring the Parameter I was passing (a single integer) from VB to F90. I had declared it incorrectly in the VB. I used
<DllImport("ExtranDB.dll")>Public Shared Sub ExtranDB(ByVal I as Integer)
But after looking harder at it, every time it access the parameter it ACCVIO'd. Worked great after
<DllImport("ExtranDB.dll")>Public Shared Sub ExtranDB(ByRef I as Integer)
So you can consider this closed.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page