vb调用delphi *.dll问题
在vb中需调用用delphi 编的dll,并向其传递参数,其delphi函数原型为function XT_OpenComm(CommName:ShortString;OverTime:Word;BaudRate:Word;SysNum:Byte):Byte;stdcall;
请问在vb中如何确定ShortString和Word的类型以便正确传递参数
我是这样引用的:
Public Declare Function XT_OpenComm Lib "K:\SerialPort.dll" (CommName As Any, OverTime As Integer, BaudRate As Integer, SysNum As Byte) As Byte
Private Sub Form_Load()
D = XT_OpenComm("COM1", 3000, 2400, 75)
End Sub
但确返回不了正确结果。