Hi ,

I am having a problem using the following VC DLL function in VB:

QTMCLIENT_API boolean QTM_OpenTCPIPConnection(
LPCTSTR strDestination,
LPCTSTR strServiceName

I have declared the function within a module as:

Public Declare Function QTM_OpenTCPIPConnection Lib "QTMClient" (ByVal strDestination As String, ByVal strServiceName As String) As Boolean

I try to open the TCPIP connection as follows:

errTCP = qtmtest.QTM_OpenTCPIPConnection(txtRemoteIP.Text, txtRemotePort.Text)

If errTCP = True Then
isOpen = True
MsgBox "Error"
Exit Sub
End If

where errTCP and isOpen are both boolean variables. errTCP is always false and the error message is always produced. Can anyone help me??

PS the module's name is qtmtest.

Thanks a bunch