Andrew Nguyen : taskmgr: Remove all TCHAR macro usage in affinity dialog code.
Alexandre Julliard
julliard at winehq.org
Tue May 17 12:53:00 CDT 2011
Module: wine
Branch: master
Commit: b1f204549cd3bbe0fddaa303ff85edc19644c04f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b1f204549cd3bbe0fddaa303ff85edc19644c04f
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Tue May 17 05:15:03 2011 -0500
taskmgr: Remove all TCHAR macro usage in affinity dialog code.
---
programs/taskmgr/affinity.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/programs/taskmgr/affinity.c b/programs/taskmgr/affinity.c
index 38dbe7e..88575d8 100644
--- a/programs/taskmgr/affinity.c
+++ b/programs/taskmgr/affinity.c
@@ -321,11 +321,12 @@ AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
void ProcessPage_OnSetAffinity(void)
{
LV_ITEMW lvitem;
- ULONG Index;
+ ULONG Index, Count;
DWORD dwProcessId;
WCHAR wstrErrorText[256];
- for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++) {
+ Count = SendMessageW(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0);
+ for (Index=0; Index<Count; Index++) {
memset(&lvitem, 0, sizeof(LV_ITEMW));
lvitem.mask = LVIF_STATE;
lvitem.stateMask = LVIS_SELECTED;
@@ -334,8 +335,10 @@ void ProcessPage_OnSetAffinity(void)
if (lvitem.state & LVIS_SELECTED)
break;
}
+
+ Count = SendMessageW(hProcessPageListCtrl, LVM_GETSELECTEDCOUNT, 0, 0);
dwProcessId = PerfDataGetProcessId(Index);
- if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
+ if ((Count != 1) || (dwProcessId == 0))
return;
hProcessAffinityHandle = OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, FALSE, dwProcessId);
if (!hProcessAffinityHandle) {
More information about the wine-cvs
mailing list