dll fortran for visual basic .net (little bit long data output) 
Author Message
 dll fortran for visual basic .net (little bit long data output)

hi,
i've a problem and i don't know how to solve it.
then i've an application in vba, that use a mathematic dll made in
fortran.
the declaration of the dll function is:
Declare Sub PERFORMANCE_EXCHANGER Lib "PerformancePuma.dll" (Temp As
Double, Nz As Double, CFL As Double _
, NITMA As Integer, Qaria As Double, Qfumi As Double, PRESARIA As
Double, PRESFUMI As Double _
, COMPFUMI As Double, TinAria As Double, TinFumi As Double, H As Double
_
, Drecuperatore As Double, DINTERASSETUBI As Double, De As Double,
STUBI As Double, Nt As Double, SSPORC As Double)

the call of the funciotn is:
Call PERFORMANCE_EXCHANGER(Temp(0, 0), Nz, CFL, NITMA, Qaria / 3600,
Qfumi / 3600, PRESARIA, PRESFUMI _
, COMPFUMI(1), TinAria, TinFumi, H, Drecuperatore, DINTERASSETUBI, De,
STUBI, Nt, SSPORC)

temp is an array (100,3) of double and compfumi(4) of double.

in VBA everything is ok.
but now i've to port this application in Visual Basic .net, i use this
declaration:
Public Class callfun
    <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)
        End Sub

the call is:
callfun.PERFORMANCE_EXCHANGER(Temp(0, 0), Nz, CFL, NITMA, (Qaria /
3600), (Qfumi / 3600), PRESARIA, PRESFUMI, COMPFUMI(1), TinAria,
TinFumi, H, Drecuperatore, DINTERASSETUBI, De, STUBI, Nt, SSPORC)
-----------------------------------------

