L
lencastro
i am creating a addin for outlook express in vc++2005
I am trying to load xml to my code with the following code
STDMETHOD(GetCustomUI)(BSTR RibbonID, BSTR * RibbonXml)
{
Assembly^ assem=Assembly::GetExecutingAssembly();
Stream^ strm=
assem->GetManifestResourceStream("test.Xmlres.test.xml");
StreamReader^ reader= gcnew StreamReader(strm);
*RibbonXml= reader->ReadToEnd();
reader->Close();
strm->Close();
return S_OK;
}
but it showing an error in compile time:
error C2440: '=' : cannot convert from 'System::String ^' to 'BSTR'
No user-defined-conversion operator available, or
Cannot convert a managed type to an unmanaged type
I am trying to load xml to my code with the following code
STDMETHOD(GetCustomUI)(BSTR RibbonID, BSTR * RibbonXml)
{
Assembly^ assem=Assembly::GetExecutingAssembly();
Stream^ strm=
assem->GetManifestResourceStream("test.Xmlres.test.xml");
StreamReader^ reader= gcnew StreamReader(strm);
*RibbonXml= reader->ReadToEnd();
reader->Close();
strm->Close();
return S_OK;
}
but it showing an error in compile time:
error C2440: '=' : cannot convert from 'System::String ^' to 'BSTR'
No user-defined-conversion operator available, or
Cannot convert a managed type to an unmanaged type