I have a C# Class Library which is COM visible and being called from a Visual Studio 6 application. One of the methods needs to return a string. I have tried this two ways:
public void GetString(out string sText)
{
sText = MemberStringVariable;
}
When I call the above from VC6 I get an exception thrown.
public string GetString()
{
return MemberStringVariable;
}
When I call the above (taking a BSTR* as parameter) I get a NULL pointer back.
What is the proper way of doing this?