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
91227d91
Commit
91227d91
authored
Aug 20, 2008
by
Vladimir Pankratov
Committed by
Alexandre Julliard
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Converted some functions and variables to Unicode.
parent
bc4ded74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
28 deletions
+33
-28
perfpage.c
programs/taskmgr/perfpage.c
+33
-28
No files found.
programs/taskmgr/perfpage.c
View file @
91227d91
...
...
@@ -4,6 +4,7 @@
* perfpage.c
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
* Copyright (C) 2008 Vladimir Pankratov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -26,10 +27,10 @@
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
#include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h"
#include "perfdata.h"
#include "graphctl.h"
...
...
@@ -138,7 +139,11 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
ULONG
TotalThreads
;
ULONG
TotalProcesses
;
TCHAR
Text
[
260
];
WCHAR
Text
[
256
];
static
const
WCHAR
wszFormatDigit
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
wszMemUsage
[]
=
{
'M'
,
'e'
,
'm'
,
' '
,
'U'
,
's'
,
'a'
,
'g'
,
'e'
,
':'
,
' '
,
'%'
,
'd'
,
'K'
,
' '
,
'/'
,
' '
,
'%'
,
'd'
,
'K'
,
0
};
/* Create the event */
hPerformancePageEvent
=
CreateEvent
(
NULL
,
TRUE
,
TRUE
,
NULL
);
...
...
@@ -175,14 +180,14 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
CommitChargeTotal
=
PerfDataGetCommitChargeTotalK
();
CommitChargeLimit
=
PerfDataGetCommitChargeLimitK
();
CommitChargePeak
=
PerfDataGetCommitChargePeakK
();
_ultoa
(
CommitChargeTotal
,
Text
,
10
);
SetWindowText
(
hPerformancePageCommitChargeTotalEdit
,
Text
);
_ultoa
(
CommitChargeLimit
,
Text
,
10
);
SetWindowText
(
hPerformancePageCommitChargeLimitEdit
,
Text
);
_ultoa
(
CommitChargePeak
,
Text
,
10
);
SetWindowText
(
hPerformancePageCommitChargePeakEdit
,
Text
);
wsprintf
(
Text
,
_T
(
"Mem Usage: %dK / %dK"
)
,
CommitChargeTotal
,
CommitChargeLimit
);
SendMessage
(
hStatusWnd
,
SB_SETTEXT
,
2
,
(
LPARAM
)
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
CommitChargeTotal
);
SetWindowText
W
(
hPerformancePageCommitChargeTotalEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
CommitChargeLimit
);
SetWindowText
W
(
hPerformancePageCommitChargeLimitEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
CommitChargePeak
);
SetWindowText
W
(
hPerformancePageCommitChargePeakEdit
,
Text
);
wsprintf
W
(
Text
,
wszMemUsage
,
CommitChargeTotal
,
CommitChargeLimit
);
SendMessage
W
(
hStatusWnd
,
SB_SETTEXTW
,
2
,
(
LPARAM
)
Text
);
/*
* Update the kernel memory info
...
...
@@ -190,12 +195,12 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
KernelMemoryTotal
=
PerfDataGetKernelMemoryTotalK
();
KernelMemoryPaged
=
PerfDataGetKernelMemoryPagedK
();
KernelMemoryNonPaged
=
PerfDataGetKernelMemoryNonPagedK
();
_ultoa
(
KernelMemoryTotal
,
Text
,
10
);
SetWindowText
(
hPerformancePageKernelMemoryTotalEdit
,
Text
);
_ultoa
(
KernelMemoryPaged
,
Text
,
10
);
SetWindowText
(
hPerformancePageKernelMemoryPagedEdit
,
Text
);
_ultoa
(
KernelMemoryNonPaged
,
Text
,
10
);
SetWindowText
(
hPerformancePageKernelMemoryNonPagedEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
KernelMemoryTotal
);
SetWindowText
W
(
hPerformancePageKernelMemoryTotalEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
KernelMemoryPaged
);
SetWindowText
W
(
hPerformancePageKernelMemoryPagedEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
KernelMemoryNonPaged
);
SetWindowText
W
(
hPerformancePageKernelMemoryNonPagedEdit
,
Text
);
/*
* Update the physical memory info
...
...
@@ -203,12 +208,12 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
PhysicalMemoryTotal
=
PerfDataGetPhysicalMemoryTotalK
();
PhysicalMemoryAvailable
=
PerfDataGetPhysicalMemoryAvailableK
();
PhysicalMemorySystemCache
=
PerfDataGetPhysicalMemorySystemCacheK
();
_ultoa
(
PhysicalMemoryTotal
,
Text
,
10
);
SetWindowText
(
hPerformancePagePhysicalMemoryTotalEdit
,
Text
);
_ultoa
(
PhysicalMemoryAvailable
,
Text
,
10
);
SetWindowText
(
hPerformancePagePhysicalMemoryAvailableEdit
,
Text
);
_ultoa
(
PhysicalMemorySystemCache
,
Text
,
10
);
SetWindowText
(
hPerformancePagePhysicalMemorySystemCacheEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
PhysicalMemoryTotal
);
SetWindowText
W
(
hPerformancePagePhysicalMemoryTotalEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
PhysicalMemoryAvailable
);
SetWindowText
W
(
hPerformancePagePhysicalMemoryAvailableEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
PhysicalMemorySystemCache
);
SetWindowText
W
(
hPerformancePagePhysicalMemorySystemCacheEdit
,
Text
);
/*
* Update the totals info
...
...
@@ -216,12 +221,12 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
TotalHandles
=
PerfDataGetSystemHandleCount
();
TotalThreads
=
PerfDataGetTotalThreadCount
();
TotalProcesses
=
PerfDataGetProcessCount
();
_ultoa
(
TotalHandles
,
Text
,
10
);
SetWindowText
(
hPerformancePageTotalsHandleCountEdit
,
Text
);
_ultoa
(
TotalThreads
,
Text
,
10
);
SetWindowText
(
hPerformancePageTotalsThreadCountEdit
,
Text
);
_ultoa
(
TotalProcesses
,
Text
,
10
);
SetWindowText
(
hPerformancePageTotalsProcessCountEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
TotalHandles
);
SetWindowText
W
(
hPerformancePageTotalsHandleCountEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
TotalThreads
);
SetWindowText
W
(
hPerformancePageTotalsThreadCountEdit
,
Text
);
wsprintfW
(
Text
,
wszFormatDigit
,
TotalProcesses
);
SetWindowText
W
(
hPerformancePageTotalsProcessCountEdit
,
Text
);
/*
* Redraw the graphs
...
...
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