Click to See Complete Forum and Search --> : passing allocated string from a DLL to an application.


April 9th, 1999, 07:22 AM
I have a function in my DLL that takes two arguments: a null terminated string and the length of this null-terminated string. If the length of the
string is zero then i allocate memory for this null-terminated string and copy to it some information. The problem that i face is that each time
i allocate memory from the DLL, copy to it and pass it back to the application then the string from the application side contains rubbish.