Hi,
My problem is getting a string of variable length from a unmanaged DLL,
called by a managed DLL using IJW. In der legacy DLL is declared
bool UnmanagerClass::GetData(std::wstring* pString)
{
// content of pString as input by the caller is received correct
*pString = L"the string to return";
// content of (*pString) is currupted
}
The managed DLL calls into the legacy DLL using IJW:
// managed.dll
UnmanagerClass m_Unmanaged;
std:wstring String = L"Input";
m_Unmanaged.GetData(&String);
// now String is empty
It makes no difference if the tringparameter is handed over as pointer or
reference.
Is it not possible to use std:wstring as in-out parameter in a IJW-call ?
Is there another solution to this problem, may be using CString from MFC?
Thanks very much for any reply.
Fritz