Works now
Private Declare PtrSafe Function GetVersion Lib "D:\Daten\Purebasic5\Ablage\ReturnStringTest.dll" () As String
Private Declare PtrSafe Function GetVersionVariant Lib "D:\Daten\Purebasic5\Ablage\ReturnStringTest.dll" (ByRef Version As Variant) As Long
Private Declare PtrSafe Function GetVersionsInfo Lib "D:\Daten\Purebasic5\Ablage\ReturnStringTest.dll" (ByRef Info As Variant) As Long
Sub Schaltfläche1_Klicken()
Dim text As Variant
Call GetVersionVariant(text)
MsgBox text
End Sub
Sub Schaltfläche2_Klicken()
Dim Info As Variant
Dim text
text = ""
If GetVersionsInfo(Info) Then
If IsArray(Info) Then
For i = LBound(Info) To UBound(Info)
text = text & "" & i & ": " & Info(i) & vbNewLine
Next
Else
text = "Info is not an array"
End If
Else
text = "DLL can´t allocate SafeArray"
End If
MsgBox text
End Sub