【发布时间】:2012-01-30 17:02:09
【问题描述】:
我正在以这种方式注册我的 BHO:
public static string RegistryKeyLocation = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects";
[ComRegisterFunction]
public static void Register(Type type)
{
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(RegistryKeyLocation, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
if (registryKey == null)
{
registryKey = Registry.LocalMachine.CreateSubKey(RegistryKeyLocation);
}
string guid = type.GUID.ToString("B");
RegistryKey bhoKey = registryKey.OpenSubKey(guid, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
if (bhoKey == null)
{
bhoKey = registryKey.CreateSubKey(guid);
}
bhoKey.SetValue("IE Ext", 1);
registryKey.Close();
bhoKey.Close();
}
如何设置在 IE 的插件列表中可见的 BHO 名称?此时扩展名取自 BHO 的命名空间,看起来很丑..
【问题讨论】:
标签: c# .net internet-explorer bho add-on