日期:2014-05-19  浏览次数:20372 次

在ASP.NET中调用动态链接库的问题?
我在ASP.NET中调用C++编写的一个动态链接库,这个DLL文件该放在哪个文件夹,是不是放在BIN下面.
我放在BIN下面了,然后写了以下代码调用:
      [DllImport( "testdll.dll ")]
        public   static   extern   int   TestWnd(string   frequency,   string   duration);
        protected   void   Page_Load(object   sender,   EventArgs   e)
        {
                if   (!IsPostBack)
                {
                        string   test   =   TestWnd( "sdfsdf ",   "dd ").ToString();
                        Response.Write(test);
                }
        }
但是提示 "无法加载   DLL“testdll.dll”:   找不到指定的模块。   (异常来自   HRESULT:0x8007007E)。 "
请大家帮帮忙!

------解决方案--------------------
add reference
找到testdll.DLL
添加

------解决方案--------------------
在添加引用中试试看
------解决方案--------------------
對的 ,添加引用中看看....