Could you strip down your program so that it still runs and the error can still be reproduced?

Joachim

Carlos Rocha wrote:
Hi Joachim,

Thanks for the reply.

Maybe the implmentation of XDispatchProviderInterceptor is faulty. I assume that you implemented it VB. In case you have not already have a look at

http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Automation_Objects_with_UNO_Interfaces


Here is my implementation. The Interceptor registration is accepted and it works as expected, intercepting de URL commands I want. But I'm unable to release the Interceptor before closing the document.

'----------------------------------- Declarations
Option Explicit

Private oMaster As Object, oSlave As Object
Private interfaces(0) As String

'------------------------------------ XDispatchProviderInterception

Public Property Get Bridge_implementedInterfaces() As Variant
    Bridge_implementedInterfaces = interfaces
End Property
'-------------------------------
Private Sub Class_Initialize()
    interfaces(0) = "com.sun.star.frame.XDispatchProviderInterceptor"
End Sub
'-------------------------------
Public Function queryDispatch(URL, TargetFrameName, SearchFlags)
Select Case URL.complete
Case ".uno:SaveAs", ".uno:Save", ".uno:CloseWin", ".uno:CloseDoc", ".uno:Quit"
        Set queryDispatch = New XDispatch
    Case Else
Set queryDispatch = oSlave.queryDispatch(URL, TargetFrameName, SearchFlags)
End Select
End Function
'-------------------------------
Public Function queryDispatches(mDispatches)
    'queryDispatches = mDispatches()
End Function
'-------------------------------
Public Property Get getSlaveDispatchProvider()
    Set getSlaveDispatchProvider = oSlave
End Property
'-------------------------------
Public Sub setSlaveDispatchProvider(oSlaveDispatchProvider)
    Set oSlave = oSlaveDispatchProvider
End Sub
'-------------------------------
Public Property Get getMasterDispatchProvider()
    Set getMasterDispatchProvider = oMaster
End Property
'-------------------------------
Public Sub setMasterDispatchProvider(oMasterDispatchProvider)
    Set oMaster = oMasterDispatchProvider
End Sub
'--------------------------------- End XDispatchProviderInterceptor

Carlos Rocha wrote:


Hi,

Using VB with Automation Bridge.

The folowing code raises an exception when calling "releaseDispatchProviderInterceptor". Everything else works fine, including the interception, but I'm unable to release it before closing the document.

//--------------------------
Set oXDispatchProviderInterceptor = New XDispatchProviderInterceptor


oFrame.registerDispatchProviderInterceptor oXDispatchProviderInterceptor
oFrame.releaseDispatchProviderInterceptor oXDispatchProviderInterceptor
//--------------------------

The error message is: (in case I can't attach the image)

/------------------------------------
Runtime error '1001':

com.sun.star.uno.RuntimeException: [automation bridge] unexpected exception in IUnknownWrapper_Impl::Invoke !!
/------------------------------------

What does this mean? anything wrong with oXDispatchProviderInterceptor object?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to