STDMETHODIMP COffCntrDispCtrl::XMyOleObject::SetHostNames(LPCOLESTR
pwApp, LPCOLESTR pwObj)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
// Convert OLESTR into ASCII string.
WideCharToMultiByte(CP_ACP, 0, pwObj, -1, pThis->m_szDocName,
512, NULL, NULL);
// Get IDispatch.
pThis->GetDocDispatch();
// Test it out by getting the document name.
pThis->TestDispatch();
return S_OK;
}
STDMETHODIMP
COffCntrDispCtrl::XMyOleObject::SetClientSite(LPOLECLIENTSITE
pClientSite)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.SetClientSite(pClientSite);
}
STDMETHODIMP
COffCntrDispCtrl::XMyOleObject::SetColorScheme(LPLOGPALETTE plp)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.SetColorScheme(plp);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::GetMiscStatus(DWORD
dwAspect, DWORD* pdwStatus)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetMiscStatus(dwAspect, pdwStatus);
}
STDMETHODIMP
COffCntrDispCtrl::XMyOleObject::EnumAdvise(LPENUMSTATDATA*
ppenumAdvise)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.EnumAdvise(ppenumAdvise);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::Unadvise(DWORD
dwConnection)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.Unadvise(dwConnection);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::Advise(LPADVISESINK
pAdvSink, DWORD* pdwConnection)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.Advise(pAdvSink, pdwConnection);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::GetExtent(DWORD
dwDrawAspect, LPSIZEL lpsizel)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetExtent(dwDrawAspect, lpsizel);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::SetExtent(DWORD
dwDrawAspect, LPSIZEL lpsizel)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.SetExtent(dwDrawAspect, lpsizel);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::GetUserType(DWORD
dwFormOfType, LPOLESTR* ppszUserType)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetUserType(dwFormOfType,
ppszUserType);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::GetUserClassID(CLSID*
pClsid)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetUserClassID(pClsid);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::IsUpToDate()
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.IsUpToDate();
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::Update()
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.Update();
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::EnumVerbs(LPENUMOLEVERB*
ppenumOleVerb)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.EnumVerbs(ppenumOleVerb);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::DoVerb(LONG iVerb, LPMSG
lpmsg, LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent,
LPCRECT lprcPosRect)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.DoVerb(iVerb, lpmsg, pActiveSite,
lindex, hwndParent, lprcPosRect);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::GetClipboardData(DWORD
dwReserved, LPDATAOBJECT *ppDataObject)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetClipboardData(dwReserved,
ppDataObject);
}
STDMETHODIMP
COffCntrDispCtrl::XMyOleObject::InitFromData(LPDATAOBJECT
pDataObject, BOOL fCreation, DWORD dwReserved)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.InitFromData(pDataObject, fCreation,
dwReserved);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::GetMoniker(DWORD
dwAssign, DWORD dwWhichMoniker, LPMONIKER *ppmk)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetMoniker(dwAssign, dwWhichMoniker,
ppmk);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::SetMoniker(DWORD
dwWhichMoniker, LPMONIKER pmk)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.SetMoniker(dwWhichMoniker, pmk);
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::Close(DWORD
dwSaveOption)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.Close(dwSaveOption);
}
STDMETHODIMP
COffCntrDispCtrl::XMyOleObject::GetClientSite(LPOLECLIENTSITE*
ppClientSite)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.GetClientSite(ppClientSite);
}
STDMETHODIMP_(ULONG) COffCntrDispCtrl::XMyOleObject::Release()
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.Release();
}
STDMETHODIMP_(ULONG) COffCntrDispCtrl::XMyOleObject::AddRef()
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.AddRef();
}
STDMETHODIMP COffCntrDispCtrl::XMyOleObject::QueryInterface(REFIID
iid, LPVOID* ppvObj)
{
METHOD_MANAGE_STATE(COffCntrDispCtrl, MyOleObject)
ASSERT_VALID(pThis);
return pThis->m_xOleObject.QueryInterface(iid, ppvObj);
}