Passing Arrays to Fortran DLL from VB 
Author Message
 Passing Arrays to Fortran DLL from VB

I can easily pass integers back and forth from VB (excel) to a fortran DLL
but cannot seem to do the same with arrays. I receive no errors only the
values of the elements of the arrays are all zero upon return from the DLL.

Any suggestion ?

Jon



Fri, 08 Mar 2002 03:00:00 GMT  
 Passing Arrays to Fortran DLL from VB

Quote:

>I can easily pass integers back and forth from VB (excel) to a fortran DLL
>but cannot seem to do the same with arrays.

It's been some time since I did that (with VB5 and Digital Visual Fortran)
but as I recall the Fortran DLL is expecting to be passed the address of the
first member of the array, so when you call it the parameter to pass is
yourarray(0) (replace 0 with whatever is your
base) and do it ByRef not ByVal.

Cheers, Russell Robinson



Sun, 10 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing arrays from FORTRAN dll from VB

2. Passing string Arrays from Fortran DLL to Visual Basic

3. Passing VB strings to Lahey FORTRAN DLLs

4. Passing array from VB to DLL and returning array

5. Passing arrays from VB5 to MS FORTRAN PwrStn

6. passing arrays from vb dll to vb form

7. HELP: passing structure from VBA to Fortran DLL

8. Problem : Unable to pass an integer value from Visual Basic to Fortran DLL

9. HELP: passing structure from VBA to Fortran DLL

10. HELP: passing structure from VBA to Fortran DLL

11. PB/DLL passing multidimensional VB arrays by pointers

12. Passing Array of data from DLL to VB

 

 
Powered by phpBB® Forum Software