Need to get list of process ID's on system

I was using a MUTEX already. It had been in my application since it was in C6 (if not before). It continued to work fine in C9. When going to C11, I experienced 2 types of slowness (see my thread about slow SQL in C11 vs C9) The first slowness was if a user opened more than one instance of the EXE (some users are allowed up to 3). In this case, for instance 2 or 3, it was painfully slower. A window which i.e. The main form that usually takes about 1/2 - 3/4 second to load and fill (lots of SQL lookups here) was now taking 30-45 seconds and would not respond at all while it was filling. Secondally, all other times that SQL was being accessed, it was MUCH slower. I believe that the mutex was also impacting overall speed on what appeared to be screen changes (closing one screen, opening another) but, I strongly believe was the accessing of the database. Today, I ripped out the MUTEX and let as many instances run as I wanted and the speed problem instantly went away. I have replaced this with my reading of the processID’s for my program name and every time the program starts, I fill a queue with the process list, spin through the queue and count the number of instances of my program running.

Problem solved and working like a charm. Tomorrow, I will give the new version of the program to some of our heavy users and see if general overall speed is improved.

Thanks everyone for your ideas and suggestions.