SteGriff

Blog

Next & Previous

Windows Service starts multiple instances of out-of-process local COM Server

Here is a problem I can’t solve. I have a 32-bit client application which calls in to a third party out-of-process COM server (also 32-bit). My client application is a C# app built on Topshelf, so it can run either as a command line app or as a Windows Service.

Because of the implementation details of the COM Server, this means that I can’t use it with my Windows Service, because it detects a licensing violation (single instance only) and refuses to run.

A number of other people have spotted this behaviour where Windows Services in particular cause COM-serving apps to start additional instances:

Things I’ve tried:

I have no solution, so if you have any ideas, please tweet me @SteGriff or email ste at this domain :)