First let me say I think this is great that you are doing this.
Please take my comments as constructive criticism -- these are just my 2 cents:
The idea of making an always-running background service would turn me off from ever using this kind of thing. Perhaps if it was something I used constantly I might go to the trouble of installing it, etc. But I am stingy with things i leave running in the background. And the added complexity, while impressive from a programming standpoint, seems troublesome to me..
I still think the best way to do this is a standalone exe that can just be called with the image file from any tool, to do its thing, without any need for a background resident process and inter-process communication.
If the desire is to not have to restart the program on each call, that would seem to me to be best handled as I said, with a 2nd instance simply passing off control to the first instance if the first instance is already running..
Just my 2 cents! I think it's great either way.
-mouser
Even though I call it a service, it's really just another exe- no installation required. If you run it, you'll see that it basically runs the other exe and sets up the named pipe. One app just takes the command line parameters, sees if the other exe is running and the pipe set up. If it's not, then it runs the other exe and sets up the pipe and adds the task bar notification. You can close it if you wish after you're done with it... or leave it up.
Adding more info here- the reason I went with two .exes instead of one that looked for the other was load time. The first exe that SSC runs has very little in the way of dependencies on purpose, so that it will load and run fast. The one that actually shows the window and does the other stuff takes a bit of time. In fact, so much so, that when the stub runs and it isn't available, I have to sleep the thread for a couple of seconds to make sure that it is up. A couple of seconds to launch isn't such a big thing normally, but I wanted the stub that gets the input from SSC to be pretty lean. If I had made it that same application, it would take the 2 seconds to run every time, even if there was another instance up.
Thoughts?