“无法在C#dll中找到名为[function]的入口点” [英] “Unable to find an entry point named [function] in C# dll”

查看:443
本文介绍了“无法在C#dll中找到名为[function]的入口点”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我们正在尝试从32位应用程序加载64位COM注册的DLL。我们得到了"无法在C#DLL中找到名为[function]的入口点"。尝试访问DLL的方法时出现异常。



我们观察到相同的32位COM注册DLL与32位应用程序一起运行正常并且能够访问方法。


$
请告诉我们如何从32位应用程序访问64位COM注册的DLL。如果有人建议使用有效的测试应用,那将非常有用。



提前致谢。

Hi All,

We are trying to load 64 bit COM registered DLL from the 32-bit application. We are getting the "Unable to find an entry point named [function] in C# DLL" exception while trying to access the method of DLL.

We have observed that same 32 bit COM registered DLL is working fine with the 32-bit application and able to access the methods.

Please let us know how we can access the 64 bit COM registered DLL from the 32-bit application. It would be really helpful if anybody suggests a working test application.

Thanks in advance.

推荐答案

AC#DLL并不真正公开函数。它包含数据部分中的MSIL代码。如果你想通过COM使用它,你必须重新使用本机代码。

A C# DLL does not really expose functions. It contains MSIL code in the data section. If you want to use it via COM you have to regasm to native code.

您无法从32位应用程序加载64位dll。您可以编写64位包装器exe并进行进程间通信或将dll重写为32位。

You can't load a 64bit dll from a 32 bit application. You can write a 64 bit wrapper exe and do inter-process communication or rewrite the dll to 32 bit.


这篇关于“无法在C#dll中找到名为[function]的入口点”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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