I am upgrading my interface that was originally done in VB 6.0 using CVF 6.6 as the number cruncher via a .DLL compile. Everything worked fine. Now I am upgrading to VB .NET and I am having many problems with structures being passed to the fortran .DLL. I have a simple structure like this:
I can get the first element (MYLONG) to align properly, but everything else falls apart. I have tried everything I can think of in VB to make this work, but it seems impossible. I have been able to force an offset position for the first 2 elemens (MYLONG and MYDOUBLE), and they will come over into the .DLL properly. However, the array is always screwed up. VB is forcing the header information in the structure (length, pointer info, etc). I don't know what to do about this situation. I need a solution to this and fast.
If I pass the structure or class byref in VB, I really get a mess in fortran. There isn't a single value that will align properly. Apparently VB passes loads of header information. If I pass the first element of the object/array from VB byref, I can get a few fields to align, but there are still serious problems.
Can CVF support VB objects? Ie, an instance of a class? I like the compaq compiler, but I need this to work as I wish with .NET. Please let me know what to do about this problem.