Re: dll fortran for visual basic .net (little bit long data output)



hi randy,
and thanks for your answer (and for my english) than i read about the
different "weight" of the type in .nte respect vba, but i've only
double like in/out parameter.

so it seems that there's no problem with double...but in .net i've to
use point "." (to divide the decima part ) instead in fortran i need
comma "," do you think that the problem could be this?

i've checked the dll and it seem to work properly , i'll try to explain
with my poor vocabulary.
i call the dll form my .net application, the dll write some file with
the result (4 column of digits) and this files are right (checked with
the vba results), the problem seems to be in output.
below my declaration:
<DllImport("PerformancePuma.dll", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Sub _
PERFORMANCE_EXCHANGER(ByRef Temp As Double, ByRef Nz As Double,
ByRef CFL As Double, _
ByRef NITMA As Integer, ByRef Qaria As Double, ByRef Qfumi As
Double, ByRef PRESARIA As Double, _
ByRef PRESFUMI As Double, ByRef COMPFUMI As Double, ByRef
TinAria As Double, _
ByRef TinFumi As Double, ByRef H As Double, ByRef Drecuperatore
As Double, _
ByRef DINTERASSETUBI As Double, ByRef De As Double, ByRef STUBI
As Double, _
ByRef Nt As Double, ByRef SSPORC As Double)
' This function copies a file from the path src to the path
dst.
' Leave function empty - DLLImport attribute forces calls
' to MoveFile to be forwarded to MoveFileW in KERNEL32.DLL.
End Sub

the first parameter:
ByRef Temp As Double, is a bidimensional array (maybe the problem is
here) and i receive the output in this array ( dimension of the
array:(100,3) )


here is the declaration in fortran file:
***********************************
SUBROUTINE
PERFORMANCE_EXCHANGER(TEMP,DNZ,CFL,NITMA,DQARIA,DQFUMI,DPRESARIA,
DPRESFUMI,DCOMPFUMI, DTINARIA,
DTINFUMI,DH,DDRECUPERATORE,DDINTERASSETUBI,DDE,DSTUBI,DNT,DSSPORC)

!DEC$ ATTRIBUTES DLLEXPORT :: PERFORMANCE_EXCHANGER
!DEC$ ATTRIBUTES ALIAS:'PERFORMANCE_EXCHANGER' ::
PERFORMANCE_EXCHANGER

IMPLICIT DOUBLE PRECISION(A-H,O-Z)
DIMENSION TEMP(0:DNZ,0:3)

***************************************

if it could give you an understanding i can send you all the fortran
code ( i don't know fortran so my comprehension is only intuitive)
at the end i don't know how to solve. if you have any ideas pleas let
me know.
thanks in advance

cappa

.



Relevant Pages

  • Re: Converting VB6.0 external dll function call to Visual C++ .NET
    ... > compiled Fortran program. ... > Long, ByRef tcr As Double, ByRef II As Long, ByRef XX As Double, ByRef ... > xres As Double, ByVal AA As String, ByVal aaSize As Integer, ByVal ... > which are huge arrays of characters, ...
    (comp.lang.cpp)
  • Help on use Module and Interface in Fortran 95
    ... I don't know very well Fortran 95, I would like to have some advise on ... Declare Sub TITI Lib "file.dll" (ByRef N As Long, ... subroutine SUB1) ... fixed size in the common block. ...
    (comp.lang.fortran)
  • Re: D3 odbc and .Net, almost there!
    ... that he was passing values ByVal instead of ByRef in his VB.NET code, ... The DLL itself follows well known standards ... as the parameters are correct it will work because the standards for calling ... there is no reason that code shouldn't work properly. ...
    (comp.databases.pick)
  • Re: Converting VB6 Structures to .NET
    ... This dll was written by a third party ... I will try ByRef. ... I am using a number of "Declare Function" statments to access the functions ... Public Structure zFuheader ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Byte Array aus C++ DLL in VB importieren
    ... In VB vielleicht explizit ByRef angeben - aber das müßte ... C++ DLL in VB zu importieren. ... // *cLampAdressSet is first Element of my VB Byte Array passed byRef ...
    (microsoft.public.de.vb)