diff options
Diffstat (limited to 'psutil/arch/windows/proc_info.h')
-rw-r--r-- | psutil/arch/windows/proc_info.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/psutil/arch/windows/proc_info.h b/psutil/arch/windows/proc_info.h new file mode 100644 index 00000000..b7795451 --- /dev/null +++ b/psutil/arch/windows/proc_info.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <Python.h> +#include <windows.h> + +#include "ntextapi.h" + +#define PSUTIL_FIRST_PROCESS(Processes) ( \ + (PSYSTEM_PROCESS_INFORMATION)(Processes)) +#define PSUTIL_NEXT_PROCESS(Process) ( \ + ((PSYSTEM_PROCESS_INFORMATION)(Process))->NextEntryOffset ? \ + (PSYSTEM_PROCESS_INFORMATION)((PCHAR)(Process) + \ + ((PSYSTEM_PROCESS_INFORMATION)(Process))->NextEntryOffset) : NULL) + +int psutil_get_proc_info(DWORD pid, PSYSTEM_PROCESS_INFORMATION *retProcess, + PVOID *retBuffer); +PyObject* psutil_proc_cmdline(PyObject *self, PyObject *args, PyObject *kwdict); +PyObject* psutil_proc_cwd(PyObject *self, PyObject *args); +PyObject* psutil_proc_environ(PyObject *self, PyObject *args); +PyObject* psutil_proc_info(PyObject *self, PyObject *args); |