我将下面的VB代码转化c#代码,老是报错,高手帮我转化一下,谢谢了Private Declare Function fnInitModem Lib "MonDem.dll" (ByVal comx As Long) As Long
[DllImport("MonDem.dll")]
//查询接收
public static unsafe extern int fnReadMsgEx(int nPortNo, char *szHeader, char * szReadMsg);提示
The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?
[DllImport("MonDem.dll")]
//查询接收
public static unsafe extern int fnReadMsgEx(int nPortNo, char *szHeader, char * szReadMsg);提示
The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?
解决方案 »
- C#如何做一个HOOK钩子,截获系统消息。
- 请高手指点,怎么重新引用CSS文件?
- 大师们,datetimepicker的text能不能默认为空呢
- --sid行记录是不重复的
- 有没有办法可以做到这点.后图抓图.
- [10分赚30,当天结帐]请问我生成一个字符串,是一个XML格式的,放在textBox中,现在想双击textBox,打开一个IE显示这个XML格式的串怎么弄呢?
- 16进制的字符串转换为byte
- 如何将以下两函数黑心换成C#形式?
- 知道了服务器名,怎么得到数据库名?
- 程序出错了:"无法找到列0",怎么回事?急死了!在线等!
- datatable快速赋值给一个对象
- The service on local computer started and then stopped
long fnSendMsg(long nPortNo,char* szHeader,char * szMsg)
怎么将这个写成C#的 szHead是一个字符串,比如138123456789,1,0,138888888,0,0
高手帮我写一下了