回 帖 发 新 帖 刷新版面

主题:[讨论]C#中引用DLL求助 急~~~!!!

[color=FF0000]比如 将VB中引用 语句
Private Declare Function rf_init Lib "mwrf32.dll" (ByVal port%, ByVal baud As Long) As Long
改成C#该怎么写?[/color]

回复列表 (共1个回复)

沙发

using System;
using System.Runtime.InteropServices;
class PlatformInvokeTest
{
[DllImport("mwrf32.dll")]
public static extern long rf_init(int port,int baud);
public static void Main()
{
rf_init(  ??? )
   }
}

我来回复

您尚未登录,请登录后再回复。点此登录或注册