[Development] QtService and ActiveQt combination

Fricot, Daniel daniel.fricot at barco.com
Wed May 21 18:15:50 CEST 2014

In a nutshell: Since Windows Vista, services run in session 0 with session isolation meaning that user applications (in session 1, 2, ...) can hardly communicate with processes from other sessions. There are some loopholes to spawn session 1 processes from a session 0 process but they are considered to be bad practice and hardly secure.

Currently, I just added "mycomserver.exe -activex" to the registry, so it starts when the user logs in.

From: development-bounces+daniel.fricot=barco.com at qt-project.org [mailto:development-bounces+daniel.fricot=barco.com at qt-project.org] On Behalf Of Fricot, Daniel
Sent: dinsdag 20 mei 2014 13:56
To: development at qt-project.org
Subject: Re: [Development] QtService and ActiveQt combination

I managed to get the ActiveX out-of-process server (ActiveQt) running as a service but as soon as I want to actually get a COM object in my application, a new server is started next to the one running as a service.

Assuming ActiveQt and QtService don't play nice together, I tried a different approach: Create a QtService that gets a COM object and thus starts the ActiveX out-of-process server. This has the same effect: When I create a COM object in my application, a second server is started, serving my application(s). As if the servers started directly or indirectly through QtService don't exist. Changing the service to run with the credentials of a user doesn't change anything.

I compared Process Explorer's details on both servers (the one created (in)directly by a service and the one that was created when running my application) and there is no difference between them.

Why isn't my application served by an ActiveX/ActiveQt server that is directly or indirectly started by a windows service (QtService)?

Extra info: the whole idea is to have the server running as soon as possible after boot to build a cache with data that is occasionally sent on the networks.

From: Fricot, Daniel
Sent: dinsdag 13 mei 2014 14:48
To: 'development at qt-project.org'
Subject: QtService and ActiveQt combination

I can create a QtService (from qt-solutions) or I can create an ActiveQt server. However, I am unable to combine them together as an ActiveQt server, running as a Windows service.
(Un)install the service, (un)register the ActiveX components and run as console application all works but starting it as a service fails. All I get is "The service X could not start".
Does anybody know if this is even possible? All help is welcome.
This message is subject to the following terms and conditions: MAIL DISCLAIMER<http://www.barco.com/en/maildisclaimer>
This message is subject to the following terms and conditions: MAIL DISCLAIMER<http://www.barco.com/en/maildisclaimer>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140521/35294e4c/attachment.html>

More information about the Development mailing list