jose - that is a clever solution; thanks.  i just tried it and it works well.

drh - jose's solution only requires kernel32.lib, not psapi.lib.