I want to receive string from COM component.

<IDL>
HRESULT Test([out, string] BSTR* abc);

<Test Server>
HRESULT Test(/*out, string*/ BSTR* abc)
{
_bstr_t bstrResult(abc, false);
bstrResult = L"This is a test";
abc = (BSTR)bstrResult;
return S_OK;
}

<Test Client : VB>
Dim obj as new WebCom
Dim s as String

obj.Test s

---------------

But, this code occurs error (in MTS).
How COM server pass BSTR string to client?


A programmer who loves Goethe.