sending a string to a DLL I made a function in the DLL:
FUNCTION ReverseString ALIAS "ReverseString" (BYVAL X AS STRING) EXPORT AS STRING
MSGBOX X
A$ = X
MSGBOX A$
S$ = STRREVERSE$(X)
FUNCTION = S$ + " test dll"
END FUNCTION
the first message box shows the string the second shows blanks and the only thing that comes back from the function is " test dll"
the declare in VB.NET is:
<DllImport("TESTDLL.DLL")> _
Public Shared Function ReverseString(ByVal X As String) As String
End Function
Does anyone have an answer in passing a string to a native DLL?
Thanks
FUNCTION ReverseString ALIAS "ReverseString" (BYVAL X AS STRING) EXPORT AS STRING
MSGBOX X
A$ = X
MSGBOX A$
S$ = STRREVERSE$(X)
FUNCTION = S$ + " test dll"
END FUNCTION
the first message box shows the string the second shows blanks and the only thing that comes back from the function is " test dll"
the declare in VB.NET is:
<DllImport("TESTDLL.DLL")> _
Public Shared Function ReverseString(ByVal X As String) As String
End Function
Does anyone have an answer in passing a string to a native DLL?
Thanks
Comment