Click to See Complete Forum and Search --> : Passing string to dll


jinnu
November 13th, 1999, 01:01 AM
I'm passing some strings to a 'C' dll (which is written by myself) that expects char* argument . it's passed as 'byval string' argument. The data to be passed is not of fixed length so the string is not fixed length. but in this process sometimes it's not passed properly and the data is a garbage.
What can be other way to pass this string properly.

Sigal Laniado
November 14th, 1999, 12:40 AM
In your C++ code use BSTR instead of char*