taskmgr: Fix changing of debug channels. (try2)

Bernhard Übelacker bernhardu at vr-web.de
Wed Oct 14 12:27:10 CDT 2015


When starting any process with some debug channels explicitly enabled or
disabled via the WINEDEBUG environment I am able to right click and
view the debug channels requested for a process.

But trying to change debug channels by clicking on the cells of the table
fails here silently because in dbghelp.SymInitialize a call to
GetProcessId for given process handle fails with access denied.

With adding PROCESS_QUERY_INFORMATION, like in the call to OpenProcess
to retrieve the debug channels, changing is working again.

try2:
- Improved formatting.

Signed-off-by: Bernhard Übelacker <bernhardu at vr-web.de>
---
 programs/taskmgr/dbgchnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/programs/taskmgr/dbgchnl.c b/programs/taskmgr/dbgchnl.c
index 1049a16..6e2dea0 100644
--- a/programs/taskmgr/dbgchnl.c
+++ b/programs/taskmgr/dbgchnl.c
@@ -280,7 +280,8 @@ static void DebugChannels_OnNotify(HWND hDlg, LPARAM lParam)
             HANDLE              hProcess;
             NMITEMACTIVATE*     nmia = (NMITEMACTIVATE*)lParam;
 
-            hProcess = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE, FALSE, get_selected_pid());
+            hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE,
+                                   FALSE, get_selected_pid());
             if (!hProcess) return; /* FIXME message box */
             lhti.pt = nmia->ptAction;
             hChannelLV = GetDlgItem(hDlg, IDC_DEBUG_CHANNELS_LIST);
-- 
2.1.4




More information about the wine-patches mailing list