0

IViewObjectPresentSite is part of MSHTML(IE9?) according to http://msdn.microsoft.com/en-us/library/jj206442(v=vs.85).aspx. I am trying to run QueryInterface for IID_IViewObjectPresentSite on webBrowser2 object (received by querying IID_IWebBrowser2) but it returns fails. I tried to query the same on htmlDoc2 object (received by querying IID_IHTMLDocument2) which also fails. I can successfully query for IID_IViewObject on both of these object and get IViewObject back.

Can someone show me how to get IID_IViewObjectPresentSite on the browser or document? I am using the latest Windows 8 SDK and VS2010 and running on Windows 8.

Thanks in advance.

vinkaga
  • 83
  • 1
  • 6

1 Answers1

0

I was able to get it from an ActiveX code, in the implementation of the function SetClientSite.
Something like:

SetClientSite( IOleClientSite *pClientSite ) {  
  CComQIPtr<IViewObjectPresentSite, &IID_IViewObjectPresentSite> spIViewObjectPresentSite;  
  HRESULT hr;  
  hr = pClientSite->QueryInterface(IID_IViewObjectPresentSite, (void **) &spIViewObjectPresentSite);  
} 
Gil
  • 395
  • 4
  • 19