i don't find any error (syntiax) and the application don't crash, but
the result is wrong i put some data:
from the vba (right data):
element(0*0):0
element(0*1):300
element(0*2):1500
element(0*3):1498,72601319783
element(1*0):0
element(1*1):309,82909879155
element(1*2):1499,98671566206
element(1*3):1499,72002904397
element(2*0):0
element(2*1):317,971794850372
element(2*2):1499,97351663517
element(2*3):1499,70854496939
.....
...
mento(2*1):317,971794850372
elemento(2*2):1499,97351663517
elemento(2*3):1499,70854496939
elemento(3*0):0
elemento(3*1):323,746126361383
elemento(3*2):1499,96037691023
elemento(3*3):1499,69660369661
elemento(4*0):0
elemento(4*1):327,230500306752
elemento(4*2):1499,94727219957
elemento(4*3):1499,68421539226
elemento(5*0):0
elemento(5*1):329,032026965114
elemento(5*2):1499,93418493178
elemento(5*3):1499,67149588745
elemento(6*0):0
elemento(6*1):329,839359377107
elemento(6*2):1499,92110479879
elemento(6*3):1499,65857902231
elemento(7*0):0
elemento(7*1):330,156845438336
elemento(7*2):1499,90802673688
elemento(7*3):1499,64556378324
elemento(8*0):0
elemento(8*1):330,267632903054
elemento(8*2):1499,89494861178
elemento(8*3):1499,63250614894
elemento(9*0):0
elemento(9*1):330,30219548647
elemento(9*2):1499,88186963668
elemento(9*3):1499,6194320608
elemento(10*0):0
elemento(10*1):330,31179915564
elemento(10*2):1499,8687895539
elemento(10*3):1499,60635175639
elemento(11*0):0
elemento(11*1):330,314054365418
elemento(11*2):1499,85570828747
elemento(11*3):1499,59326876417
elemento(12*0):0
elemento(12*1):330,314344665912
elemento(12*2):1499,84262581698
elemento(12*3):1499,58018416553
elemento(13*0):0
elemento(13*1):330,314154377178
elemento(13*2):1499,82954213735
elemento(13*3):1499,56709825912
elemento(14*0):0
elemento(14*1):330,313856476088
elemento(14*2):1499,81645724733
elemento(14*3):1499,55401112004
elemento(15*0):0
elemento(15*1):330,31353709848
elemento(15*2):1499,80337114656
elemento(15*3):1499,54092276555
elemento(16*0):0
elemento(16*1):330,313214654115
elemento(16*2):1499,79028383488
elemento(16*3):1499,52783319926
elemento(17*0):0
elemento(17*1):330,312892805884
elemento(17*2):1499,77719531216
elemento(17*3):1499,51474242179
elemento(18*0):0
elemento(18*1):330,312572235771
elemento(18*2):1499,76410557827
elemento(18*3):1499,50165043315
elemento(19*0):0
elemento(19*1):330,312253063269
elemento(19*2):1499,75101463309
elemento(19*3):1499,48855723324
elemento(20*0):0
elemento(20*1):330,311935308321
elemento(20*2):1499,7379224765
elemento(20*3):1499,47546282194
elemento(21*0):0
elemento(21*1):330,311618974279
elemento(21*2):1499,72482910837
elemento(21*3):1499,46236719913
elemento(22*0):0
elemento(22*1):330,311304061878
elemento(22*2):1499,71173452858
elemento(22*3):1499,44927036469
elemento(23*0):0
elemento(23*1):330,310990571467
elemento(23*2):1499,698638737
elemento(23*3):1499,43617231849
elemento(24*0):0
elemento(24*1):330,310678503338
elemento(24*2):1499,68554173351
elemento(24*3):1499,4230730604
elemento(25*0):0
elemento(25*1):330,310367857774
elemento(25*2):1499,67244351797
elemento(25*3):1499,40997259029
elemento(26*0):0
elemento(26*1):330,310058635058
elemento(26*2):1499,65934409026
elemento(26*3):1499,39687090804
elemento(27*0):0
elemento(27*1):330,309750835476
elemento(27*2):1499,64624345025
elemento(27*3):1499,38376801351
elemento(28*0):0
elemento(28*1):330,309444459308
elemento(28*2):1499,63314159781
elemento(28*3):1499,37066390659
elemento(29*0):0
elemento(29*1):330,309139506841
elemento(29*2):1499,62003853281
elemento(29*3):1499,35755858712
elemento(30*0):0
elemento(30*1):330,308835978358
elemento(30*2):1499,60693425512
elemento(30*3):1499,344452055
elemento(31*0):0
elemento(31*1):330,30853387414
elemento(31*2):1499,59382876461
elemento(31*3):1499,33134431008
elemento(32*0):0
elemento(32*1):330,308233194472
elemento(32*2):1499,58072206113
elemento(32*3):1499,31823535222
elemento(33*0):0
elemento(33*1):330,30793393964
elemento(33*2):1499,56761414457
elemento(33*3):1499,3051251813
elemento(34*0):0
elemento(34*1):330,307636109925
elemento(34*2):1499,55450501478
elemento(34*3):1499,29201379719
elemento(35*0):0
elemento(35*1):330,307339705612
elemento(35*2):1499,54139467162
elemento(35*3):1499,27890119973
elemento(36*0):0
elemento(36*1):330,307044726984
elemento(36*2):1499,52828311497
elemento(36*3):1499,26578738881
elemento(37*0):0
elemento(37*1):330,306751174328
elemento(37*2):1499,51517034468
elemento(37*3):1499,25267236428
elemento(38*0):0
elemento(38*1):330,306459047928
elemento(38*2):1499,50205636062
elemento(38*3):1499,239556126
elemento(39*0):0
elemento(39*1):330,306168348065
elemento(39*2):1499,48894116265
elemento(39*3):1499,22643867384
elemento(40*0):0
elemento(40*1):330,305879075026
elemento(40*2):1499,47582475062
elemento(40*3):1499,21332000766
elemento(41*0):0
elemento(41*1):330,305591229097
elemento(41*2):1499,46270712441
elemento(41*3):1499,20020012731
elemento(42*0):0
elemento(42*1):330,305304810558
elemento(42*2):1499,44958828386
elemento(42*3):1499,18707903265
elemento(43*0):0
elemento(43*1):330,305019819699
elemento(43*2):1499,43646822883
elemento(43*3):1499,17395672354
elemento(44*0):0
elemento(44*1):330,304736256801
elemento(44*2):1499,42334695918
elemento(44*3):1499,16083319985
elemento(45*0):0
elemento(45*1):330,304454122151
elemento(45*2):1499,41022447478
elemento(45*3):1499,14770846142
elemento(46*0):0
elemento(46*1):330,304173416032
elemento(46*2):1499,39710077546
elemento(46*3):1499,13458250811
elemento(47*0):0
elemento(47*1):330,30389413873
elemento(47*2):1499,3839758611
elemento(47*3):1499,12145533977
elemento(48*0):0
elemento(48*1):330,303616290531
elemento(48*2):1499,37084973153
elemento(48*3):1499,10832695627
elemento(49*0):0
elemento(49*1):330,303339871717
elemento(49*2):1499,35772238662
elemento(49*3):1499,09519735744
elemento(50*0):0
elemento(50*1):330,303064882578
elemento(50*2):1499,34459382622
elemento(50*3):1499,08206654315
elemento(51*0):0
elemento(51*1):330,302791323398
elemento(51*2):1499,33146405017
elemento(51*3):1499,06893451325
elemento(52*0):0
elemento(52*1):330,30251919446
elemento(52*2):1499,31833305833
elemento(52*3):1499,05580126758
elemento(53*0):0
elemento(53*1):330,302248496051
elemento(53*2):1499,30520085055
elemento(53*3):1499,042666806
elemento(54*0):0
elemento(54*1):330,301979228458
elemento(54*2):1499,29206742668
elemento(54*3):1499,02953112835
elemento(55*0):0
elemento(55*1):330,301711391964
elemento(55*2):1499,27893278656
elemento(55*3):1499,01639423448
elemento(56*0):0
elemento(56*1):330,301444986858
elemento(56*2):1499,26579693004
elemento(56*3):1499,00325612425
elemento(57*0):0
elemento(57*1):330,301180013421
elemento(57*2):1499,25265985696
elemento(57*3):1498,99011679748
elemento(58*0):0
elemento(58*1):330,300916471946
elemento(58*2):1499,23952156718
elemento(58*3):1498,97697625404
elemento(59*0):0
elemento(59*1):330,300654362713
elemento(59*2):1499,22638206054
elemento(59*3):1498,96383449376
elemento(60*0):0
elemento(60*1):330,300393686012
elemento(60*2):1499,21324133688
elemento(60*3):1498,95069151649
elemento(61*0):0
elemento(61*1):330,300134442126
elemento(61*2):1499,20009939604
elemento(61*3):1498,93754732207
elemento(62*0):0
elemento(62*1):330,299876631344
elemento(62*2):1499,18695623786
elemento(62*3):1498,92440191035
elemento(63*0):0
elemento(63*1):330,299620253951
elemento(63*2):1499,17381186219
elemento(63*3):1498,91125528115
elemento(64*0):0
elemento(64*1):330,299365310235
elemento(64*2):1499,16066626887
elemento(64*3):1498,89810743434
elemento(65*0):0
elemento(65*1):330,299111800483
elemento(65*2):1499,14751945773
elemento(65*3):1498,88495836973
elemento(66*0):0
elemento(66*1):330,298859724979
elemento(66*2):1499,13437142861
elemento(66*3):1498,87180808718
elemento(67*0):0
elemento(67*1):330,298609084011
elemento(67*2):1499,12122218136
elemento(67*3):1498,85865658651
elemento(68*0):0
elemento(68*1):330,298359877866
elemento(68*2):1499,1080717158
elemento(68*3):1498,84550386757
elemento(69*0):0
elemento(69*1):330,298112106831
elemento(69*2):1499,09492003178
...

