Problem : Unable to pass an integer value from Visual Basic to Fortran DLL 
Author Message
 Problem : Unable to pass an integer value from Visual Basic to Fortran DLL

Couple of simple possibilities to start you off.
Hopefully, someone will have a better response.

Integers in VB5 are 16 bit. Make sure fortran is expecting
a 16 bit when you use type "INTEGER". If you need a 32 bit signed
integer, use VB type "Long".  

Of course, you need to be using a 32 bit Fortran compiler or
it's probably hopeless.

You might run the VB side in the environment de{*filter*}
and make sure your argumants are the type you expect.
I've had bad luck in the past defining more than one variable
on the same line (particularly where they are different types.)
I expect it's working orrectly in VB5, but... ;)

The FORTRAN is doing mixed mode arithmetic all over the
place. Yuck ;)    Some of your FORTRAN variables
might be mistyped. (Looks ok however at a glance.)
Also, the type of the function is perhaps integer, based on
the name "IHFL1" rather than double as you expect.

OK, reading your symptoms again, it's probably the
FORTRAN expecting a 32 bit integer for argument INEL and mangling it.

Luck,    ;)

- Matt



Tue, 16 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing string Arrays from Fortran DLL to Visual Basic

2. Calling Fortran 77 dll's from Visual Basic under Excel

3. HELP : Visual Basic calling FORTRAN DLL

4. HELP : visual basic calling fortran DLL

5. Fortran DLL and Visual Basic

6. Using Fortran DLL from Visual Basic

7. Unable to load a C++ dll into my Visual Basic client

8. Passing value form FileMaker script to a Visual Basic executable

9. Passing Values to Parameters from Visual Basic

10. HELP: passing structure from VBA to Fortran DLL

11. Passing Arrays to Fortran DLL from VB

12. Passing arrays from FORTRAN dll from VB

 

 
Powered by phpBB® Forum Software