an earlier posting requested a token based solution to determine if
GroupWise is ready or running. i used an alternative as well, however, a
problem arises when cancelling the login process for the token commander.


set objGWCommander = CreateObject("GroupWiseCommander")

initiates the login process. if the user cancels this process then an
default olesrequest dialog appears when trying to use the application
interface afterwards. I've overriden the default olerequest dialog, but i
have not way to release the instamce of GroupWise that was created before
the login is cancelled.

does anyone have some ideas on how i can get aound this? my application
needs to regain control if the user cancels the login process when
instantiating an instance of the GroupWise Commander object.

here is a code sample i am using to Login using the token commander.

this code unfortunately does not throw and error so there is no way to
release the instance of GroupWise. If i could somehow make it raise and
error instead of poping up the olerequest dialog, that would be great. The
oleserverbusyraiseerror property will throw the error, but you have to
manually end the groupWise process in the task manager before the error is

Public Function GWCommandLogin(ByRef objGWCommander As Object) As Boolean

Dim strReturn As String


With App
.OleServerBusyRaiseError = True
.OleRequestPendingMsgText = "An error occured trying to instantiate
.OleRequestPendingMsgTitle = "GroupWise Error"
.OleRequestPendingTimeout = 1000
End With

Set objGWCommander = CreateObject("GroupWiseCommander")

If Not objGWCommander Is Nothing Then
If Not objGWCommander Is Nothing Then
Call objGWCommander.Execute("Refresh()", strReturn)
Exit Do
End If
Call Sleep(500)
Loop While (strReturn <> "")
Call Sleep(1000)
End If
GWCommandLogin = True
Exit Function

Set objGWCommander = Nothing
GWCommandLogin = False

End Function