Removing an Event from XSI

To cancel the binding of an event

To cancel the binding of an event that was registered by the XSIApplication.Advise method, use the XSIApplication.Unadvise method.

    ' Use some variables in place of arguments
    ename = "OnEndSceneOpen"
    file = "C:\MyEventHandler.dll"
    lang = "cpp"
    name = "ABCSaveSceneEvent"
    XSIApplication.Advise ename, file, ,lang , name
    ' Get the new event's information (for the token)
    Set info = XSIApplication.EventInfos( name )
    ' Remove the binding using the token created by the
    ' Advise method
    XSIApplication.Unadvise info.Token