Checking for an instance of a program

I am writting a screensaver for myself, and am having problems with the
saver seeing that an instance of the program is already running. I am
writing it in delphi 2.0, and have been told that it is much more
difficult in the 32 bit windows environment.  In 16 bit windows I would
just use "hprevinst".  Anybody have any ideas?