16,548
社区成员




HKLM
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove 'Internet Explorer'
{
NoRemove Extensions
{
ForceRemove '{8C9C21C7-E5D5-4ea6-8D6C-8FE497E2834A}'
{
val ButtonText = s 'Hello'
val Icon = s 'D:\wsc\test2\Ads.ico'
val CLSID = s '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}'
val ClsidExtension = s '{2F095967-7244-4BAC-9CF0-73502D391677}' (这个是CA对应的GUID)
val 'Default Visible' = s 'yes'
}
ForceRemove '{772F5D87-42F9-43fd-B64A-9E15C5DA7A5F}'
{
val ButtonText = s 'World'
val Icon = s 'D:\wsc\test2\General.ico'
val CLSID = s '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}'
val ClsidExtension = s '{7DC38DC9-FFFC-490E-837F-545094223E5F}' (这个是CB对应的GUID)
val 'Default Visible' = s 'yes'
}
}
}
}
}
}
HKLM
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove 'Internet Explorer'
{
NoRemove Extensions
{
ForceRemove '{B2D3F85C-C35C-4ca8-8BC7-CFEE63D6217A}'
{
val ButtonText = s 'A'
val Icon = s 'D:\wsc\test\Filter\Gladder.ico'
val CLSID = s '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}'
val ClsidExtension = s '{B62F9ED3-FE9F-486E-89D1-C26FEB3C237F}'
val 'Default Visible' = s 'yes'
}
ForceRemove '{A0688E82-C7F9-44fc-89A3-7C93D58C30AB}'
{
val ButtonText = s 'B'
val Icon = s 'D:\wsc\test\Filter\Ads.ico'
val CLSID = s '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}'
val ClsidExtension = s '{B62F9ED3-FE9F-486E-89D1-C26FEB3C237F}'
val 'Default Visible' = s 'yes'
}
}
}
}
}
}
HRESULT hr = S_OK;
if (pguidCmdGroup == NULL)
{
switch (nCmdID)
{
case 0:
{
MessageBox(NULL,_T("one button"),_T("IE Button"),MB_OK); // 不论单击A或B按钮, 都会执行此句
break;
}
default:
{
MessageBox(NULL,_T("other"),_T("IE Button"),MB_OK);
hr = OLECMDERR_E_NOTSUPPORTED;
break;
}
}
}
else
{
hr = OLECMDERR_E_UNKNOWNGROUP;
}
return hr;
COM Objects
In order to invoke a Component Object Model (COM) object from Internet Explorer, it must implement IOleCommandTarget. Only one command is supported per object; the COM object's IOleCommandTarget::Exec is always called with nCmdID=0 and with VARIANT arguments set to NULL. Additionally, the implementation of IOleCommandTarget::QueryStatus is always called with cCmds=1.
If the COM object needs to access the browser or Dynamic HTML (DHTML) Object Model of the active page, it must implement IObjectWithSite. Internet Explorer calls IObjectWithSite::SetSite with a pointer to IShellBrowser.