Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28632 Discussions

Pass 2 dimensional arrays between VB.Net and IVF COM dll

ljw
Beginner
230 Views

I need to pass 2-dimensional arrays of Single (REAL(4) in Fortran) from a VB.Net application to an IVF COM dll and back. I'm aware that VB.Net and IVF process arrays differently, and that there are some conversions that need to be done, but have been unable to find a code snippet from someone who has successfully done this.

the code would be something like this:

a function named populateArray(ByRef theArray()() as single) as int32 has been properly declared

Dim theArray(7,20) as single, result as int32

result= populateArray(theArrary)

console.Writeline(arr(1,1) & " " arr(1,2))

the populateArray function in the dll for this example can be trivial, eg

arr(1,1) = 11

arr(1,2) = 12

I'm using the COM dll wizard (hie) to do the declarations. theArray is declared as a 2 dimensional 1:7 and 1:20.

can anyone reply with an example of the code required to convert the array from a VB.Net array to something IVF can recognize?

0 Kudos
0 Replies
Reply