Yes, I forgot the declare stuff...
Private Declare Sub PSDcalc_for Lib "PSDcalc_for.dll" (ByVal fileNam As String, ByRef x_array As Single, _
ByRef spectrum As Single, nptsZ As Integer, npointsZ As Integer, _
t_startZ As Single, t_finalZ As Single, zeroFillZ As Single, sig2Z As Single, _
nPoles As Integer, nZeros As Integer, M_eqs As Integer, M_lags As Integer, _
Mode As Integer, L_pts As Integer, ByVal str_len As Long)
ooo
Public Sub exitProgram()
ooo
' no longer have this code ... Call EndProcess("PSDcalc_for.dll")
If EndDLL("PSDcalc_for.dll") Then MsgBox "It worked!"
A problem is in the EndDLL("PSDcalc_for.dll") stmt. EndDLL argument should be EndDLL(DllReturnValue As Long) ... that's a problem for sure. What should be passed to EndDLL ... DllReturnValue As Long?
Other things that i do not understand fully yet:
If EndDLL("PSDcalc_for.dll") Then MsgBox "It worked!"
Translated in my world this would mean: If "something is TRUE" then "show Text"
BUT "EndDLL" is defined Public Function EndDLL(DllReturnValue As Long) As Boolean
wich contain hInst = DllReturnValue
Heres my problem:
You call EndDLL with a "String" but EndDLL wants "Long" as input.... VB or your Text is very confusing me :)
And yeah, comment that "EndDLL" out of Exit-Code.