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
77684998
Commit
77684998
authored
May 11, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Show whether the process is running under WOW64.
parent
123c670f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
perfdata.c
programs/taskmgr/perfdata.c
+8
-0
perfdata.h
programs/taskmgr/perfdata.h
+2
-0
No files found.
programs/taskmgr/perfdata.c
View file @
77684998
...
...
@@ -33,6 +33,7 @@
static
PROCNTQSI
pNtQuerySystemInformation
=
NULL
;
static
PROCGGR
pGetGuiResources
=
NULL
;
static
PROCGPIC
pGetProcessIoCounters
=
NULL
;
static
PROCISW64
pIsWow64Process
=
NULL
;
static
CRITICAL_SECTION
PerfDataCriticalSection
;
static
PPERFDATA
pPerfDataOld
=
NULL
;
/* Older perf data (saved to establish delta values) */
static
PPERFDATA
pPerfData
=
NULL
;
/* Most recent copy of perf data */
...
...
@@ -60,6 +61,7 @@ BOOL PerfDataInitialize(void)
pNtQuerySystemInformation
=
(
PROCNTQSI
)
GetProcAddress
(
GetModuleHandleW
(
wszNtdll
),
"NtQuerySystemInformation"
);
pGetGuiResources
=
(
PROCGGR
)
GetProcAddress
(
GetModuleHandleW
(
wszUser32
),
"GetGuiResources"
);
pGetProcessIoCounters
=
(
PROCGPIC
)
GetProcAddress
(
GetModuleHandleW
(
wszKernel32
),
"GetProcessIoCounters"
);
pIsWow64Process
=
(
PROCISW64
)
GetProcAddress
(
GetModuleHandleW
(
wszKernel32
),
"IsWow64Process"
);
InitializeCriticalSection
(
&
PerfDataCriticalSection
);
...
...
@@ -296,6 +298,8 @@ void PerfDataRefresh(void)
}
if
(
pGetProcessIoCounters
)
pGetProcessIoCounters
(
hProcess
,
&
pPerfData
[
Idx
].
IOCounters
);
if
(
pIsWow64Process
)
pIsWow64Process
(
hProcess
,
&
pPerfData
[
Idx
].
Wow64Process
);
CloseHandle
(
hProcess
);
}
pPerfData
[
Idx
].
UserTime
.
QuadPart
=
pSPI
->
UserTime
.
QuadPart
;
...
...
@@ -331,12 +335,16 @@ ULONG PerfDataGetProcessorSystemUsage(void)
BOOL
PerfDataGetImageName
(
ULONG
Index
,
LPWSTR
lpImageName
,
int
nMaxCount
)
{
static
const
WCHAR
proc32W
[]
=
{
' '
,
'*'
,
'3'
,
'2'
,
0
};
BOOL
bSuccessful
;
EnterCriticalSection
(
&
PerfDataCriticalSection
);
if
(
Index
<
ProcessCount
)
{
wcsncpy
(
lpImageName
,
pPerfData
[
Index
].
ImageName
,
nMaxCount
);
if
(
pPerfData
[
Index
].
Wow64Process
&&
nMaxCount
-
lstrlenW
(
lpImageName
)
>
4
/* =lstrlenW(proc32W) */
)
lstrcatW
(
lpImageName
,
proc32W
);
bSuccessful
=
TRUE
;
}
else
{
bSuccessful
=
FALSE
;
...
...
programs/taskmgr/perfdata.h
View file @
77684998
...
...
@@ -47,6 +47,7 @@ typedef struct _PERFDATA
TIME
UserTime
;
TIME
KernelTime
;
BOOL
Wow64Process
;
}
PERFDATA
,
*
PPERFDATA
;
/* SystemPageFileInformation (18) */
...
...
@@ -68,6 +69,7 @@ struct _SYSTEM_PAGEFILE_INFORMATION
typedef
LONG
(
WINAPI
*
PROCNTQSI
)(
UINT
,
PVOID
,
ULONG
,
PULONG
);
typedef
DWORD
(
WINAPI
*
PROCGGR
)(
HANDLE
,
DWORD
);
typedef
BOOL
(
WINAPI
*
PROCGPIC
)(
HANDLE
,
PIO_COUNTERS
);
typedef
BOOL
(
WINAPI
*
PROCISW64
)(
HANDLE
,
PBOOL
);
BOOL
PerfDataInitialize
(
void
);
void
PerfDataRefresh
(
void
);
...
...
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