Returns the session identifier (1,2,3,etc.) of the currently connected session. This method can only be used after a successful Connect() and can be used in subsequent calls that require a session identifier parameter.
Dim bzhao, SessionName, SessionId Sub LoginToHost Set bzhao = CreateObject( "BZWhll.WhllObj" ) bzhao.SetBrowserWnd window.top bzhao.ConnectToHost 2, 0 'zero means bzhao must auto-determine session id bzhao.Connect "!" '! means bzhao must auto-determine session name SessionName = bzhao.GetSessionName() SessionId = bzhao.GetSessionId() bzhao.addConnectionCallback 2, SessionId, "ConnectionCallback" 'additional login statements bzhao.Disconnect 'break link with session when done End Sub Sub ConnectionCallback bzhao.Connect SessionName 'connect to the same session 'additional logoff statements bzhao.Disconnect End Sub