I'm not sure if vista will let any application terminate a process it has not started... I think it will be considered a security violation by the OS.
You're probably right, but this is for something I'm mainly writing for personal use, and I have no intention of downgrading to Vista any time soon...
And killing the process works fine with the code above under XP, the only problem I have is to programmatically get the correct process ID. If I look it up in taskmanager and feed that to the KillProcess function, it works like a charm.