If the process you're looking for has a GUI then you can use
FindWindow
to see if the window exists. If it does, the process is running. If not it doesn't necessarily mean it's not - it could be running in a different window station.
If you can modify the source code for the process you want to detect you could create a named semaphore and raise it everytime the process is launched. Then the detecting process can look for the semaphore by name.
If you don't have control over the source code you can use the toolhelp API to dredge through all the processes running using
CreateToolHelp32Snapshot
,
Process32First
and
Process32First
.
This[
^] article has a code example, bit crap but still usable.