Page 1 of 1

DLL Function

Posted: Fri Jan 06, 2006 9:25 am
by Peterg
Hi all
I am trying to use an external dll which gives an example in vb as
Declare Function ZcSearchString(ByVal conn As Long, _
ByVal SrchType As Integer, _
ByVal Columns As String, _
ByVal ColDelim As String, _
ByVal Query As String, _
ByVal Timeout As Integer, _
ByVal ShowList As Integer) _
As String


I have tried to change this to
DLL32 Function ZcSearchString (Mconn As LONG, SrchType As BYTE, Columns As LPSTR, ColDelim As LPSTR, Query As LPSTR, Timeout As BYTE, ShowList As BYTE) As STRING PASCAL LIB "ZCVBCLNT.DLL"

but it does not work. Can anyone help

Peter

Re: DLL Function

Posted: Fri Jan 06, 2006 9:40 am
by Enrico Maria Giordano
Try

DLL32 Function ZcSearchString (Mconn As LONG, SrchType As LONG, Columns As LPSTR, ColDelim As LPSTR, Query As LPSTR, Timeout As LONG, ShowList As LONG) As LPSTR PASCAL LIB "ZCVBCLNT.DLL"

EMG

Posted: Fri Jan 06, 2006 9:57 am
by Peterg
Thanks got it working by playing with String and LTSTR. Thanks

BTW DLL Function works but DLL32 does not

Peter