本机装载的作品好。从.NET加载提示错误无法加载DLL“my.dll”:无效的内存位置访问加载、本机、内存、错误

由网友(我们隔的不只几千公里)分享简介:我想使用本机的dll,使用的DllImport。我收到这样的错误。 I'm trying to use native dll, using DllImport.And I receive such error. System.DllNotFoundException:无法加载DLLmy.dll:无效的内存位置访问...

我想使用本机的dll,使用的DllImport。 我收到这样的错误。

I'm trying to use native dll, using DllImport. And I receive such error.

System.DllNotFoundException:无法加载DLLmy.dll:无效的内存位置访问。 (异常来自HRESULT:0x800703E6)

System.DllNotFoundException: Unable to load DLL 'my.dll': Invalid access to memory location. (Exception from HRESULT: 0x800703E6)

该DLL加载一般时,被称为从本地code (它是由德尔福的应用程序中使用)。 但是,当我从.NET code调用它,它给了我异常以上。

That dll loads normally when is called from native code (it is used from delphi app). But when I call it from .net code, it gives me exception above.

我读过这个链接Windows Vista的:无法加载DLLx.dll:无效的内存位置访问。 (DllNotFoundException),但没有解决方案帮助。

I've read this link Windows Vista: Unable to load DLL 'x.dll': Invalid access to memory location. (DllNotFoundException), but no solution helps.

DEP,管理权限是不是这样的。

DEP, Administration rights are not the case.

P.S。出现这种情况的Windows 2008服务器上。在Win 2003服务器和XP一切都很正常。

P.S. This situation occurs on Windows 2008 server. On Win 2003 Server and XP everything works great.

推荐答案

看来我已经找到了问题。 问题是在DEP功能。 当我开启DEP为重要的方案而已,它给了没有效果。 但是,当我完全关闭DEP和重启的我的服务器,错误已经一去不复返了。 在一件事我做 - 已安装最新的更新的.NET 4.0

It seems I've found the problem. The problem was in DEP feature. When I switched on DEP for essential programs only, it gave no effect. But when I completely switched off DEP, and rebooted my server, error has gone. The one more thing I've done - installed latest updates for .net 4.0

阅读全文

相关推荐

最新文章