Problem with C function called from Visual Basic

Status
You're currently viewing only jerkins's posts. Click here to go back to viewing the entire thread.
Not open for further replies.
How can I have a c function inside of a DLL return a string that can be read and stored as the VB String type. This of course works with other c functions:

char * blah(void) {
return "test\0";
}

declaring this function in VB with:

Private Declare Function blah Lib "mydll.dll" () As String

Trying to use this function gives me bad memory errors and VB is terminated : ). Anyone know what I can do?
 
Status
You're currently viewing only jerkins's posts. Click here to go back to viewing the entire thread.
Not open for further replies.