无法使用Regsv32注册DLL-错误“加载了Dll,但未找到入口点DllRegisterServer". [英] Unable to register DLL using Regsv32 - error "Dll was loaded but the entry-point DllRegisterServer was not found"

查看:265
本文介绍了无法使用Regsv32注册DLL-错误“加载了Dll,但未找到入口点DllRegisterServer".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用C#3.5编写了自己的类库.为了在经典的ASP应用程序中使用该dll,我尝试使用regsvr32命令在注册表中注册该dll.但是我遇到了类似"模块" TestDll.dll"的典型错误,但未找到入口点DllRegisterServer.请确保"TestDll.dll"是有效的DLL或OCX文件,然后重试* * ."

I have written my own class library using C# 3.5. For using this dll in classic ASP application, I am trying to register this dll in Registry using regsvr32 command. But I am getting typical error like "The module "TestDll.dll" was loaded but the entry-point DllRegisterServer was not found.Make sure that "TestDll.dll" is a valid DLL or OCX file and then try again**."

我发现其他选项可以在regsvr32命令中包含开关/tlb,这可以继续进行下去.但是我可以确定我的dll是否真的已注册?

I found other option to include switch /tlb in regsvr32 command, by its this going ahead. But I am sure if really my dll is getting registered or not ?

请让我知道我在这里想念什么吗?非常紧急.

Could you please let me know what am I missing here ? Its very urgent.

(注意:-我的机器上装有OS Windows7.有什么区别吗?) 最快的回应将不胜感激.

(Note :- I have OS windows 7 on my machine. Does it make difference ?) Quickest response will be really appreciated.

问候 萨朗

推荐答案

您正在尝试注册不是COM库的dll. .NET com dll之前的版本需要导出一组功能和接口实现,以支持诸如(在您的情况下)自注册和工厂类之类的事情.这些标准化的导出实质上是windows中com实现能够/能够通过com约定与DLL交互的钩子.

You are attempting to register a dll that is not a COM library. Pre .NET com dlls need to export a set of functions and interface implementations that support things like self registration (in your case) and class factory things. These standardized exports were essentially the hooks by which the com implementation in windows was/is able to interact with a DLL via com conventions.

对于.NET,这些导出以及需要它们的工具(如regsvr32)不会直接应用于我们创建的程序集,即使它们是为com interop而设置的.

For .NET, these exports, and the tools that need them like regsvr32, do not apply directly to the assemblies we create, even if they are set up for com interop.

.net互操作的注册和类型初始化的处理方式非常不同.例如,注册由称为regasm .

Registration and type initialization is handled quite differently for .net interop. Registration for instance is handled by a tool called regasm.

对可调用包装.net/com互操作进行一些研究. http://msdn.microsoft.com/en-us/library/bd9cdfyx.aspx

Do some research on com callable wrappers .net/com interop. http://msdn.microsoft.com/en-us/library/bd9cdfyx.aspx

这篇关于无法使用Regsv32注册DLL-错误“加载了Dll,但未找到入口点DllRegisterServer".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