Hi,

 

Sorry for the confusion, I meant using the bootstrap function instead of the 
bootstrap command. This is in a program ran as local system. I used C++ for 
coding.

 

I used the sample code from this url 
:http://wiki.services.openoffice.org/wiki/UNO_registery_and_Bootstrapping under 
"The new ::cppu::bootstrap() function".

Reference <XComponentContext> x_component_context(::cppu::bootstrap());
_x_multi_component_factory_client = Reference <XMultiComponentFactory> 
(x_component_context->getServiceManager());
_x_interface = Reference 
<XInterface>(_x_multi_component_factory_client->createInstanceWithContext(OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver"
 ), x_component_context));
Reference <XUnoUrlResolver> resolver(_x_interface, UNO_QUERY);
_x_interface = Reference <XInterface> (resolver->resolve(connection_string), 
UNO_QUERY);
Reference <XPropertySet> x_prop_set(_x_interface, UNO_QUERY);
x_prop_set->getPropertyValue(OUString::createFromAscii("DefaultContext")) >>= 
x_component_context;
Reference <XMultiComponentFactory> 
x_multi_component_factory_server(x_component_context->getServiceManager());
_x_component_loader = Reference 
<XComponentLoader>(x_multi_component_factory_server->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")),
 x_component_context), UNO_QUERY);

 
> Date: Mon, 14 Sep 2009 16:02:21 +0900
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [dev] Openoffice automation using a service
> 
> Hi,
> 
> Wei Min Teo wrote:
> > The first instance of soffice.exe is start by the bootstrap command, it is 
> > ran as SYSTEM. I did not use any command line options just the default 
> > bootstrap function cppu::bootstrap().
> 
> I am sorry, but I cannot understand what you are saying.
> "bootstrap command", "bootstrap function cppu::bootstrap()", ...
> Maybe, I would need to study about that more.
> 
> Possible recommended command line options could be found in this file,
> which is a source code of .jar file frequently used in the SDK to start 
> and/or connect to the process of soffice.bin through a named pipe.
> http://svn.services.openoffice.org/ooo/branches/OOO310/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
> 
> Running soffice.bin as an account SYSTEM might be discouraged
> since the OpenOffice.org is a huge software and is not bug-free.
> There are possibilities to harm your system caused by a bug and/or security 
> hole.
> 
> 
> > Another abnormality is that if i try to rerun the service,
> > an additional copy of soffice will be run which shouldn't
> > be the case because it usually searches for an existing instance.
> 
> The phenomenon can be often observed, if a running user account
> has not yet accepted the license agreement. The first instance
> of soffice.bin is just waiting for user's actions, i.e. clicking
> on the 'OK' button behind the scene. The second one has established
> a connection to the first one and is waiting for its response.
> 
> Ciao,
> Tora
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

_________________________________________________________________
See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx

Reply via email to