Thanks Mikhail! The error is "0x8001010E The application called an interface that was marshalled for a different thread ".
It's true that the OLE creation and activation happen in different thread. I make use of "LoadComponentFromURL" UNO interface to load the MS office document and it happen in OOo non-main thread. And activation happens in OOo main thread. How can I make sure the loading happen in OOo main thread by UNO API calling on java side? Best regards, Humphry Su (He Feng) Symphony Common App and Performance, IBM China Software Development LAB, Beijing Tel: 86-10-82452452 Fax: 86-10-62982924 NOTES:He Feng Su/China/IBM E-mail: [email protected] |------------> | From: | |------------> >-----------------------------------------------------------------------------------------------------------------------------------------------| |Mikhail Voytenko <[email protected]> | >-----------------------------------------------------------------------------------------------------------------------------------------------| |------------> | To: | |------------> >-----------------------------------------------------------------------------------------------------------------------------------------------| |[email protected] | >-----------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Date: | |------------> >-----------------------------------------------------------------------------------------------------------------------------------------------| |08/19/2009 03:04 PM | >-----------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Subject: | |------------> >-----------------------------------------------------------------------------------------------------------------------------------------------| |Re: [dev] OLE can not be activated in Windows OS after Java integration | >-----------------------------------------------------------------------------------------------------------------------------------------------| Hi, If the object can be activated when the document is loaded in the normal office, that would mean for me that a threading problem takes place. COM does not support multi-threading ( as well as actually OOo ), so the object should be activated from the same thread where it was created. So I suspect that either the object is created in OOo non-main thread or activated in OOo non-main thread, or both is done in two different OOo non-main threads. Which exactly error do you get from DoVerb() call? Best regards, Mikhail. On 08/19/09 03:55 AM, He Feng Su wrote: > Hello all, > After I integrated OO3 into Java window, everything is OK. But I find > that the OLE object in MS Office file can not be activated in windows OS. > Per my debugging, > the Windows APIs calling failed as below in > "lib\embeddedobj\source\msole\olecomponent.cxx". > hr = m_pNativeImpl->m_pOleObject->DoVerb( nVerbID, NULL, > m_pOleWrapClientSite, 0, NULL, NULL ); > > If you had any idea on that, please help. Thank you very much! --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
