I have I DLL written in C++.
In it is a function that returns a string. I want to call this function from VB6 but I am having some problems.
I have an api for VB .NET:
<DllImport("myDll.dll", CharSet:=CharSet.Unicode)> _
Public Shared Function GetText() As String
Note: the Unicode
and from the c++ .h file:
extern "C" LPTSTR __stdcall GetText();
I tried to declare it in Visual Basic 6.0
Public Declare Function GetText Lib "myDll.dll" () As Long
but can't manage to get the text from the Long (I am assuming this is a pointer to the string).
I may be wrong and the declare is off.