read more »



Sat, 16 Aug 2008 13:43:14 GMT  
 dll fortran for visual basic .net (little bit long data output)
Hello, Cappa,

I couldn't understand the data output, but I think that in VBA "Integer"
means a 2-byte integer.  In .Net "Integer" is four bytes.  Try changing
the .Net "Integer" declarations to "Int16".  (If possible, check the
size of the arguments that the Fortran function is expecting to confirm
that the sizes are correct.)

Cheers,
Randy

Quote:

> hi,
> i've a problem and i don't know how to solve it.
> then i've an application in vba, that use a mathematic dll made in
> fortran.
> the declaration of the dll function is:
> Declare Sub PERFORMANCE_EXCHANGER Lib "PerformancePuma.dll" (Temp As
> Double, Nz As Double, CFL As Double _
> , NITMA As Integer, Qaria As Double, Qfumi As Double, PRESARIA As
> Double, PRESFUMI As Double _
> , COMPFUMI As Double, TinAria As Double, TinFumi As Double, H As Double
> _
> , Drecuperatore As Double, DINTERASSETUBI As Double, De As Double,
> STUBI As Double, Nt As Double, SSPORC As Double)

> the call of the funciotn is:
> Call PERFORMANCE_EXCHANGER(Temp(0, 0), Nz, CFL, NITMA, Qaria / 3600,
> Qfumi / 3600, PRESARIA, PRESFUMI _
> , COMPFUMI(1), TinAria, TinFumi, H, Drecuperatore, DINTERASSETUBI, De,
> STUBI, Nt, SSPORC)

