dll调用的问题 急
我要调用一个用vc编写的dll,其中一个函数是:
HANDLE WINAPI CT_open(
char *name,
unsigned int param1,
unsigned char param2
);
我是这样申明的和调用的:
Public Declare Function CT_open Lib "F:\vb.net\demo\wdcrwx.dll" (ByVal name As String, ByVal parma1 As Long, ByVal parma2 As Byte) As Integer
Private Sub Button_open1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_open1.Click
port_name = ComboBox_port.Text
fd = CT_open(port_name, 9600, Cbyte(Asc("E")))
If fd > 0 Then
Text_return.Text = "端口打开成功"
Else
Text_return.Text = "端口打开失败"
End If
End Sub
但是最后一个参数总是不对,传到动态库里总是为0。大家帮忙看看吧。