Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1d9b7bda
Commit
1d9b7bda
authored
May 18, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
May 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Remove all TCHAR macro usage in debug channel dialog code.
parent
68673936
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
Makefile.in
programs/taskmgr/Makefile.in
+1
-1
dbgchnl.c
programs/taskmgr/dbgchnl.c
+17
-14
No files found.
programs/taskmgr/Makefile.in
View file @
1d9b7bda
...
...
@@ -2,7 +2,7 @@ MODULE = taskmgr.exe
APPMODE
=
-mwindows
-mno-cygwin
IMPORTS
=
psapi shell32 comctl32 user32 gdi32 advapi32
EXTRAINCL
=
-I
$(top_srcdir)
/include/msvcrt
EXTRADEFS
=
-DNO_LIBWINE_PORT
EXTRADEFS
=
-DNO_LIBWINE_PORT
-DWINE_NO_UNICODE_MACROS
MODCFLAGS
=
@BUILTINFLAG@
C_SRCS
=
\
...
...
programs/taskmgr/dbgchnl.c
View file @
1d9b7bda
...
...
@@ -81,26 +81,27 @@ BOOL AreDebugChannelsSupported(void)
static
DWORD
get_selected_pid
(
void
)
{
LVITEM
lvitem
;
ULONG
Index
;
LVITEM
W
lvitem
;
ULONG
Index
,
Count
;
DWORD
dwProcessId
;
for
(
Index
=
0
;
Index
<
(
ULONG
)
ListView_GetItemCount
(
hProcessPageListCtrl
);
Index
++
)
Count
=
SendMessageW
(
hProcessPageListCtrl
,
LVM_GETITEMCOUNT
,
0
,
0
);
for
(
Index
=
0
;
Index
<
Count
;
Index
++
)
{
lvitem
.
mask
=
LVIF_STATE
;
lvitem
.
stateMask
=
LVIS_SELECTED
;
lvitem
.
iItem
=
Index
;
lvitem
.
iSubItem
=
0
;
SendMessage
(
hProcessPageListCtrl
,
LVM_GETITEM
,
0
,
(
LPARAM
)
&
lvitem
);
SendMessage
W
(
hProcessPageListCtrl
,
LVM_GETITEMW
,
0
,
(
LPARAM
)
&
lvitem
);
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
0
;
return
dwProcessId
;
}
...
...
@@ -108,17 +109,19 @@ static DWORD get_selected_pid(void)
static
int
list_channel_CB
(
HANDLE
hProcess
,
void
*
addr
,
struct
__wine_debug_channel
*
channel
,
void
*
user
)
{
int
j
;
WCHAR
val
[
2
];
LVITEM
A
lvitem
;
WCHAR
nameW
[
sizeof
(
channel
->
name
)],
val
[
2
];
LVITEM
W
lvitem
;
int
index
;
HWND
hChannelLV
=
user
;
MultiByteToWideChar
(
CP_ACP
,
0
,
channel
->
name
,
sizeof
(
channel
->
name
),
nameW
,
sizeof
(
nameW
)
/
sizeof
(
WCHAR
));
lvitem
.
mask
=
LVIF_TEXT
;
lvitem
.
pszText
=
channel
->
name
;
lvitem
.
pszText
=
nameW
;
lvitem
.
iItem
=
0
;
lvitem
.
iSubItem
=
0
;
index
=
ListView_InsertItem
(
hChannelLV
,
&
lvitem
);
index
=
ListView_InsertItem
W
(
hChannelLV
,
&
lvitem
);
if
(
index
==
-
1
)
return
0
;
val
[
1
]
=
'\0'
;
...
...
@@ -209,13 +212,13 @@ static void DebugChannels_FillList(HWND hChannelLV)
{
HANDLE
hProcess
;
SendMessage
(
hChannelLV
,
LVM_DELETEALLITEMS
,
0
,
0
);
SendMessage
W
(
hChannelLV
,
LVM_DELETEALLITEMS
,
0
,
0
);
hProcess
=
OpenProcess
(
PROCESS_QUERY_INFORMATION
|
PROCESS_VM_OPERATION
|
PROCESS_VM_READ
,
FALSE
,
get_selected_pid
());
if
(
!
hProcess
)
return
;
/* FIXME messagebox */
SendMessage
(
hChannelLV
,
WM_SETREDRAW
,
FALSE
,
0
);
SendMessage
W
(
hChannelLV
,
WM_SETREDRAW
,
FALSE
,
0
);
enum_channel
(
hProcess
,
list_channel_CB
,
(
void
*
)
hChannelLV
);
SendMessage
(
hChannelLV
,
WM_SETREDRAW
,
TRUE
,
0
);
SendMessage
W
(
hChannelLV
,
WM_SETREDRAW
,
TRUE
,
0
);
CloseHandle
(
hProcess
);
}
...
...
@@ -287,7 +290,7 @@ static void DebugChannels_OnNotify(HWND hDlg, LPARAM lParam)
if
(
!
hProcess
)
return
;
/* FIXME message box */
lhti
.
pt
=
nmia
->
ptAction
;
hChannelLV
=
GetDlgItem
(
hDlg
,
IDC_DEBUG_CHANNELS_LIST
);
SendMessage
(
hChannelLV
,
LVM_SUBITEMHITTEST
,
0
,
(
LPARAM
)
&
lhti
);
SendMessage
W
(
hChannelLV
,
LVM_SUBITEMHITTEST
,
0
,
(
LPARAM
)
&
lhti
);
if
(
nmia
->
iSubItem
>=
1
&&
nmia
->
iSubItem
<=
4
)
{
WCHAR
val
[
2
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment