From 2550c6373a184d57012a0baf1820d9fa7afc1483 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 5 Aug 2009 14:30:16 -0700 Subject: [PATCH] try wmi if peb fails for proc_args --- src/os/win32/win32_sigar.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index ea92b681..87c7cc41 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -1443,6 +1443,11 @@ static int sigar_remote_proc_args_get(sigar_t *sigar, sigar_pid_t pid, CloseHandle(proc); + if (status == ERROR_DATATYPE_MISMATCH) { + /* we are 32-bit, pid process is 64-bit */ + status = sigar_proc_args_wmi_get(sigar, pid, procargs); + } + return status; }