"phil" <[EMAIL PROTECTED]> wrote: > from win32all > EnumProcesses gives me the pids, then > OpenProcess(pid) gives me a handle. > Then what? > GetModuleFileNameEX? It requires two handles as args > and I can't figure out which one is the handle from OpenProcess > and what it wants for the other one and I can't find any > Win32 SDK docs that help.
http://msdn.microsoft.com/library/en-us/perfmon/base/getmodulefilenameex.asp describes a function with two [in] arguments, and one [out] argument. the first argument is the process handle, the second a module handle; the second argument can be NULL. > This ought to be a nobrainer. But Nooo. Its Windows. it can be pretty tricky on other platforms too; that's why Unix programs usually solve this by writing their PID to a file in a known location, so that other programs can find them without having to resort to more or less stupid tricks. </F> -- http://mail.python.org/mailman/listinfo/python-list