包含非托管代码DLL到项目的文件路径 [英] Include file path of unmanaged code DLL to the project

查看:111
本文介绍了包含非托管代码DLL到项目的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将非托管代码的DLL文件包含到VB.NET 2005中的解决方案文件夹中.要在不指定DLL文件完整文件路径的情况下导入DLL,需要将DLL文件保存到System32文件夹中.有什么简单的方法可以在VB.NET中设置文件路径而不将文件保留在System32文件夹中?

谢谢,
Steven

I have included an DLL file fo unmanaged code to the solution folder in VB.NET 2005. To import DLL without specifying complete file path of the DLL file, I need to save the DLL file to System32 folder. Is there any simple way I can set the file path in VB.NET without keeping the file in System32 folder?

Thanks,
Steven

推荐答案

如果您无法将其与.EXE放在同一文件夹中,则只需将其拖放到System32中.负载将在开始遍历PATH变量以查找.DLL之前检查.EXE所在的文件夹.
You only need to drop it in System32 if you cannot drop it in the same folder as your .EXE. The load will check the folder the .EXE is in before it starts walking the PATH variable to find the .DLL.


您好bj93081,

看看这个链接:
http://social.msdn.microsoft.com/论坛/en-US/csharpgeneral/thread/4b97a133-0627-4207-b752-a4eaa76d237e [
Hello bj93081,

have a look at this link:
http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/4b97a133-0627-4207-b752-a4eaa76d237e[^]

Hope it will of some help.
thanks,
Hemant


这篇关于包含非托管代码DLL到项目的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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