Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Passing array from Fortran to VB

abhimodak
New Contributor I
384 Views

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

0 Kudos
1 Reply
ArturGuzik
Valued Contributor I
384 Views
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.

0 Kudos
Reply