Article ID: 197957
Article Last Modified on 3/21/2005
Method Name: ByRefMethod
Parameters : [out]BSTR* bstrVal
STDMETHODIMP CByRefObj::ByRefMethod( BSTR* bstrVal )
{
CComBSTR bstrRtnVal = L"This variable is passed by Reference";
*bstrVal = bstrRtnVal.Detach();
return S_OK;
}
<%
Dim objTest, strByRefVal
Set objTest = Server.CreateObject("ByRefProj.ByRefObj")
objTest.ByRefMethod strByRefVal
%>
[id(1), helpstring("method ByRefMethod")] HRESULT ByRefMethod([out] VARIANT* vVal);
// Where m_bstr is a BSTR member of SomeComObject. vVal->vt = VT_BSTR; vVal->bstrVal = m_bstr.Copy();
244012 INFO: Type Mismatch Errors When You Pass Parameters from ASP to a Visual Basic Component
Keywords: kberrmsg kbcodesnippet kbprb KB197957