Re: dll fortran for visual basic .net (little bit long data output)
- From: "cappa" <cappasette@xxxxxxxxxxx>
- Date: 28 Feb 2006 03:25:46 -0800
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
.
- References:
- Prev by Date: Re: Standards conforming or not?
- Next by Date: Re: Python for Fortran programmers
- Previous by thread: Re: dll fortran for visual basic .net (little bit long data output)
- Index(es):
Relevant Pages
|
|