From b023f69f76a2210c76ba7eb376c59cfbc421eb51 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 25 Mar 2009 03:48:51 +0000 Subject: [PATCH] gdihv: add a possibility to view all handles svn path=/trunk/; revision=40216 --- rosapps/applications/devutils/gdihv/handlelist.c | 5 +++-- rosapps/applications/devutils/gdihv/proclist.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/rosapps/applications/devutils/gdihv/handlelist.c b/rosapps/applications/devutils/gdihv/handlelist.c index 935083286a4..a1a3a8f03ac 100644 --- a/rosapps/applications/devutils/gdihv/handlelist.c +++ b/rosapps/applications/devutils/gdihv/handlelist.c @@ -83,9 +83,10 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId) { pEntry = &GdiHandleTable[i]; if ( ((ProcessId != (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) != 0)) || - ((ProcessId == (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) == 0)) ) + ((ProcessId == (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) == 0)) || + (ProcessId == (HANDLE)2) ) { - if (ProcessId == (HANDLE)1 || + if (ProcessId == (HANDLE)1 || ProcessId == (HANDLE)2 || ((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc)) { handle = GDI_HANDLE_CREATE(i, pEntry->Type); diff --git a/rosapps/applications/devutils/gdihv/proclist.c b/rosapps/applications/devutils/gdihv/proclist.c index 2800cd78883..9cc31c42747 100644 --- a/rosapps/applications/devutils/gdihv/proclist.c +++ b/rosapps/applications/devutils/gdihv/proclist.c @@ -70,7 +70,16 @@ ProcessList_Update(HWND hListCtrl) item.pszText = L""; (void)ListView_InsertItem(hListCtrl, &item); item.pszText = strText; - wsprintf(strText, L"%#08x",1); + wsprintf(strText, L"%#08x", 1); + ListView_SetItemText(hListCtrl, 1, 1, strText); + + /* Insert "all" */ + item.iItem = 2; + item.lParam = 2; + item.pszText = L""; + (void)ListView_InsertItem(hListCtrl, &item); + item.pszText = strText; + wsprintf(strText, L"%#08x", 2); ListView_SetItemText(hListCtrl, 1, 1, strText); if (!EnumProcesses(ProcessIds, sizeof(ProcessIds), &BytesReturned ))