If you are the application programmer, simply write to the event log.
If you are trying to profile a third party application, and seeing that you need to know when it is started and closed, my best bet is to write a service to check the process list every 250 mSegs or so.
HTH.
buho (A).