So, I think Alexandre has been ignoring this patch because it only reports correct information for the current process, even though the Mac implementation has the same problem. I can think of a few ways to fix that:
1. Do nothing if the handle passed to NtQueryInformationProcess is the handle of another process.
2. Add a wineserver call such as get_process_unix_pid to get the process's Unix PID from its handle. Modify the Mac code to use task_for_pid and the Linux code to use /proc/%u/status.
3. Add a wineserver call such as get_process_vm_counters to get all the information that ProcessVmCounters needs without exposing the Unix PID. Move the Mac code into the wineserver and add the Linux code there too.
Of those options, I think #3 makes the most sense. Ken, do you think it will cause any problems on Mac?
-Alex