flamandier
Programmer
Hi,
I face in my application serious size problems.
I tried to isolate the problem, but I still don't get the explanation.
Here is the VB6 part :
----------------------
Type TY_VB6_Doubles
double1 As Double
End Type
Type TY_VB6_Test
testdoubles() As TYDoubles
End Type
Public Declare Sub performcalc Lib "calc.dll" (tyvb6test as TY_VB6_Test)
Subroutine DOCalc()
Dim tyvb6test as TY_VB6_Test
..
redim tyvb6test.testdoubles(1 TO 2800)
performcalc tyvb6test
...
end sub
Here is the FORTRAN part:
------------------------
Type TY_For_Doubles
Real*8 double1
End Type
Type Ty_For_Test
Type(TY_For_Doubles) testdoubles(2800)
End Type
Subroutine performcalc (inputvar)
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL :: performcalc
!DEC$ ATTRIBUTES REFERENCE :: inputvar
Include '.\DataModel.typ'
Record /Ty_For_Test/ inputvar
Record /Ty_For_Test/ AnotherVar
.....
inputvar= AnotherVar
.....
end
Problem:
-------
I get an access violation (0X0000005) in VB thread on the line "inputvar = AnotherVar"
It means the copy was no successful.
But if I decrease 2800 to 2700, it works......
Is there any size restriction on input parameters to a Fortran DLL that I miss there ?
thanks
I face in my application serious size problems.
I tried to isolate the problem, but I still don't get the explanation.
Here is the VB6 part :
----------------------
Type TY_VB6_Doubles
double1 As Double
End Type
Type TY_VB6_Test
testdoubles() As TYDoubles
End Type
Public Declare Sub performcalc Lib "calc.dll" (tyvb6test as TY_VB6_Test)
Subroutine DOCalc()
Dim tyvb6test as TY_VB6_Test
..
redim tyvb6test.testdoubles(1 TO 2800)
performcalc tyvb6test
...
end sub
Here is the FORTRAN part:
------------------------
Type TY_For_Doubles
Real*8 double1
End Type
Type Ty_For_Test
Type(TY_For_Doubles) testdoubles(2800)
End Type
Subroutine performcalc (inputvar)
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL :: performcalc
!DEC$ ATTRIBUTES REFERENCE :: inputvar
Include '.\DataModel.typ'
Record /Ty_For_Test/ inputvar
Record /Ty_For_Test/ AnotherVar
.....
inputvar= AnotherVar
.....
end
Problem:
-------
I get an access violation (0X0000005) in VB thread on the line "inputvar = AnotherVar"
It means the copy was no successful.
But if I decrease 2800 to 2700, it works......
Is there any size restriction on input parameters to a Fortran DLL that I miss there ?
thanks