> temp is an array (100,3) of double and compfumi(4) of double.

> in vba everything is ok.
> but now i've to port this application in visual basic .net, i use this
> declaration:
> Public Class callfun
>     <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)
>         End Sub

> the call is:
> callfun.PERFORMANCE_EXCHANGER(Temp(0, 0), Nz, CFL, NITMA, (Qaria /
> 3600), (Qfumi / 3600), PRESARIA, PRESFUMI, COMPFUMI(1), TinAria,
> TinFumi, H, Drecuperatore, DINTERASSETUBI, De, STUBI, Nt, SSPORC)
> -----------------------------------------

> i don't find any error (syntiax) and the application don't crash, but
> the result is wrong i put some data:
> from the vba (right data):
> element(0*0):0
> element(0*1):300
> element(0*2):1500
> element(0*3):1498,72601319783
> element(1*0):0
> element(1*1):309,82909879155
> element(1*2):1499,98671566206
> ...



Sat, 16 Aug 2008 17:05:56 GMT  
 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



Sat, 16 Aug 2008 19:25:46 GMT  
 dll fortran for visual basic .net (little bit long data output)
cappa:
Change ByRef NITMA As Integer
to ByRef NITMA As Long and it should work

michael



Sun, 17 Aug 2008 09:05:19 GMT  
 dll fortran for visual basic .net (little bit long data output)
Hello, Cappa,

Yes.  I think you are right.  The array will be your problem.

In your declaration, you need to do this:

     <DllImport("DLL1.dll", SetLastError:=True, _
     CharSet:=CharSet.Unicode, ExactSpelling:=True, _
     CallingConvention:=CallingConvention.StdCall)> _
     Public Shared Sub PERFORMANCE_EXCHANGER( _
         <MarshalAs(UnmanagedType.LPArray, SizeConst:=404)> _
         ByVal Temp(,) As Double, ByRef Nz As Double, _
         ByRef CFL As Double, ...

Note:
     - the addition of "MarshalAs..."
     - the addition of "(,)" to Temp
     - the change from ByRef to ByVal.

Don't worry about the ByVal declaration.  You can still return your
results by updating the array in Fortran.  (You just can't replace the
array itself.)

But also, it's important to note that VB and Fortran have different
opinions about the interpretation of subscripts.  That is, the rows and
columns of the array are reversed from VB's perspective.

By the way...  I wonder about (worry about) why you are passing the
array size as a Double instead of an Integer.

Here is a very short program that I created from your declarations as a
demo.  (I dropped most of your arguments for simplicity of the demo.
Also, if you are trying to use this directly, you'll need to adjust the
hard-coded file names to suit your situation.)

The Fortran side looks like this:
!=============================================================
Subroutine PERFORMANCE_EXCHANGER(TEMP,DNZ,CFL,NITMA,DQARIA)

         !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)
