I write the BHO (using VC++ with ATL) for IE where I need to catch the IE events from Address Bar, History, Bookmarks. For example, if the user has typed URL in Address 开发者_如何学PythonBar, then BHO has to show me that URL was entered from Address Bar.
Is it possible?
Any ideas?
Something likes this:
STDMETHODIMP CBlogUrlSnaggerAddIn2::Exec(
const GUID *pguidCmdGroup, DWORD nCmdID,
DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut)
{
BSTR locationUrl;
BSTR locationName;
m_spWebBrowser->get_LocationURL(&locationUrl);
m_spWebBrowser->get_LocationName(&locationName);
MessageBox(NULL, locationUrl, locationName, 0);
::SysFreeString(locationUrl);
::SysFreeString(locationName);
return S_OK;
}
精彩评论