Howto return a String from c++ to vb
Hi,
I've tryed to return a string from my own made dll to visual basic but i'm unsuccesful doing this.
Does anybody know how to do this?
This is my code(this does'nt work!)
void DBSOCK_API test(LPSTR returnStr){
char buffer[]="1234 testing";
strcpy(returnStr,buffer);
}
and in visual basic:
Declare Sub test Lib "dbSock" (ByVal st As String)
Private Sub Command1_Click()
Dim myString
test (myString)
MsgBox myString
End Sub
The message box displayed nothing
Does anybody know what I'm doing wrong :confused:
note that I'm using Microsoft eMbedded Visual Tools.