Thanks for the suggestion.
After much reading and analysis of the sample code I discovered that my WIN2000 servers are returning PIDs which are negative numbers. That threw a kink into processing which was designed to look for the "no more processes" flag.