Regsvr32无法“看到" DllUnregisterServer函数. [英] Regsvr32 can’t “see” DllUnregisterServer function.

查看:107
本文介绍了Regsvr32无法“看到" DllUnregisterServer函数.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们

我整天都在敲头,到目前为止还没有喜悦.事实:
我有一个相当大的COM对象(> 1M LOC),无法注销,并且在注册表中存在着巨大的指纹.最初没有DllUnregisterServer入口点,所以我添加了它,但是由于某种原因,regsvr32仍然给出错误已加载对象但未找到DllUnregisterServer".我还在函数主体中添加了一个断言,并且确定该函数永远不会被调用.

这是代码:

He guys

I’m banging my head over this the entire day and so far no joy. The facts:
I have a rather big COM object (> 1M LOC) which fails to unregister and is living a huge fingerprint in the registry. In the beginning there was no DllUnregisterServer entry point so I added it, but for some reason regsvr32 still giving an error that "The object is loaded but the DllUnregisterServer is not found". I also put an assertion in the function body and I’m sure the function is never called.

This is the code:

STDAPI DllUnregisterServer(void)
{
	ASSERT(FALSE);
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	COleObjectFactory::UpdateRegistryAll(FALSE);
	return S_OK;
}



但是函数主体中的代码并不重要,因为regsvr32根本不会调用该函数.哦,注册对象没有问题,只有/u选项失败.



But the code in the function body doesn’t matter since the regsvr32 won’t call the function at all. Oh, and there is no problems with registering the object, only the /u option fails.

Any ideas will be appreciated, thanks!

推荐答案

可能是因为您没有指示应从DLL导出此入口点.

考虑
Probably this is because you did not indicate this entry point should be exported from the DLL.

Consider
__declspec(dllexport) STDAPI DllUnregisterServer(void) { /*...*/ }



我建议您使用某些二进制转储实用程序(例如dumpbin.exe

—SA



I suggest you check up what''s exported using some binary dump utility such as dumpbin.exe, http://msdn.microsoft.com/en-us/library/c1h23y6c(v=vs.71).aspx[^] (to use this utility, it''s best to start from "Visual Studio Command Prompt").

—SA


您是否缺少用于导出功能的入口点?

有关消息的其他信息:
http://support.microsoft.com/kb/249873 [
Are you missing the entry point in order to export the function?

Additional info about the messages: http://support.microsoft.com/kb/249873[^]


这篇关于Regsvr32无法“看到" DllUnregisterServer函数.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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