C
Charles Law
Hi guys
There's nothing much going on in Interop at the moment, so I'll post this
here as well in case someone can give me a quick answer.
The following is an extract from MSDN:
<extract>
*** Setting the Ambient User Mode on the WebBrowser Object ***
To set the ambient user mode on the WebBrowser object, first QI the
IWebBrowser2 interface for the IOleControl interface and then call
IOleControl::OnAmbientPropertyChange, passing DISPID_AMBIENT_USERMODE as the
argument.
m_pIWebBrowser2->QueryInterface( IID_IOleControl, (void**)&pIOleCtrl );
pIOleCtrl->OnAmbientPropertyChange( DISPID_AMBIENT_USERMODE );
This causes MSHTML to call IDispatch::Invoke on the host application,
passing along the same DISPID. Of course, for this to work, the host
application has to handle the DISPID_AMBIENT_USERMODE case in its
IDispatch::Invoke implementation, returning VARIANT_TRUE in the pvarResult
parameter to activate the editor or VARIANT_FALSE to deactivate it.
</extract>
My question is, how can my (VB.NET) application implement IDispatch::Invoke
in order to test for the DISPID and return the correct value?
TIA
Charles
There's nothing much going on in Interop at the moment, so I'll post this
here as well in case someone can give me a quick answer.
The following is an extract from MSDN:
<extract>
*** Setting the Ambient User Mode on the WebBrowser Object ***
To set the ambient user mode on the WebBrowser object, first QI the
IWebBrowser2 interface for the IOleControl interface and then call
IOleControl::OnAmbientPropertyChange, passing DISPID_AMBIENT_USERMODE as the
argument.
m_pIWebBrowser2->QueryInterface( IID_IOleControl, (void**)&pIOleCtrl );
pIOleCtrl->OnAmbientPropertyChange( DISPID_AMBIENT_USERMODE );
This causes MSHTML to call IDispatch::Invoke on the host application,
passing along the same DISPID. Of course, for this to work, the host
application has to handle the DISPID_AMBIENT_USERMODE case in its
IDispatch::Invoke implementation, returning VARIANT_TRUE in the pvarResult
parameter to activate the editor or VARIANT_FALSE to deactivate it.
</extract>
My question is, how can my (VB.NET) application implement IDispatch::Invoke
in order to test for the DISPID and return the correct value?
TIA
Charles