Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 vs2008 开发了一个 activex 组件。我使用 MFC 开发它。
我尝试使用命令手动注册组件
regsvr32 mycontrol.ocx 但它抛出错误“加载库”失败。我确信这是因为依赖 dll。我使用了依赖walker并找到了dll。现在我应该怎么做才能让它工作。
您很可能正在运行 regsvr32 的 64 位版本,而您的 OCX 是 32 位的。由于 regsvr32 将 OCX DLL 加载到其进程中,因此您必须使用 regsvr32 的 32 位版本。这可以在 C:\Windows\SysWOW64 中找到。
尝试将dll文件放在system32文件夹下,看看它是否有效,我的工作正常
我使用 MFC 作为静态链接编译项目,它解决了我的问题