M
Michael Tissington
I have a C++ function in a DLL of the form
BSTR WINAPI DoSomeWork(LPCSTR szConnection, LPCSTR szGUID)
I use SysAllocStringByteLen to return a BSTR.
For the most part this works accept when the calling applicaiton tries to
free the BSTR and I get a RtlFreeHeep error. I'm guessing because the bstr
has been allocated in one dll and it being released in another.
So how do I allocate the bstr that I'm returning ?
BSTR WINAPI DoSomeWork(LPCSTR szConnection, LPCSTR szGUID)
I use SysAllocStringByteLen to return a BSTR.
For the most part this works accept when the calling applicaiton tries to
free the BSTR and I get a RtlFreeHeep error. I'm guessing because the bstr
has been allocated in one dll and it being released in another.
So how do I allocate the bstr that I'm returning ?