Passing array from Fortran to VB

Passing array from Fortran to VB

abhimodak's picture

Hi

Today's "Fortran NewLetter" from Steve makes me brave to create a new thread again....

I posted this questions (http://software.intel.com/en-us/forums/showthread.php?t=71099) a few days ago. I admit that I may not have searched the forum rigorously enough. Can someone point me to a program sample?

The question is how to pass an array from Fortran to VB.

I know that VB has safearrays while Fortran does not. I tried to create and pass a safearray in Fortran (using SafeArrayCreate) and pass it to VB. But it does not work. I have also tried MarshalAs in VB.

Sincerely

Abhi

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
ArturGuzik's picture

Hi,

have you seen this KB article?

Or maybe you mean that Fortran allocates memory and passes array to VB?

If so, I saw libraries for .Net stating that they allocate all memory on .Net side and pass to Fortran and that's the way to go. With (huge and even reasonably large) arrays GC is sometimes a tricky issue. I have to admit I never used SafeArrays so far.

A.

Edit: OK, I read more carefully the post you refer to, and you mean the latter. Well.... if you do manage to resolve that, I will be interested to see it.

Login to leave a comment.