Hi, I've one dll that was made in Fortran. This dll contains the diynamic model of a Sailboat (in fact is a VPP -Velocity Prediction Program-)
In general, the inputs of the dll are 2 integers and 20 floats, as follows: (the name of the dll's function is "DLL_SIMULATEUR")
DLL_SIMULATEUR(int int, float, float ..., float)
the expected answer of the simulator is the same 22 variables in time + delta time.
I can use easily the dll in VB6 as follows:
--- function declaration ---
Private Declare Sub DLL_SIMULATEUR Lib "C:\vpp53.dll" (CodeError As Integer, n As Integer, t As Double, dt As Double, TWS As Double, TWA As Double, ec As Double, Ang As Double, _
X As Double, Y As Double, z As Double, psi As Double, teta As Double, phi As Double, _
Vx As Double, Vy As Double, vz As Double, omx As Double, omy As Double, omz As Double, Course As Double, Cap_Compass As Double, Leeway As Double, MomentSafran As Double)
--- call to dll ---
Call DLL_SIMULATEUR(CodeErreur, n, t, dt, TWS, TWA, ec, Ang, X, Y, z, psi, teta, phi, Vx, Vy, vz, omx, omy, omz, Course, Cap_Compass, Leeway, MomentSafran)
and the updated values are saved in the same variables,
for example, t <<time>>, if I send t=1, then after call the dll, t is going to be 2.
Another case. If I use it in matlab, the .h file is as follows: