为什么 COM 的 CoCreation 是这样的?组件失败并显示 0x8007007e“找不到指定的模块”?
我有一个 COM dll,它作为进程内服务器运行良好,并将其安装在组件服务 COM+ 应用程序中。现在,当我尝试从客户端应用程序共同创建它时,我收到 HRESULT 0x8007007e“找不到指定的模块”。可能是什么原因造成的?
I have a COM dll that is working fine as an in-proc server and I install it in Component Services COM+ Applications. Now when I try to CoCreate it from my client app, I get HRESULT 0x8007007e "The specified module could not be found". What could be causing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
找不到模块意味着 COM 系统尝试加载未找到的模块/dll(可能由 GUID 引用),因为它未注册,或者因为 dll 不存在于注册路径中。
我曾经在尝试从例如 A.dll 创建对象“A”时遇到此错误,该对象调用了另一个未注册的 dll (B.dll)。
您可能感兴趣的工具是进程监视器,它会告诉您确切地说,哪个进程正在查找哪些寄存器键,以及失败和成功代码,甚至可以让您看到它的调用堆栈。
Module not found means that the COM system tried to load a module/dll (probably referred to by a GUID) that wasn't found, either because it wasn't registered, or because the dll was not present at the registered path.
I used to get this error when trying to create an object "A" from e.g. A.dll, which called into another dll (B.dll) that wasn't registered.
A tool you may be interested in is process monitor, which tells you exactly what register keys were looked for by what process, with failure and success codes, and even let you see it's call stack.
请详细说明工作和不工作的不同情况。
我怀疑有一个依赖的模块未找到 - 例如,某些 dll 不在搜索路径中。
Please elaborate on the different circumstances between working and not working.
I suspect there is a module that is depended on that is not found - some dll that is not in a search path for example.
很难说。我记得通常我需要用类似的东西注册 com 组件:
您还可以验证 DLL 的路径是否在 PATH 环境变量中(是 PATH 还是其他变量?)。或者将其复制到您的应用程序的文件夹中。
还要验证您的用户对此 DLL 的权限。
HArd to tell . I rember that usually I need to register com component with something like that:
Also you may verify that the path to your DLL is in PATH envornnemnt variable (Is it PATH or another variable?). Or copy it in the folder for your application.
Verify also your user's rights on this DLL.
该 dll 注册在 ClearCase 动态视图上,类似于映射驱动器,不适用于 COM+。解决方案是将 dll 和代理/存根 dll 移动到本地驱动器并在那里注册它们。
The dll was registered on a ClearCase dynamic view, similar to a mapped drive, not available to COM+. Solution was to move the dll and the proxy/stub dll to a local drive and register them there.