Yes, That will print the PID.
But Let me put it another way.
I am trying to put in a test in the program to stop the user from starting-up more than one instance of the program at a time. So on startup if I count more than one instance running, I can abort out. With a nice message to the user of course.
I am trying to resist the idea of pipeing out to an external program like tlist.exe or some favor of ps.exe to get the process list.