!!!    DIMENSION TEMP(0:3,0:(DNZ/4)-1)

     Open( Unit=1, &
           File='J:\Test\FortranDLL\Dump.txt', &
           IOStat=intStat )
     Write(1,*) DNZ
     Do intRow = 0, DNZ
         Write(1,'(1X,I4,2X,4(F8.1))') intRow, &
              (TEMP(intRow,intCol),intCol=0,3)
     End Do

     TEMP(2,2) = 555.555
     Return

End Subroutine PERFORMANCE_EXCHANGER
!=============================================================

The VB side is just a simple Windows Form with a single Button
(Button1).  I've omitted the Forms Designer code for brevity.  The
remainder looks like this:

'=============================================================
Option Strict On

Imports System.Runtime.InteropServices

Public Class Form1
     Inherits System.Windows.Forms.Form

     <DllImport("DLL1.dll", SetLastError:=True, _
     CharSet:=CharSet.Unicode, ExactSpelling:=True, _
     CallingConvention:=CallingConvention.StdCall)> _
     Public Shared Sub PERFORMANCE_EXCHANGER( _
         <MarshalAs(UnmanagedType.LPArray, SizeConst:=404)> _
         ByVal Temp(,) As Double, ByRef Nz As Double, _
         ByRef CFL As Double, ByRef NITMA As Integer, _
         ByRef Qaria As Double)
     End Sub

#Region " Windows Form Designer generated code "
...
#End Region

     Private Sub Button1_Click(ByVal sender As System.Object, _
                               ByVal e As System.EventArgs) _
                               Handles Button1.Click

         Dim dblArray(3, 100) As Double
         Dim dblSize As Double = 100
         Dim dblCFL As Double = 123.456
         Dim intNITMA As Integer = 987654
         Dim dblQaria As Double = 654.321

         For intRow As Integer = 0 To 100
             For intCol As Integer = 0 To 3
                 dblArray(intCol, intRow) = intRow + intCol / 10
             Next intCol
         Next intRow

         PERFORMANCE_EXCHANGER(dblArray, dblSize, dblCFL, _
                               intNITMA, dblQaria)

         MsgBox("Result = " & dblArray(2, 2))

     End Sub
End Class
'=============================================================

The output from the Fortran looks like:

    100.000000000000
     0       0.0     0.1     0.2     0.3
     1       1.0     1.1     1.2     1.3
     2       2.0     2.1     2.2     2.3
     3       3.0     3.1     3.2     3.3
...

And the VB message box displays "Result = 555.55499...".

Hope this helps.

Cheers,
Randy

Quote:

> 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



Sun, 17 Aug 2008 18:40:18 GMT  
 dll fortran for visual basic .net (little bit long data output)
hi randy,

thanks a
lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
for your aid and your code!
with your input i was able to sole my problem.



Sat, 30 Aug 2008 18:10:13 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Creating - Fortran 77 dll for use in Visual Basic 6.0 (not using Compaq Visual Fortran)

2. compag visual fortran dll callable from visual basic 6

3. The suitable LabVIEW data type correspinding to the array of structure in Visual Basic ActiveX DLL

4. HELP : Visual Basic calling FORTRAN DLL

5. HELP : visual basic calling fortran DLL

6. Calling Fortran DLL in VIsual Basic 6.0

7. Fortran DLL and Visual Basic

8. Calling fortran dll from visual basic

9. Fortran DLL for Visual Basic

10. Visual Basic cannot find Fortran DLL CVF 6.5

11. Setting up a MS Fortran .DLL/calling from Visual Basic

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

 

 
Powered by phpBB® Forum Software