Hi.
I am trying the COM interface to the dll (which turned out to be CDECL). I have got it to work using VBScript. My PB version crashes though on the first line with CallCOM in it.
It is possible that I don't have the method numbers correct. How would I verify the method numbers? I have the header file, but am not sure what to look for.
Thanks.
Shawn
Code: Select all
'VBScript version that works:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set SabreTerm = CreateObject("COMCSAPISession.COMCSAPISession.1")
bResult = SabreTerm.ConnectToHostSession("FIXEDOFEPSABRE")
iLastRetCode = SabreTerm.GetLastReturnCode()
If iLastRetCode = 0 Then
WshShell.Popup "Connected"
SabreTerm.DisconnectFromHostSession()
Else
WshShell.Popup "Not Connected"
End If
;PB version that doesn't work
#ConnectToHostSession = 0
#DisconnectFromHostSession = 1
#GetLastReturnCode = 4
CallCOM(#ConnectToHostSession,"COMCSAPISession.COMCSAPISession.1", "FIXEDOFEPSABRE")
iLastRetCode.b = CallCOM(#GetLastReturnCode, "COMCSAPISession.COMCSAPISession.1")
If iLastRetCode = 0
MessageRequester("",Str(iLastRetCode)+" Connected", 0)
CallCOM(#DisconnectFromHostSession,"COMCSAPISession.COMCSAPISession.1")
Else
MessageRequester("",Str(iLastRetCode)+"Error", 0)
EndIf
Edited by - shawn on 10 July 2002 15:38:05
Edited by - shawn on 10 July 2002 15:40:39
