那个是非托管dll吧,引用只能引用托管dll,非托管的类似如下 [DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
C#中dllimport可以引用C++编写的非托管dll,但是vb的好像不可以.
命名空间引用:using System.Runtime.InteropServices;然后生明引用的方法,举例: [DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
在项目上,右键,点击"添加引用",选择"COM",选择Vb的dll类库。