vb调用Delphi的dll问题
delhphi的函数
function gethsno(Ahandle:THandle;amt:double;dcode :Pchar;var postno:longint; var gno:longint;text1,text2:Pchar):longint;stdcall;external 'hs.dll';
我写的vb中的函数
Public Declare Function gethsno Lib "hs.dll" (ByVal Ahandle As Long, ByVal amt As Double, ByVal dcode As String, ByRef postno As Long, ByRef gno As Long, ByRef Text1 As String, ByRef Text2 As String) As Long
Dim strtext1 As String
Dim strtext2 As String
Dim strDcode As String
Dim logNogo As Long
Dim lonNo As Long
Dim Hwand As Long
strDcode = "000"
strtext1 = String(100, vbNullChar)
strtext2 = String(100, vbNullChar)
If gethsno(Hwand, CDbl(txtFkMoney.Text), strDcode, lonNo, logNogo, strtext1, strtext2) = 0 Then
Call DisplayMessageBox("查询房台失败!")
End If
大家帮看看有什么问题。我运行程序总是出错。