And found some code, but comehow they all look a little... kludgy

Here's the thing: several programs (editors, for example) when started with a parameter will not create a second instance, but will pass the parameter on to the first instance.
I've seen sendmessage constructions, which may work, though I'm somewhat puzzled how to obtain the windows handle of a previous instance (and findwindow seems a bit wrong to solve this, unless I create a hidden window with an absurd name... yes, I know several apps do it that way).
Another approach would be to do a mapped file, which will work, but again it seems a little overkill.
So, what else is there? Or should I simply jump in and live with a sendmessage / callback construction?