Hi, I have a problem returning a BSTR from a C# COM client to my evc++ COM server. I have send an email to CFCOM, but they probably won't answer, they didn't answer to my previous mail. Maybe here somebody could help me out, I assume I am not the only CFCOM user ;-). This is the mail explaining my problem in more detail: In my project I have an event with an [in,out] BSTR parameter. When I set the parameter in my C# client using the OutParameter class, nothing is changed in my COM object. I have tried several things: - When I pass my [in,out] parameter as a "reference" variable, that doesn't seem to work. Is it possible that CFCOM can't work with variants of type VT_BYREF|* ? - When I pass my parameter as a "by value" variable, everything works in the direction from COM server to client. But my returned value, isn't correctly passed to my COM object. It isn't changed. This is a piece of my code: MIDL code: ------------- [id(1), helpstring("method Event")] HRESULT Event([in]BSTR name, [in,out]BSTR* pargs_result //<-- I have also tried BSTR pargs_result event handler code: ------------------- HRESULT Fire_Event(BSTR name, BSTR * pargs_result) { CComVariant varResult; T* pT = static_cast<T*>(this); int nConnectionIndex; CComVariant* pvars = new CComVariant[2]; int nConnections = m_vec.GetSize(); for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++) { pT->Lock(); CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex); pT->Unlock(); IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p); if (pDispatch != NULL) { VariantClear(&varResult); pvars[1] = name; pvars[0].vt = VT_BSTR; pvars[0].bstrVal = *pargs_result; DISPPARAMS disp = { pvars, NULL, 2, 0 }; pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL); // access returned value from event handler: BSTR resultString = SysAllocString(pvars[0].bstrVal); *pargs_result = resultString; } } delete[] pvars; return varResult.scode; } Could you say me what I am doing wrong? Thanks and kind regards Maarten