日期:2014-05-20  浏览次数:20355 次

引用DELPHI的dll时出现的错误.SOS!
delphi的dll接口文档是这么写的:
function   YK_SendMessage(const   UserId,   Password,   Msg,   Destnumbers:   PChar):   integer;   stdcall;   external   'YK_SmsService.dll ';


我的代码是这么写的:
[DllImport( "YK_SmsService.dll ",   SetLastError   =   true,   EntryPoint   =   "YK_SendMessage ",CharSet   =   CharSet.Unicode)]
        public   static   extern   void   YK_SendMessagewer(string   a,string   b,string   c,string   d);


在调用时出现下面的错误:
{ "无法加载   DLL“YK_SmsService.dll”:   找不到指定的模块。   (异常来自   HRESULT:0x8007007E)。 "}

请问各位哥哥,我怎么怎么解决这个问题?YK_SmsService.dll就在我的根目录下.

------解决方案--------------------
将YK_SmsService.dll放在bin中,或者debug,或者system32