DllImport引用dll

lth2006 2008-12-26 11:30:32
关键字DllImport手册中说找dll先是从本目录开始,再找system32目录,....

我在看一个例子时,有下面两句,用到了一个EUCPComm.dll,我怎么办找不到EUCPComm.dll放的位置在那里(该找的目录我都找了)?

[DllImport("EUCPComm.dll",EntryPoint="SendSMS")]
public static extern int SendSMS(string sn,string mn,string ct,string priority);


...全文
1847 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyq11 2008-12-26
  • 打赏
  • 举报
回复
在system目录下,如kenerll32.dll
GTX280 2008-12-26
  • 打赏
  • 举报
回复
那应该是已经注册了Com组件,在System目录下吧
http://topic.csdn.net/t/20050818/13/4216382.html
lth2006 2008-12-26
  • 打赏
  • 举报
回复
能运行,还能重编译哟。
GTX280 2008-12-26
  • 打赏
  • 举报
回复
程序能运行吗,不会报找不到文件错误?
lth2006 2008-12-26
  • 打赏
  • 举报
回复
没得。
GTX280 2008-12-26
  • 打赏
  • 举报
回复
是不是在程序目录下
wangping_li 2008-12-26
  • 打赏
  • 举报
回复
[Quote=引用楼主 lth2006 的帖子:]
关键字DllImport手册中说找dll先是从本目录开始,再找system32目录,....

我在看一个例子时,有下面两句,用到了一个EUCPComm.dll,我怎么办找不到EUCPComm.dll放的位置在那里(该找的目录我都找了)?

[DllImport("EUCPComm.dll",EntryPoint="SendSMS")]
public static extern int SendSMS(string sn,string mn,string ct,string priority);
[/Quote]
不对啊,这里应该跟的是路径,它的EUCPComm这样的话说明和项目是同一个目录的.
如果注册成了Com组件的话就没必要这样调用了,直接添加引用了,好好找一下你的项目目录
或者电脑的开始->搜索->文件或者文件夹->EUCPComm.dll
搜一下在哪,这个肯定能找到的,呵呵
CruelYoung123 2008-12-26
  • 打赏
  • 举报
回复
system32目录下。

111,130

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