Software Archive
Read-only legacy content
17060 Discussions

call DLL with IMSL too many time causing crashing

Intel_C_Intel
Employee
364 Views
Hi,
I am trying to call DLL file, which includes IMSL, from Visual Basic to perform a simulation.
However, when I call this DLL too many times, the whole program crashes(disappear). Is this a memory leak problem? What can I do? Any suggestions will be welcome. Thanks in advance.

1.Fortran codes: test.f90
subroutine betarnd(y,a,b,m)
use numerical_libraries
!DEC$ ATTRIBUTES DLLEXPORT, ALIAS : "betarnd" :: betarnd
double precision :: y(m),a,b
call drnbet(m,a,b,y)
return
end subroutine betarnd

2. DF /dll test.f90
3. VB codes
Declare Sub betarnd Lib "test.dll" (ByRef Y As Double, a As Double, b As Double, m As Long)

cayugafisher
0 Kudos
0 Replies
Reply