简体   繁体   English

模块“.dll”已加载但未找到入口点

[英]The module ".dll" was loaded but the entry-point was not found

I have a DLL which cause to an error when I run the application.我有一个 DLL,它在我运行应用程序时导致错误。 The error says that the service is not registered.该错误表示该服务未注册。 So I run command regsvr32 with the name of the DLL.因此,我使用 DLL 的名称运行命令regsvr32 But it gives me an error, now the error is:但它给了我一个错误,现在错误是:

The module 'mydll.dll' was loaded but the entry-point 'DllRegisterServer' was not found.模块“mydll.dll”已加载,但未找到入口点“DllRegisterServer”。

Make sure that 'mydll.dll' is a valid DLL or OCX file and then try again确保“mydll.dll”是有效的 DLL 或 OCX 文件,然后重试

I worked on Windows 7 64-bit.我在 Windows 7 64 位上工作。 On Windows XP it works fine!.在 Windows XP 上它工作正常! Does someone know what it can be?有人知道它可以是什么吗? Thanks!谢谢!

The error indicates that the DLL is either not a COM DLL or it's corrupt. 该错误表明该DLL不是COM DLL或它已损坏。 If it's not a COM DLL and not being used as a COM DLL by an application then there is no need to register it. 如果它不是COM DLL并且没有被应用程序用作COM DLL,那么就不需要注册它。
From what you say in your question (the service is not registered) it seems that we are talking about a service not correctly installed. 根据您在问题中所说的内容(the service is not registered) ,我们似乎在谈论未正确安装的服务。 I will try to reinstall the application. 我将尝试重新安装该应用程序。

I had this problem and 我遇到了这个问题

dumpbin /exports mydll.dll

and

depends mydll.dll

showed 'DllRegisterServer'. 显示'DllRegisterServer'。

The problem was that there was another DLL in the system that had the same name. 问题是系统中有另一个DLL具有相同的名称。 After renaming mydll the registration succeeded. 重命名mydll后,注册成功。

What solved it for me was using : 为我解决的是使用:

regasm.exe 'xx.dll' /tlb /codebase /register regasm.exe'xx.dll'/ tlb / codebase / register

It is however, important to understand the difference between regasm.exe and regsvr.exe: 但是,了解regasm.exe和regsvr.exe之间的区别非常重要:

What is difference between RegAsm.exe and regsvr32? RegAsm.exe和regsvr32有什么区别? How to generate a tlb file using regsvr32? 如何使用regsvr32生成tlb文件?

Make sure the command prompt window has admin permissions.确保命令提示符窗口具有管理员权限。 I am using Windows Server 2012 and was getting the error when using regsvr32 in the command prompt.我正在使用 Windows Server 2012 并且在命令提示符中使用 regsvr32 时出现错误。 I opened the command prompt by right clicking on it from All Programs/Windows System/Command Prompt and selecting "run as administrator" Running regsvr32 in this window successfully loaded the dll file.我通过从“所有程序”/“Windows 系统”/“命令提示符”中右键单击它并选择“以管理员身份运行”打开命令提示符。在此窗口中运行 regsvr32 成功加载了 dll 文件。

I found the answer: I need to add a new application to the service components in my computer and then add the right DLL's. 我找到了答案:我需要在计算机中的服务组件中添加一个新的应用程序,然后添加正确的DLL。

Thanks! 谢谢! If anyone has the same problem, I'll be happy to help. 如果有人有同样的问题,我会很乐意提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM