Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Fortran Programming Language

how to use pb load fortran's dll?

hi,i was made  a dll by fortran,and now,i define a string data type in
pb program ,and i want to tans this parameter to fortran's dll ,and
same data type is  character  ,when i excute it ,it all always report
as follow:

"specified argument tyoe differs form required argument type at
runtime in dll function fuel_airpath(invalid stack pointer on return
from function call)"

in  global external functions :
SUBROUTINE fuel_airpath(ref real s ,ref string  p)library

in powerbuilder click event code:

"real s=10.0
string p

in  fortran source code:
 " subroutine fuel_airpath(s,P)

 !MS$ATTRIBUTES ALIAS:'fuel_airpath'::fuel_airpath

                implicit  none
                real*4 s
                character*(5) P


pls tell me what can i do? thanks a  lot

On Apr 26, 11:17 pm, gol@yahoo.com wrote:

1. Both programs must use the same calling convention. Does PB default
2. Both programs must use the same arguments. What is PB passing? What
does FPS expect? Often Fortran expects a pointer to a fixed length
character variable plus a hidden argument which contains the actual
length - either right after the pointer or after the other arguments.
How do you specify pass by value in the caller?
3. The actual strings must be compatible. Your caller may be passing a
string of length 3 but your callee assumes a length of 5. Is the
string NUL terminated? Does it matter to the callee?
4. Look at examples of interfacing Visual Basic with Fortran DLLs and
make any necessary changes.

-- e-mail: epc8 at juno dot com

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc