Summary
The traditional methods of multiple-instance detection, including those documented
by Microsoft, are deeply flawed. There is only one method that is known to work
correctly, creating a kernel object, and it is documented here in two of the
many possible forms that this technique could use.
The notion of "unique" should be well-defined; in most cases, it
means "unique to a session" and perhaps "unique to a desktop",
and the naive approach can actually keep independent users from running concurrently
on an NT system.
Acknowledgements
A special Wave Of The Flounder Fin to Daniel Lohmann for his excellent suggestions
to the article!