java bho_无法让BHO工作在64位

它似乎并不适用于所有人,因此,我将描述我为使其工作所做的工作 .

2)在 BHO.cs 修改 RegisterBHO(...) 方法

从:

RegistryKey ourKey = registryKey.OpenSubKey(guid);

至:

RegistryKey ourKey = registryKey.OpenSubKey(guid, true); //we want to write the registry

3)为 AnyCPU 编译项目:项目属性,为平台目标选择AnyCPU .

4)创建一个这样的.bat,适应你的路径,并将你的输出dll复制到一边:

"c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" ieextension.dll /codebase

"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" ieextension.dll /codebase

这将注册x86和x64的dll . 这是 mandatory 以使两个版本都注册,否则IE赢得't like it (it will complain the extension is '不兼容') because it won' t能够启动它取决于您的IE设置 . 注意我想你可以为每个版本提供两个不同的文件,但.NET _3020313需要它 .

5)运行.bat作为管理员,这是我这样做时的输出:

"c:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" ieextension.dll /codebase

Microsoft .NET Framework Assembly Registration Utility version 4.7.2046.0

for Microsoft .NET Framework version 4.7.2046.0

Copyright (C) Microsoft Corporation. All rights reserved.

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.

Types registered successfully

"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" ieextension.dll /codebase

Microsoft .NET Framework Assembly Registration Utility version 4.7.2046.0

for Microsoft .NET Framework version 4.7.2046.0

Copyright (C) Microsoft Corporation. All rights reserved.

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.

Types registered successfully

6)运行 iexplore.exe . 它可能会工作取决于您的设置(显示"HOLA!!!"消息框),但无论如何,转到菜单工具/ Internet选项/程序/管理加载项,这是我看到的:

409024a86ebe7123d36fb76202cf1dac.png

如果禁用了扩展,您应该能够启用它(并重新启动) .

如果它不起作用(默认情况下不应该),请确保已选中“为增强保护模式*启用64位进程”(需要重新启动) . 对我来说消息是错误的,它应该只是说“启用64位进程”......

c8a50a5c3a24c89e3a8076121e382620.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值