Author: cfinck
Date: Fri Nov 9 18:26:02 2007
New Revision: 30297
URL:
http://svn.reactos.org/svn/reactos?rev=30297&view=rev
Log:
Many more conversions to Unicode function and type names for taskmgr
Modified:
trunk/reactos/base/applications/taskmgr/about.c
trunk/reactos/base/applications/taskmgr/affinity.c
trunk/reactos/base/applications/taskmgr/applpage.c
trunk/reactos/base/applications/taskmgr/column.c
trunk/reactos/base/applications/taskmgr/dbgchnl.c
trunk/reactos/base/applications/taskmgr/debug.c
trunk/reactos/base/applications/taskmgr/endproc.c
trunk/reactos/base/applications/taskmgr/graph.c
trunk/reactos/base/applications/taskmgr/graphctl.c
trunk/reactos/base/applications/taskmgr/optnmenu.c
trunk/reactos/base/applications/taskmgr/perfdata.c
trunk/reactos/base/applications/taskmgr/perfpage.c
trunk/reactos/base/applications/taskmgr/priority.c
trunk/reactos/base/applications/taskmgr/proclist.c
trunk/reactos/base/applications/taskmgr/procpage.c
trunk/reactos/base/applications/taskmgr/run.c
trunk/reactos/base/applications/taskmgr/taskmgr.c
trunk/reactos/base/applications/taskmgr/trayicon.c
Modified: trunk/reactos/base/applications/taskmgr/about.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/about.c (original)
+++ trunk/reactos/base/applications/taskmgr/about.c Fri Nov 9 18:26:02 2007
@@ -26,7 +26,7 @@
void OnAbout(void)
{
- DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hMainWnd, AboutDialogWndProc);
+ DialogBoxW(hInst, MAKEINTRESOURCEW(IDD_ABOUTBOX), hMainWnd, AboutDialogWndProc);
}
INT_PTR CALLBACK
@@ -41,9 +41,9 @@
hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT);
- LoadString(hInst, IDS_LICENSE, strLicense, 0x1000);
+ LoadStringW(hInst, IDS_LICENSE, strLicense, 0x1000);
- SetWindowText(hLicenseEditWnd, strLicense);
+ SetWindowTextW(hLicenseEditWnd, strLicense);
return TRUE;
Modified: trunk/reactos/base/applications/taskmgr/affinity.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/affinity.c (original)
+++ trunk/reactos/base/applications/taskmgr/affinity.c Fri Nov 9 18:26:02 2007
@@ -62,11 +62,11 @@
hProcessAffinityHandle =
OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, FALSE, dwProcessId);
if (!hProcessAffinityHandle) {
GetLastErrorText(strErrorText, sizeof(strErrorText) / sizeof(WCHAR));
- LoadString(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
- DialogBox(hInst, MAKEINTRESOURCE(IDD_AFFINITY_DIALOG), hMainWnd,
AffinityDialogWndProc);
+ DialogBoxW(hInst, MAKEINTRESOURCEW(IDD_AFFINITY_DIALOG), hMainWnd,
AffinityDialogWndProc);
if (hProcessAffinityHandle) {
CloseHandle(hProcessAffinityHandle);
hProcessAffinityHandle = NULL;
@@ -91,8 +91,8 @@
if (!GetProcessAffinityMask(hProcessAffinityHandle, &dwProcessAffinityMask,
&dwSystemAffinityMask)) {
GetLastErrorText(strErrorText, sizeof(strErrorText) / sizeof(WCHAR));
EndDialog(hDlg, 0);
- LoadString(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
for (nCpu=0; nCpu<sizeof(dwCpuTable) / sizeof(dwCpuTable[0]); nCpu++) {
@@ -106,7 +106,7 @@
* has affinity with
*/
if (dwProcessAffinityMask & (1 << nCpu))
- SendMessage(GetDlgItem(hDlg, dwCpuTable[nCpu]), BM_SETCHECK, BST_CHECKED,
0);
+ SendMessageW(GetDlgItem(hDlg, dwCpuTable[nCpu]), BM_SETCHECK,
BST_CHECKED, 0);
}
return TRUE;
@@ -132,7 +132,7 @@
* First we have to create a mask out of each
* checkbox that the user checked.
*/
- if (SendMessage(GetDlgItem(hDlg, dwCpuTable[nCpu]), BM_GETCHECK, 0, 0))
+ if (SendMessageW(GetDlgItem(hDlg, dwCpuTable[nCpu]), BM_GETCHECK, 0, 0))
dwProcessAffinityMask |= (1 << nCpu);
}
@@ -143,9 +143,9 @@
* of it's cpu time.
*/
if (!dwProcessAffinityMask) {
- LoadString(hInst, IDS_MSG_PROCESSONEPRO, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
- LoadString(hInst, IDS_MSG_INVALIDOPTION, szTempA, sizeof(szTempA) /
sizeof(WCHAR));
- MessageBox(hDlg, szTemp, szTempA, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_PROCESSONEPRO, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
+ LoadStringW(hInst, IDS_MSG_INVALIDOPTION, szTempA, sizeof(szTempA) /
sizeof(WCHAR));
+ MessageBoxW(hDlg, szTemp, szTempA, MB_OK|MB_ICONSTOP);
return TRUE;
}
@@ -155,8 +155,8 @@
if (!SetProcessAffinityMask(hProcessAffinityHandle, dwProcessAffinityMask))
{
GetLastErrorText(strErrorText, sizeof(strErrorText) / sizeof(WCHAR));
EndDialog(hDlg, LOWORD(wParam));
- LoadString(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_ACCESSPROCESSAFF, szTemp, sizeof(szTemp) /
sizeof(WCHAR));
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
EndDialog(hDlg, LOWORD(wParam));
Modified: trunk/reactos/base/applications/taskmgr/applpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/applpage.c (original)
+++ trunk/reactos/base/applications/taskmgr/applpage.c Fri Nov 9 18:26:02 2007
@@ -85,17 +85,17 @@
hApplicationPageSwitchToButton = GetDlgItem(hDlg, IDC_SWITCHTO);
hApplicationPageNewTaskButton = GetDlgItem(hDlg, IDC_NEWTASK);
- SetWindowText(hApplicationPageListCtrl, L"Tasks");
+ SetWindowTextW(hApplicationPageListCtrl, L"Tasks");
/* Initialize the application page's controls */
column.mask = LVCF_TEXT|LVCF_WIDTH;
- LoadString(hInst, IDS_TAB_TASK, szTemp, 256);
+ LoadStringW(hInst, IDS_TAB_TASK, szTemp, 256);
column.pszText = szTemp;
column.cx = 250;
(void)ListView_InsertColumn(hApplicationPageListCtrl, 0, &column); /* Add
the "Task" column */
column.mask = LVCF_TEXT|LVCF_WIDTH;
- LoadString(hInst, IDS_TAB_STATUS, szTemp, 256);
+ LoadStringW(hInst, IDS_TAB_STATUS, szTemp, 256);
column.pszText = szTemp;
column.cx = 95;
(void)ListView_InsertColumn(hApplicationPageListCtrl, 1, &column); /* Add
the "Status" column */
@@ -129,7 +129,7 @@
ApplicationPage_OnSwitchTo();
break;
case IDC_NEWTASK:
- SendMessage(hMainWnd, WM_COMMAND, MAKEWPARAM(ID_FILE_NEW, 0), 0);
+ SendMessageW(hMainWnd, WM_COMMAND, MAKEWPARAM(ID_FILE_NEW, 0), 0);
break;
}
@@ -194,7 +194,7 @@
void UpdateApplicationListControlViewSetting(void)
{
- DWORD dwStyle = GetWindowLong(hApplicationPageListCtrl, GWL_STYLE);
+ DWORD dwStyle = GetWindowLongW(hApplicationPageListCtrl, GWL_STYLE);
dwStyle &= ~LVS_REPORT;
dwStyle &= ~LVS_ICON;
@@ -208,7 +208,7 @@
else
dwStyle |= LVS_REPORT;
- SetWindowLong(hApplicationPageListCtrl, GWL_STYLE, dwStyle);
+ SetWindowLongW(hApplicationPageListCtrl, GWL_STYLE, dwStyle);
RefreshApplicationPage();
}
@@ -216,7 +216,7 @@
DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter)
{
/* Create the event */
- hApplicationPageEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
+ hApplicationPageEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
/* If we couldn't create the event then exit the thread */
if (!hApplicationPageEvent)
@@ -267,36 +267,36 @@
bLargeIcon = TaskManagerSettings.View_LargeIcons ? TRUE : FALSE;
- GetWindowText(hWnd, szText, 260); /* Get the window text */
+ GetWindowTextW(hWnd, szText, 260); /* Get the window text */
/* Check and see if this is a top-level app window */
if ((wcslen(szText) <= 0) ||
!IsWindowVisible(hWnd) ||
(GetParent(hWnd) != NULL) ||
(GetWindow(hWnd, GW_OWNER) != NULL) ||
- (GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+ (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
{
return TRUE; /* Skip this window */
}
/* Get the icon for this window */
hIcon = NULL;
- SendMessageTimeout(hWnd, WM_GETICON,bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/,
0, 0, 1000, (PDWORD_PTR)xhIcon);
+ SendMessageTimeoutW(hWnd, WM_GETICON,bLargeIcon ? ICON_BIG /*1*/ : ICON_SMALL /*0*/,
0, 0, 1000, (PDWORD_PTR)xhIcon);
if (!hIcon)
{
- hIcon = (HICON)(LONG_PTR)GetClassLongPtr(hWnd, bLargeIcon ? GCL_HICON :
GCL_HICONSM);
- if (!hIcon) hIcon = (HICON)(LONG_PTR)GetClassLongPtr(hWnd, bLargeIcon ?
GCL_HICONSM : GCL_HICON);
- if (!hIcon) SendMessageTimeout(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000,
(PDWORD_PTR)xhIcon);
- if (!hIcon) SendMessageTimeout(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ :
ICON_BIG /*1*/, 0, 0, 1000, (PDWORD_PTR)xhIcon);
+ hIcon = (HICON)(LONG_PTR)GetClassLongPtrW(hWnd, bLargeIcon ? GCL_HICON :
GCL_HICONSM);
+ if (!hIcon) hIcon = (HICON)(LONG_PTR)GetClassLongPtrW(hWnd, bLargeIcon ?
GCL_HICONSM : GCL_HICON);
+ if (!hIcon) SendMessageTimeoutW(hWnd, WM_QUERYDRAGICON, 0, 0, 0, 1000,
(PDWORD_PTR)xhIcon);
+ if (!hIcon) SendMessageTimeoutW(hWnd, WM_GETICON, bLargeIcon ? ICON_SMALL /*0*/ :
ICON_BIG /*1*/, 0, 0, 1000, (PDWORD_PTR)xhIcon);
}
if (!hIcon)
- hIcon = LoadIcon(hInst, bLargeIcon ? MAKEINTRESOURCE(IDI_WINDOW) :
MAKEINTRESOURCE(IDI_WINDOWSM));
+ hIcon = LoadIconW(hInst, bLargeIcon ? MAKEINTRESOURCEW(IDI_WINDOW) :
MAKEINTRESOURCEW(IDI_WINDOWSM));
bHung = FALSE;
- IsHungAppWindow =
(IsHungAppWindowProc)(FARPROC)GetProcAddress(GetModuleHandle(L"USER32.DLL"),
"IsHungAppWindow");
+ IsHungAppWindow =
(IsHungAppWindowProc)(FARPROC)GetProcAddress(GetModuleHandleW(L"USER32.DLL"),
"IsHungAppWindow");
if (IsHungAppWindow)
bHung = IsHungAppWindow(hWnd);
@@ -343,7 +343,7 @@
{
/* Check to see if anything needs updating */
if ((pAPLI->hIcon != hIcon) ||
- (wcsicmp(pAPLI->szTitle, szTitle) != 0) ||
+ (_wcsicmp(pAPLI->szTitle, szTitle) != 0) ||
(pAPLI->bHung != bHung))
{
/* Update the structure */
@@ -397,7 +397,7 @@
!IsWindowVisible(pAPLI->hWnd) ||
(GetParent(pAPLI->hWnd) != NULL) ||
(GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
- (GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
+ (GetWindowLongW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
{
ImageList_Remove(hImageListLarge, item.iItem);
ImageList_Remove(hImageListSmall, item.iItem);
@@ -520,12 +520,12 @@
{
if (pAPLI->bHung)
{
- LoadString( GetModuleHandle(NULL), IDS_Not_Responding , szMsg,
sizeof(szMsg) / sizeof(szMsg[0]));
+ LoadStringW( GetModuleHandleW(NULL), IDS_Not_Responding , szMsg,
sizeof(szMsg) / sizeof(szMsg[0]));
wcsncpy(pnmdi->item.pszText, szMsg, pnmdi->item.cchTextMax);
}
else
{
- LoadString( GetModuleHandle(NULL), IDS_Running, (LPTSTR) szMsg,
sizeof(szMsg) / sizeof(szMsg[0]));
+ LoadStringW( GetModuleHandleW(NULL), IDS_Running, (LPWSTR) szMsg,
sizeof(szMsg) / sizeof(szMsg[0]));
wcsncpy(pnmdi->item.pszText, szMsg, pnmdi->item.cchTextMax);
}
}
@@ -588,7 +588,7 @@
GetCursorPos(&pt);
- hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_APPLICATION_PAGE_CONTEXT1));
+ hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_APPLICATION_PAGE_CONTEXT1));
hSubMenu = GetSubMenu(hMenu, 0);
if (TaskManagerSettings.View_LargeIcons)
@@ -611,7 +611,7 @@
GetCursorPos(&pt);
- hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_APPLICATION_PAGE_CONTEXT2));
+ hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_APPLICATION_PAGE_CONTEXT2));
hSubMenu = GetSubMenu(hMenu, 0);
if (ListView_GetSelectedCount(hApplicationPageListCtrl) == 1)
@@ -876,7 +876,7 @@
typedef void (WINAPI *PROCSWITCHTOTHISWINDOW) (HWND, BOOL);
PROCSWITCHTOTHISWINDOW SwitchToThisWindow;
- HMODULE hUser32 = GetModuleHandle(L"USER32");
+ HMODULE hUser32 = GetModuleHandleW(L"USER32");
SwitchToThisWindow = (PROCSWITCHTOTHISWINDOW)GetProcAddress(hUser32,
"SwitchToThisWindow");
if (SwitchToThisWindow) {
SwitchToThisWindow(pAPLI->hWnd, TRUE);
@@ -906,7 +906,7 @@
if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) {
- PostMessage(pAPLI->hWnd, WM_CLOSE, 0, 0);
+ PostMessageW(pAPLI->hWnd, WM_CLOSE, 0, 0);
}
}
}
Modified: trunk/reactos/base/applications/taskmgr/column.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/column.c (original)
+++ trunk/reactos/base/applications/taskmgr/column.c Fri Nov 9 18:26:02 2007
@@ -57,7 +57,7 @@
DECLARE_COLUMN_PRESET(IOOTHERBYTES, 70, FALSE)
};
-int InsertColumn(int nCol, LPCTSTR lpszColumnHeading, int nFormat, int
nWidth, int nSubItem);
+int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int
nWidth, int nSubItem);
INT_PTR CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
lParam);
void AddColumns(void)
@@ -68,23 +68,23 @@
for (n=0; n<COLUMN_NMAX; n++) {
if (TaskManagerSettings.Columns[n]) {
- LoadString(hInst, ColumnPresets[n].dwIdsName, szTemp,
sizeof(szTemp)/sizeof(WCHAR));
+ LoadStringW(hInst, ColumnPresets[n].dwIdsName, szTemp,
sizeof(szTemp)/sizeof(WCHAR));
InsertColumn(n, szTemp, LVCFMT_LEFT, TaskManagerSettings.ColumnSizeArray[n],
-1);
}
}
- size = SendMessage(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
- SendMessage(hProcessPageHeaderCtrl, HDM_SETORDERARRAY, (WPARAM) size, (LPARAM)
&TaskManagerSettings.ColumnOrderArray);
+ size = SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
+ SendMessageW(hProcessPageHeaderCtrl, HDM_SETORDERARRAY, (WPARAM) size, (LPARAM)
&TaskManagerSettings.ColumnOrderArray);
UpdateColumnDataHints();
}
-int InsertColumn(int nCol, LPCTSTR lpszColumnHeading, int nFormat, int nWidth, int
nSubItem)
+int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int
nSubItem)
{
LVCOLUMN column;
column.mask = LVCF_TEXT|LVCF_FMT;
- column.pszText = (LPTSTR)lpszColumnHeading;
+ column.pszText = (LPWSTR)lpszColumnHeading;
column.fmt = nFormat;
if (nWidth != -1)
@@ -117,22 +117,22 @@
}
/* Get header order */
- size = SendMessage(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
- SendMessage(hProcessPageHeaderCtrl, HDM_GETORDERARRAY, (WPARAM) size, (LPARAM)
&TaskManagerSettings.ColumnOrderArray);
+ size = SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
+ SendMessageW(hProcessPageHeaderCtrl, HDM_GETORDERARRAY, (WPARAM) size, (LPARAM)
&TaskManagerSettings.ColumnOrderArray);
/* Get visible columns */
- for (i=0; i<SendMessage(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0); i++) {
+ for (i=0; i<SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0); i++) {
memset(&hditem, 0, sizeof(HDITEM));
hditem.mask = HDI_TEXT|HDI_WIDTH;
hditem.pszText = text;
hditem.cchTextMax = 260;
- SendMessage(hProcessPageHeaderCtrl, HDM_GETITEM, i, (LPARAM) &hditem);
+ SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEM, i, (LPARAM) &hditem);
for (n=0; n<COLUMN_NMAX; n++) {
- LoadString(hInst, ColumnPresets[n].dwIdsName, szTemp,
sizeof(szTemp)/sizeof(WCHAR));
- if (wcsicmp(text, szTemp) == 0)
+ LoadStringW(hInst, ColumnPresets[n].dwIdsName, szTemp,
sizeof(szTemp)/sizeof(WCHAR));
+ if (_wcsicmp(text, szTemp) == 0)
{
TaskManagerSettings.Columns[n] = TRUE;
TaskManagerSettings.ColumnSizeArray[n] = hditem.cxy;
@@ -145,7 +145,7 @@
{
int i;
- if (DialogBox(hInst, MAKEINTRESOURCE(IDD_COLUMNS_DIALOG), hMainWnd,
ColumnsDialogWndProc) == IDOK)
+ if (DialogBoxW(hInst, MAKEINTRESOURCEW(IDD_COLUMNS_DIALOG), hMainWnd,
ColumnsDialogWndProc) == IDOK)
{
for (i=Header_GetItemCount(hProcessPageHeaderCtrl)-1; i>=0; i--)
{
@@ -172,7 +172,7 @@
for (i=0; i<COLUMN_NMAX; i++) {
if (TaskManagerSettings.Columns[i])
- SendMessage(GetDlgItem(hDlg, ColumnPresets[i].dwIdcCtrl), BM_SETCHECK,
BST_CHECKED, 0);
+ SendMessageW(GetDlgItem(hDlg, ColumnPresets[i].dwIdcCtrl), BM_SETCHECK,
BST_CHECKED, 0);
}
return TRUE;
@@ -187,7 +187,7 @@
if (LOWORD(wParam) == IDOK)
{
for (i=0; i<COLUMN_NMAX; i++)
- TaskManagerSettings.Columns[i] = (BOOL) SendMessage(GetDlgItem(hDlg,
ColumnPresets[i].dwIdcCtrl), BM_GETCHECK, 0, 0);
+ TaskManagerSettings.Columns[i] = (BOOL) SendMessageW(GetDlgItem(hDlg,
ColumnPresets[i].dwIdcCtrl), BM_GETCHECK, 0, 0);
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
@@ -207,7 +207,7 @@
WCHAR szTemp[256];
unsigned int i;
- for (Index=0; Index<(ULONG)SendMessage(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT,
0, 0); Index++)
+ for (Index=0; Index<(ULONG)SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT,
0, 0); Index++)
{
memset(&hditem, 0, sizeof(HDITEM));
@@ -215,11 +215,11 @@
hditem.pszText = text;
hditem.cchTextMax = 260;
- SendMessage(hProcessPageHeaderCtrl, HDM_GETITEM, Index, (LPARAM) &hditem);
+ SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEM, Index, (LPARAM) &hditem);
for (i=0; i<COLUMN_NMAX; i++) {
- LoadString(hInst, ColumnPresets[i].dwIdsName, szTemp,
sizeof(szTemp)/sizeof(WCHAR));
- if (wcsicmp(text, szTemp) == 0)
+ LoadStringW(hInst, ColumnPresets[i].dwIdsName, szTemp,
sizeof(szTemp)/sizeof(WCHAR));
+ if (_wcsicmp(text, szTemp) == 0)
ColumnDataHints[Index] = i;
}
}
Modified: trunk/reactos/base/applications/taskmgr/dbgchnl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/dbgchnl.c (original)
+++ trunk/reactos/base/applications/taskmgr/dbgchnl.c Fri Nov 9 18:26:02 2007
@@ -96,7 +96,7 @@
struct cce_user
{
- LPCTSTR name; /* channel to look for */
+ LPCWSTR name; /* channel to look for */
unsigned value, mask; /* how to change channel */
unsigned done; /* number of successful changes */
unsigned notdone; /* number of unsuccessful changes */
@@ -292,9 +292,9 @@
hProcess = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ, FALSE,
get_selected_pid());
if (!hProcess) return; /* FIXME messagebox */
- SendMessage(hChannelLV, WM_SETREDRAW, FALSE, 0);
+ SendMessageW(hChannelLV, WM_SETREDRAW, FALSE, 0);
enum_channel(hProcess, list_channel_CB, (void*)hChannelLV, TRUE);
- SendMessage(hChannelLV, WM_SETREDRAW, TRUE, 0);
+ SendMessageW(hChannelLV, WM_SETREDRAW, TRUE, 0);
CloseHandle(hProcess);
}
@@ -354,7 +354,7 @@
if (!hProcess) return; /* FIXME message box */
lhti.pt = nmia->ptAction;
hChannelLV = GetDlgItem(hDlg, IDC_DEBUG_CHANNELS_LIST);
- SendMessage(hChannelLV, LVM_SUBITEMHITTEST, 0, (LPARAM)&lhti);
+ SendMessageW(hChannelLV, LVM_SUBITEMHITTEST, 0, (LPARAM)&lhti);
if (nmia->iSubItem >= 1 && nmia->iSubItem <= 4)
{
WCHAR val[2];
@@ -405,5 +405,5 @@
void ProcessPage_OnDebugChannels(void)
{
- DialogBox(hInst, (LPCTSTR)IDD_DEBUG_CHANNELS_DIALOG, hMainWnd,
DebugChannelsDlgProc);
-}
+ DialogBoxW(hInst, (LPCWSTR)IDD_DEBUG_CHANNELS_DIALOG, hMainWnd,
DebugChannelsDlgProc);
+}
Modified: trunk/reactos/base/applications/taskmgr/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/debug.c (original)
+++ trunk/reactos/base/applications/taskmgr/debug.c Fri Nov 9 18:26:02 2007
@@ -34,7 +34,7 @@
WCHAR strDebugger[260];
DWORD dwDebuggerSize;
PROCESS_INFORMATION pi;
- STARTUPINFO si;
+ STARTUPINFOW si;
HANDLE hDebugEvent;
WCHAR szTemp[256];
WCHAR szTempA[256];
@@ -59,56 +59,56 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGDEBUG, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ LoadStringW(hInst, IDS_MSG_WARNINGDEBUG, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows
NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) != ERROR_SUCCESS)
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows
NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) != ERROR_SUCCESS)
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
dwDebuggerSize = 260;
- if (RegQueryValueEx(hKey, L"Debugger", NULL, NULL, (LPBYTE)strDebugger,
&dwDebuggerSize) != ERROR_SUCCESS)
+ if (RegQueryValueExW(hKey, L"Debugger", NULL, NULL, (LPBYTE)strDebugger,
&dwDebuggerSize) != ERROR_SUCCESS)
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
RegCloseKey(hKey);
return;
}
RegCloseKey(hKey);
- hDebugEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ hDebugEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
if (!hDebugEvent)
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
- wsprintf(strDebugPath, strDebugger, dwProcessId, hDebugEvent);
+ wsprintfW(strDebugPath, strDebugger, dwProcessId, hDebugEvent);
memset(&pi, 0, sizeof(PROCESS_INFORMATION));
- memset(&si, 0, sizeof(STARTUPINFO));
- si.cb = sizeof(STARTUPINFO);
- if (!CreateProcess(NULL, strDebugPath, NULL, NULL, FALSE, 0, NULL, NULL, &si,
&pi))
+ memset(&si, 0, sizeof(STARTUPINFOW));
+ si.cb = sizeof(STARTUPINFOW);
+ if (!CreateProcessW(NULL, strDebugPath, NULL, NULL, FALSE, 0, NULL, NULL, &si,
&pi))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLEDEBUGPROCESS, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hDebugEvent);
Modified: trunk/reactos/base/applications/taskmgr/endproc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/endproc.c (original)
+++ trunk/reactos/base/applications/taskmgr/endproc.c Fri Nov 9 18:26:02 2007
@@ -53,9 +53,9 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGTERMINATING, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ LoadStringW(hInst, IDS_MSG_WARNINGTERMINATING, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
return;
hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, dwProcessId);
@@ -63,16 +63,16 @@
if (!hProcess)
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!TerminateProcess(hProcess, 0))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -105,9 +105,9 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGTERMINATING, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ LoadStringW(hInst, IDS_MSG_WARNINGTERMINATING, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
return;
hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, dwProcessId);
@@ -115,16 +115,16 @@
if (!hProcess)
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!TerminateProcess(hProcess, 0))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLETERMINATEPRO, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
Modified: trunk/reactos/base/applications/taskmgr/graph.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/graph.c (original)
+++ trunk/reactos/base/applications/taskmgr/graph.c Fri Nov 9 18:26:02 2007
@@ -102,7 +102,7 @@
hdc = BeginPaint(hWnd, &ps);
- WindowId = GetWindowLong(hWnd, GWL_ID);
+ WindowId = GetWindowLongW(hWnd, GWL_ID);
switch (WindowId)
{
@@ -126,7 +126,7 @@
/*
* We pass on all non-handled messages
*/
- return CallWindowProc((WNDPROC)OldGraphWndProc, hWnd, message, wParam, lParam);
+ return CallWindowProcW((WNDPROC)OldGraphWndProc, hWnd, message, wParam, lParam);
}
void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
@@ -166,7 +166,7 @@
if (CpuUsage <= 0) CpuUsage = 0;
if (CpuUsage > 100) CpuUsage = 100;
- wsprintf(Text, L"%d%%", (int)CpuUsage);
+ wsprintfW(Text, L"%d%%", (int)CpuUsage);
/*
* Draw the font text onto the graph
@@ -175,7 +175,7 @@
InflateRect(&rcText, -2, -2);
crPrevForeground = SetTextColor(hDC, RGB(0, 255, 0));
hOldFont = SelectObject(hDC, GetStockObject(DEFAULT_GUI_FONT));
- DrawText(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX |
DT_SINGLELINE);
+ DrawTextW(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX |
DT_SINGLELINE);
SelectObject(hDC, hOldFont);
SetTextColor(hDC, crPrevForeground);
@@ -335,9 +335,9 @@
CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK();
if (CommitChargeTotal > 1024)
- wsprintf(Text, L"%d MB", (int)(CommitChargeTotal / 1024));
+ wsprintfW(Text, L"%d MB", (int)(CommitChargeTotal / 1024));
else
- wsprintf(Text, L"%d K", (int)CommitChargeTotal);
+ wsprintfW(Text, L"%d K", (int)CommitChargeTotal);
/*
* Draw the font text onto the graph
*/
@@ -345,7 +345,7 @@
InflateRect(&rcText, -2, -2);
crPrevForeground = SetTextColor(hDC, RGB(0, 255, 0));
hOldFont = SelectObject(hDC, GetStockObject(DEFAULT_GUI_FONT));
- DrawText(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX |
DT_SINGLELINE);
+ DrawTextW(hDC, Text, -1, &rcText, DT_BOTTOM | DT_CENTER | DT_NOPREFIX |
DT_SINGLELINE);
SelectObject(hDC, hOldFont);
SetTextColor(hDC, crPrevForeground);
Modified: trunk/reactos/base/applications/taskmgr/graphctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/graphctl.c (original)
+++ trunk/reactos/base/applications/taskmgr/graphctl.c Fri Nov 9 18:26:02 2007
@@ -644,5 +644,5 @@
/*
* We pass on all non-handled messages
*/
- return CallWindowProc((WNDPROC)OldGraphCtrlWndProc, hWnd, message, wParam, lParam);
-}
+ return CallWindowProcW((WNDPROC)OldGraphCtrlWndProc, hWnd, message, wParam, lParam);
+}
Modified: trunk/reactos/base/applications/taskmgr/optnmenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/optnmenu.c (original)
+++ trunk/reactos/base/applications/taskmgr/optnmenu.c Fri Nov 9 18:26:02 2007
@@ -40,7 +40,7 @@
* Check or uncheck the always on top menu item
* and update main window.
*/
- if ((GetWindowLong(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0)
+ if ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0)
{
CheckMenuItem(hOptionsMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND|MF_UNCHECKED);
TaskManagerSettings.AlwaysOnTop = FALSE;
Modified: trunk/reactos/base/applications/taskmgr/perfdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/perfdata.c (original)
+++ trunk/reactos/base/applications/taskmgr/perfdata.c Fri Nov 9 18:26:02 2007
@@ -76,14 +76,14 @@
}
}
-static void SidToUserName(PSID Sid, LPTSTR szBuffer, DWORD BufferSize)
+static void SidToUserName(PSID Sid, LPWSTR szBuffer, DWORD BufferSize)
{
static WCHAR szDomainNameUnused[255];
DWORD DomainNameLen = sizeof(szDomainNameUnused) / sizeof(szDomainNameUnused[0]);
SID_NAME_USE Use;
if (Sid != NULL)
- LookupAccountSid(NULL, Sid, szBuffer, &BufferSize, szDomainNameUnused,
&DomainNameLen, &Use);
+ LookupAccountSidW(NULL, Sid, szBuffer, &BufferSize, szDomainNameUnused,
&DomainNameLen, &Use);
}
void PerfDataRefresh(void)
@@ -260,7 +260,7 @@
if (pSPI->ImageName.Buffer)
wcscpy(pPerfData[Idx].ImageName, pSPI->ImageName.Buffer);
else
- LoadString(hInst, IDS_IDLE_PROCESS, pPerfData[Idx].ImageName,
+ LoadStringW(hInst, IDS_IDLE_PROCESS, pPerfData[Idx].ImageName,
sizeof(pPerfData[Idx].ImageName) /
sizeof(pPerfData[Idx].ImageName[0]));
pPerfData[Idx].ProcessId = pSPI->UniqueProcessId;
@@ -368,7 +368,7 @@
return (ULONG)dbKernelTime;
}
-BOOL PerfDataGetImageName(ULONG Index, LPTSTR lpImageName, int nMaxCount)
+BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, int nMaxCount)
{
BOOL bSuccessful;
@@ -420,7 +420,7 @@
return ProcessId;
}
-BOOL PerfDataGetUserName(ULONG Index, LPTSTR lpUserName, int nMaxCount)
+BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, int nMaxCount)
{
BOOL bSuccessful;
Modified: trunk/reactos/base/applications/taskmgr/perfpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/perfpage.c (original)
+++ trunk/reactos/base/applications/taskmgr/perfpage.c Fri Nov 9 18:26:02 2007
@@ -198,10 +198,10 @@
/*
* Subclass graph buttons
*/
- OldGraphWndProc = (WNDPROC)(LONG_PTR)
SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (LONG_PTR)Graph_WndProc);
- SetWindowLongPtr(hPerformancePageMemUsageGraph, GWL_WNDPROC,
(LONG_PTR)Graph_WndProc);
- OldGraphCtrlWndProc = (WNDPROC)(LONG_PTR)
SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC,
(LONG_PTR)GraphCtrl_WndProc);
- SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC,
(LONG_PTR)GraphCtrl_WndProc);
+ OldGraphWndProc = (WNDPROC)(LONG_PTR)
SetWindowLongPtrW(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (LONG_PTR)Graph_WndProc);
+ SetWindowLongPtrW(hPerformancePageMemUsageGraph, GWL_WNDPROC,
(LONG_PTR)Graph_WndProc);
+ OldGraphCtrlWndProc = (WNDPROC)(LONG_PTR)
SetWindowLongPtrW(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC,
(LONG_PTR)GraphCtrl_WndProc);
+ SetWindowLongPtrW(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC,
(LONG_PTR)GraphCtrl_WndProc);
return TRUE;
case WM_COMMAND:
@@ -333,13 +333,13 @@
WCHAR szMemUsage[256];
/* Create the event */
- hPerformancePageEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
+ hPerformancePageEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
/* If we couldn't create the event then exit the thread */
if (!hPerformancePageEvent)
return 0;
- LoadString(hInst, IDS_STATUS_MEMUSAGE, szMemUsage, 256);
+ LoadStringW(hInst, IDS_STATUS_MEMUSAGE, szMemUsage, 256);
while (1)
{
@@ -368,13 +368,13 @@
CommitChargeLimit = PerfDataGetCommitChargeLimitK();
CommitChargePeak = PerfDataGetCommitChargePeakK();
_ultow(CommitChargeTotal, Text, 10);
- SetWindowText(hPerformancePageCommitChargeTotalEdit, Text);
+ SetWindowTextW(hPerformancePageCommitChargeTotalEdit, Text);
_ultow(CommitChargeLimit, Text, 10);
- SetWindowText(hPerformancePageCommitChargeLimitEdit, Text);
+ SetWindowTextW(hPerformancePageCommitChargeLimitEdit, Text);
_ultow(CommitChargePeak, Text, 10);
- SetWindowText(hPerformancePageCommitChargePeakEdit, Text);
- wsprintf(Text, szMemUsage, CommitChargeTotal, CommitChargeLimit);
- SendMessage(hStatusWnd, SB_SETTEXT, 2, (LPARAM)Text);
+ SetWindowTextW(hPerformancePageCommitChargePeakEdit, Text);
+ wsprintfW(Text, szMemUsage, CommitChargeTotal, CommitChargeLimit);
+ SendMessageW(hStatusWnd, SB_SETTEXT, 2, (LPARAM)Text);
/*
* Update the kernel memory info
@@ -383,11 +383,11 @@
KernelMemoryPaged = PerfDataGetKernelMemoryPagedK();
KernelMemoryNonPaged = PerfDataGetKernelMemoryNonPagedK();
_ultow(KernelMemoryTotal, Text, 10);
- SetWindowText(hPerformancePageKernelMemoryTotalEdit, Text);
+ SetWindowTextW(hPerformancePageKernelMemoryTotalEdit, Text);
_ultow(KernelMemoryPaged, Text, 10);
- SetWindowText(hPerformancePageKernelMemoryPagedEdit, Text);
+ SetWindowTextW(hPerformancePageKernelMemoryPagedEdit, Text);
_ultow(KernelMemoryNonPaged, Text, 10);
- SetWindowText(hPerformancePageKernelMemoryNonPagedEdit, Text);
+ SetWindowTextW(hPerformancePageKernelMemoryNonPagedEdit, Text);
/*
* Update the physical memory info
@@ -396,11 +396,11 @@
PhysicalMemoryAvailable = PerfDataGetPhysicalMemoryAvailableK();
PhysicalMemorySystemCache = PerfDataGetPhysicalMemorySystemCacheK();
_ultow(PhysicalMemoryTotal, Text, 10);
- SetWindowText(hPerformancePagePhysicalMemoryTotalEdit, Text);
+ SetWindowTextW(hPerformancePagePhysicalMemoryTotalEdit, Text);
_ultow(PhysicalMemoryAvailable, Text, 10);
- SetWindowText(hPerformancePagePhysicalMemoryAvailableEdit, Text);
+ SetWindowTextW(hPerformancePagePhysicalMemoryAvailableEdit, Text);
_ultow(PhysicalMemorySystemCache, Text, 10);
- SetWindowText(hPerformancePagePhysicalMemorySystemCacheEdit, Text);
+ SetWindowTextW(hPerformancePagePhysicalMemorySystemCacheEdit, Text);
/*
* Update the totals info
@@ -409,11 +409,11 @@
TotalThreads = PerfDataGetTotalThreadCount();
TotalProcesses = PerfDataGetProcessCount();
_ultow(TotalHandles, Text, 10);
- SetWindowText(hPerformancePageTotalsHandleCountEdit, Text);
+ SetWindowTextW(hPerformancePageTotalsHandleCountEdit, Text);
_ultow(TotalThreads, Text, 10);
- SetWindowText(hPerformancePageTotalsThreadCountEdit, Text);
+ SetWindowTextW(hPerformancePageTotalsThreadCountEdit, Text);
_ultow(TotalProcesses, Text, 10);
- SetWindowText(hPerformancePageTotalsProcessCountEdit, Text);
+ SetWindowTextW(hPerformancePageTotalsProcessCountEdit, Text);
/*
* Redraw the graphs
Modified: trunk/reactos/base/applications/taskmgr/priority.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/priority.c (original)
+++ trunk/reactos/base/applications/taskmgr/priority.c Fri Nov 9 18:26:02 2007
@@ -53,26 +53,26 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
- return;
-
- hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
-
- if (!hProcess)
- {
- GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ return;
+
+ hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
+
+ if (!hProcess)
+ {
+ GetLastErrorText(strErrorText, 260);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -105,26 +105,26 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
- return;
-
- hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
-
- if (!hProcess)
- {
- GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ return;
+
+ hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
+
+ if (!hProcess)
+ {
+ GetLastErrorText(strErrorText, 260);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -157,26 +157,26 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
- return;
-
- hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
-
- if (!hProcess)
- {
- GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ return;
+
+ hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
+
+ if (!hProcess)
+ {
+ GetLastErrorText(strErrorText, 260);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, ABOVE_NORMAL_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -209,26 +209,26 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
- return;
-
- hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
-
- if (!hProcess)
- {
- GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ return;
+
+ hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
+
+ if (!hProcess)
+ {
+ GetLastErrorText(strErrorText, 260);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, NORMAL_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -261,26 +261,26 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
- return;
-
- hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
-
- if (!hProcess)
- {
- GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ return;
+
+ hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
+
+ if (!hProcess)
+ {
+ GetLastErrorText(strErrorText, 260);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, BELOW_NORMAL_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
}
CloseHandle(hProcess);
@@ -313,27 +313,27 @@
if ((ListView_GetSelectedCount(hProcessPageListCtrl) != 1) || (dwProcessId == 0))
return;
- LoadString(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
- LoadString(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
- if (MessageBox(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
- return;
-
- hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
-
- if (!hProcess)
- {
- GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ LoadStringW(hInst, IDS_MSG_WARNINGCHANGEPRIORITY, szTemp, 256);
+ LoadStringW(hInst, IDS_MSG_TASKMGRWARNING, szTempA, 256);
+ if (MessageBoxW(hMainWnd, szTemp, szTempA, MB_YESNO|MB_ICONWARNING) != IDYES)
+ return;
+
+ hProcess = OpenProcess(PROCESS_SET_INFORMATION, FALSE, dwProcessId);
+
+ if (!hProcess)
+ {
+ GetLastErrorText(strErrorText, 260);
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
return;
}
if (!SetPriorityClass(hProcess, IDLE_PRIORITY_CLASS))
{
GetLastErrorText(strErrorText, 260);
- LoadString(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
- MessageBox(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
- }
-
- CloseHandle(hProcess);
-}
+ LoadStringW(hInst, IDS_MSG_UNABLECHANGEPRIORITY, szTemp, 256);
+ MessageBoxW(hMainWnd, strErrorText, szTemp, MB_OK|MB_ICONSTOP);
+ }
+
+ CloseHandle(hProcess);
+}
Modified: trunk/reactos/base/applications/taskmgr/proclist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/proclist.c (original)
+++ trunk/reactos/base/applications/taskmgr/proclist.c Fri Nov 9 18:26:02 2007
@@ -62,7 +62,7 @@
/*
* Get the background brush
*/
- hbrBackground = (HBRUSH)(LONG_PTR) GetClassLongPtr(hWnd, GCL_HBRBACKGROUND);
+ hbrBackground = (HBRUSH)(LONG_PTR) GetClassLongPtrW(hWnd, GCL_HBRBACKGROUND);
/*
* Calculate the clip rect by getting the RECT
@@ -73,12 +73,12 @@
* use icons in this list control.
*/
rcClip.left = LVIR_BOUNDS;
- SendMessage(hWnd, LVM_GETITEMRECT, 0, (LPARAM)&rcClip);
+ SendMessageW(hWnd, LVM_GETITEMRECT, 0, (LPARAM)&rcClip);
rcClip.left = LVIR_BOUNDS;
- SendMessage(hWnd, LVM_GETITEMRECT, ListView_GetItemCount(hWnd) - 1,
(LPARAM)&rcItem);
+ SendMessageW(hWnd, LVM_GETITEMRECT, ListView_GetItemCount(hWnd) - 1,
(LPARAM)&rcItem);
rcClip.bottom = rcItem.bottom;
rcClip.left = LVIR_ICON;
- SendMessage(hWnd, LVM_GETITEMRECT, 0, (LPARAM)&rcItem);
+ SendMessageW(hWnd, LVM_GETITEMRECT, 0, (LPARAM)&rcItem);
rcClip.left = rcItem.right;
/*
@@ -109,5 +109,5 @@
/*
* We pass on all messages except WM_ERASEBKGND
*/
- return CallWindowProc(OldProcessListWndProc, hWnd, message, wParam, lParam);
+ return CallWindowProcW(OldProcessListWndProc, hWnd, message, wParam, lParam);
}
Modified: trunk/reactos/base/applications/taskmgr/procpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/procpage.c (original)
+++ trunk/reactos/base/applications/taskmgr/procpage.c Fri Nov 9 18:26:02 2007
@@ -35,7 +35,7 @@
static HANDLE hProcessPageEvent = NULL; /* When this event becomes signaled then we
refresh the process list */
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam);
-void CommaSeparateNumberString(LPTSTR strNumber, int nMaxCount);
+void CommaSeparateNumberString(LPWSTR strNumber, int nMaxCount);
void ProcessPageShowContextMenu(DWORD dwProcessId);
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter);
@@ -71,8 +71,8 @@
/*
* Set the font, title, and extended window styles for the list control
*/
- SendMessage(hProcessPageListCtrl, WM_SETFONT, SendMessage(hProcessPage,
WM_GETFONT, 0, 0), TRUE);
- SetWindowText(hProcessPageListCtrl, L"Processes");
+ SendMessageW(hProcessPageListCtrl, WM_SETFONT, SendMessageW(hProcessPage,
WM_GETFONT, 0, 0), TRUE);
+ SetWindowTextW(hProcessPageListCtrl, L"Processes");
(void)ListView_SetExtendedListViewStyle(hProcessPageListCtrl,
ListView_GetExtendedListViewStyle(hProcessPageListCtrl) | LVS_EX_FULLROWSELECT |
LVS_EX_HEADERDRAGDROP);
AddColumns();
@@ -80,7 +80,7 @@
/*
* Subclass the process list control so we can intercept WM_ERASEBKGND
*/
- OldProcessListWndProc = (WNDPROC)(LONG_PTR)
SetWindowLongPtr(hProcessPageListCtrl, GWL_WNDPROC, (LONG_PTR)ProcessListWndProc);
+ OldProcessListWndProc = (WNDPROC)(LONG_PTR)
SetWindowLongPtrW(hProcessPageListCtrl, GWL_WNDPROC, (LONG_PTR)ProcessListWndProc);
/* Start our refresh thread */
hRefreshThread = CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL);
@@ -189,13 +189,13 @@
if (ColumnDataHints[ColumnIndex] == COLUMN_IMAGENAME)
PerfDataGetImageName(Index, pnmdi->item.pszText,
pnmdi->item.cchTextMax);
if (ColumnDataHints[ColumnIndex] == COLUMN_PID)
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetProcessId(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetProcessId(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_USERNAME)
PerfDataGetUserName(Index, pnmdi->item.pszText,
pnmdi->item.cchTextMax);
if (ColumnDataHints[ColumnIndex] == COLUMN_SESSIONID)
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetSessionId(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetSessionId(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_CPUUSAGE)
- wsprintf(pnmdi->item.pszText, L"%02d",
PerfDataGetCPUUsage(Index));
+ wsprintfW(pnmdi->item.pszText, L"%02d",
PerfDataGetCPUUsage(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_CPUTIME)
{
DWORD dwHours;
@@ -212,115 +212,115 @@
dwMinutes = (DWORD)((time.QuadPart % 36000000000LL) / 600000000LL);
dwSeconds = (DWORD)(((time.QuadPart % 36000000000LL) % 600000000LL) /
10000000LL);
#endif
- wsprintf(pnmdi->item.pszText, L"%d:%02d:%02d", dwHours,
dwMinutes, dwSeconds);
+ wsprintfW(pnmdi->item.pszText, L"%d:%02d:%02d", dwHours,
dwMinutes, dwSeconds);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGE)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetWorkingSetSizeBytes(Index) / 1024);
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetWorkingSetSizeBytes(Index) / 1024);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
wcscat(pnmdi->item.pszText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PEAKMEMORYUSAGE)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
wcscat(pnmdi->item.pszText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGEDELTA)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetWorkingSetSizeDelta(Index) / 1024);
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetWorkingSetSizeDelta(Index) / 1024);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
wcscat(pnmdi->item.pszText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTS)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetPageFaultCount(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetPageFaultCount(Index));
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTSDELTA)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetPageFaultCountDelta(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetPageFaultCountDelta(Index));
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_VIRTUALMEMORYSIZE)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
wcscat(pnmdi->item.pszText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEDPOOL)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetPagedPoolUsagePages(Index) / 1024);
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetPagedPoolUsagePages(Index) / 1024);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
wcscat(pnmdi->item.pszText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_NONPAGEDPOOL)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
wcscat(pnmdi->item.pszText, L" K");
}
if (ColumnDataHints[ColumnIndex] == COLUMN_BASEPRIORITY)
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetBasePriority(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetBasePriority(Index));
if (ColumnDataHints[ColumnIndex] == COLUMN_HANDLECOUNT)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetHandleCount(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetHandleCount(Index));
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_THREADCOUNT)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetThreadCount(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetThreadCount(Index));
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_USEROBJECTS)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetUSERObjectCount(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetUSERObjectCount(Index));
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_GDIOBJECTS)
{
- wsprintf(pnmdi->item.pszText, L"%d",
PerfDataGetGDIObjectCount(Index));
+ wsprintfW(pnmdi->item.pszText, L"%d",
PerfDataGetGDIObjectCount(Index));
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADS)
{
PerfDataGetIOCounters(Index, &iocounters);
- /* wsprintf(pnmdi->item.pszText, L"%d",
iocounters.ReadOperationCount); */
+ /* wsprintfW(pnmdi->item.pszText, L"%d",
iocounters.ReadOperationCount); */
_ui64tow(iocounters.ReadOperationCount, pnmdi->item.pszText, 10);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOWRITES)
{
PerfDataGetIOCounters(Index, &iocounters);
- /* wsprintf(pnmdi->item.pszText, L"%d",
iocounters.WriteOperationCount); */
+ /* wsprintfW(pnmdi->item.pszText, L"%d",
iocounters.WriteOperationCount); */
_ui64tow(iocounters.WriteOperationCount, pnmdi->item.pszText, 10);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOOTHER)
{
PerfDataGetIOCounters(Index, &iocounters);
- /* wsprintf(pnmdi->item.pszText, L"%d",
iocounters.OtherOperationCount); */
+ /* wsprintfW(pnmdi->item.pszText, L"%d",
iocounters.OtherOperationCount); */
_ui64tow(iocounters.OtherOperationCount, pnmdi->item.pszText, 10);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADBYTES)
{
PerfDataGetIOCounters(Index, &iocounters);
- /* wsprintf(pnmdi->item.pszText, L"%d",
iocounters.ReadTransferCount); */
+ /* wsprintfW(pnmdi->item.pszText, L"%d",
iocounters.ReadTransferCount); */
_ui64tow(iocounters.ReadTransferCount, pnmdi->item.pszText, 10);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOWRITEBYTES)
{
PerfDataGetIOCounters(Index, &iocounters);
- /* wsprintf(pnmdi->item.pszText, L"%d",
iocounters.WriteTransferCount); */
+ /* wsprintfW(pnmdi->item.pszText, L"%d",
iocounters.WriteTransferCount); */
_ui64tow(iocounters.WriteTransferCount, pnmdi->item.pszText, 10);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
if (ColumnDataHints[ColumnIndex] == COLUMN_IOOTHERBYTES)
{
PerfDataGetIOCounters(Index, &iocounters);
- /* wsprintf(pnmdi->item.pszText, L"%d",
iocounters.OtherTransferCount); */
+ /* wsprintfW(pnmdi->item.pszText, L"%d",
iocounters.OtherTransferCount); */
_ui64tow(iocounters.OtherTransferCount, pnmdi->item.pszText, 10);
CommaSeparateNumberString(pnmdi->item.pszText,
pnmdi->item.cchTextMax);
}
@@ -385,7 +385,7 @@
}
-void CommaSeparateNumberString(LPTSTR strNumber, int nMaxCount)
+void CommaSeparateNumberString(LPWSTR strNumber, int nMaxCount)
{
WCHAR temp[260];
UINT i, j, k;
@@ -420,7 +420,7 @@
GetCursorPos(&pt);
GetSystemInfo(&si);
- hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_PROCESS_PAGE_CONTEXT));
+ hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_PROCESS_PAGE_CONTEXT));
hSubMenu = GetSubMenu(hMenu, 0);
hPriorityMenu = GetSubMenu(hSubMenu, 4);
@@ -455,10 +455,10 @@
break;
}
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows
NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows
NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
dwDebuggerSize = 260;
- if (RegQueryValueEx(hKey, L"Debugger", NULL, NULL, (LPBYTE)strDebugger,
&dwDebuggerSize) == ERROR_SUCCESS)
+ if (RegQueryValueExW(hKey, L"Debugger", NULL, NULL,
(LPBYTE)strDebugger, &dwDebuggerSize) == ERROR_SUCCESS)
{
for (Idx=0; Idx<wcslen(strDebugger); Idx++)
strDebugger[Idx] = toupper(strDebugger[Idx]);
@@ -491,14 +491,14 @@
WCHAR szCpuUsage[256], szProcesses[256];
/* Create the event */
- hProcessPageEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
+ hProcessPageEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
/* If we couldn't create the event then exit the thread */
if (!hProcessPageEvent)
return 0;
- LoadString(hInst, IDS_STATUS_CPUUSAGE, szCpuUsage, 256);
- LoadString(hInst, IDS_STATUS_PROCESSES, szProcesses, 256);
+ LoadStringW(hInst, IDS_STATUS_CPUUSAGE, szCpuUsage, 256);
+ LoadStringW(hInst, IDS_STATUS_PROCESSES, szProcesses, 256);
while (1) {
DWORD dwWaitVal;
@@ -517,21 +517,21 @@
/* Reset our event */
ResetEvent(hProcessPageEvent);
- if ((ULONG)SendMessage(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0) !=
PerfDataGetProcessCount())
- SendMessage(hProcessPageListCtrl, LVM_SETITEMCOUNT,
PerfDataGetProcessCount(), /*LVSICF_NOINVALIDATEALL|*/LVSICF_NOSCROLL);
+ if ((ULONG)SendMessageW(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0) !=
PerfDataGetProcessCount())
+ SendMessageW(hProcessPageListCtrl, LVM_SETITEMCOUNT,
PerfDataGetProcessCount(), /*LVSICF_NOINVALIDATEALL|*/LVSICF_NOSCROLL);
if (IsWindowVisible(hProcessPage))
InvalidateRect(hProcessPageListCtrl, NULL, FALSE);
if (OldProcessorUsage != PerfDataGetProcessorUsage()) {
OldProcessorUsage = PerfDataGetProcessorUsage();
- wsprintf(text, szCpuUsage, OldProcessorUsage);
- SendMessage(hStatusWnd, SB_SETTEXT, 1, (LPARAM)text);
+ wsprintfW(text, szCpuUsage, OldProcessorUsage);
+ SendMessageW(hStatusWnd, SB_SETTEXT, 1, (LPARAM)text);
}
if (OldProcessCount != PerfDataGetProcessCount()) {
OldProcessCount = PerfDataGetProcessCount();
- wsprintf(text, szProcesses, OldProcessCount);
- SendMessage(hStatusWnd, SB_SETTEXT, 0, (LPARAM)text);
+ wsprintfW(text, szProcesses, OldProcessCount);
+ SendMessageW(hStatusWnd, SB_SETTEXT, 0, (LPARAM)text);
}
}
}
Modified: trunk/reactos/base/applications/taskmgr/run.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/run.c (original)
+++ trunk/reactos/base/applications/taskmgr/run.c Fri Nov 9 18:26:02 2007
@@ -31,11 +31,11 @@
WCHAR szText[256];
/* Load language strings from resource file */
- LoadString(hInst, IDS_CREATENEWTASK, szTitle, sizeof(szTitle) / sizeof(szTitle[0]));
- LoadString(hInst, IDS_CREATENEWTASK_DESC, szText, sizeof(szText) /
sizeof(szText[0]));
+ LoadStringW(hInst, IDS_CREATENEWTASK, szTitle, sizeof(szTitle) /
sizeof(szTitle[0]));
+ LoadStringW(hInst, IDS_CREATENEWTASK_DESC, szText, sizeof(szText) /
sizeof(szText[0]));
- hShell32 = LoadLibrary(L"SHELL32.DLL");
+ hShell32 = LoadLibraryW(L"SHELL32.DLL");
RunFileDlg = (RUNFILEDLG)(FARPROC)GetProcAddress(hShell32, (LPCSTR)0x3D);
/* Show "Run..." dialog */
Modified: trunk/reactos/base/applications/taskmgr/taskmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/taskmgr.c (original)
+++ trunk/reactos/base/applications/taskmgr/taskmgr.c Fri Nov 9 18:26:02 2007
@@ -67,7 +67,7 @@
/* Get a token for this process. */
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
&hToken)) {
/* Get the LUID for the debug privilege. */
- LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
+ LookupPrivilegeValueW(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1; /* one privilege to set */
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
@@ -85,7 +85,7 @@
return -1;
}
- DialogBox(hInst, (LPCTSTR)IDD_TASKMGR_DIALOG, NULL, TaskManagerWndProc);
+ DialogBoxW(hInst, (LPCWSTR)IDD_TASKMGR_DIALOG, NULL, TaskManagerWndProc);
/* Save our settings to the registry */
SaveSettings();
@@ -170,7 +170,7 @@
ProcessPage_OnViewSelectColumns();
break;
case ID_VIEW_REFRESH:
- PostMessage(hDlg, WM_TIMER, 0, 0);
+ PostMessageW(hDlg, WM_TIMER, 0, 0);
break;
case ID_WINDOWS_TILEHORIZONTALLY:
ApplicationPage_OnWindowsTileHorizontally();
@@ -252,9 +252,9 @@
GetCursorPos(&pt);
- OnTop = ((GetWindowLong(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
-
- hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_TRAY_POPUP));
+ OnTop = ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
+
+ hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_TRAY_POPUP));
hPopupMenu = GetSubMenu(hMenu, 0);
if(IsWindowVisible(hMainWnd))
@@ -356,7 +356,7 @@
TaskManagerSettings.Maximized = TRUE;
else
TaskManagerSettings.Maximized = FALSE;
- return DefWindowProc(hDlg, message, wParam, lParam);
+ return DefWindowProcW(hDlg, message, wParam, lParam);
case WM_TIMER:
/* Refresh the performance data */
@@ -384,7 +384,7 @@
void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr)
{
SetBkColor(hDC, clr);
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, lpRect, NULL, 0, NULL);
+ ExtTextOutW(hDC, 0, 0, ETO_OPAQUE, lpRect, NULL, 0, NULL);
}
void FillSolidRect2(HDC hDC, int x, int y, int cx, int cy, COLORREF clr)
@@ -396,7 +396,7 @@
rect.top = y;
rect.right = x + cx;
rect.bottom = y + cy;
- ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
+ ExtTextOutW(hDC, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
}
void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF
clrBottomRight)
@@ -426,7 +426,7 @@
WCHAR szTemp[256];
TCITEM item;
- SendMessage(hMainWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst,
MAKEINTRESOURCE(IDI_TASKMANAGER)));
+ SendMessageW(hMainWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconW(hInst,
MAKEINTRESOURCEW(IDI_TASKMANAGER)));
/* Initialize the Windows Common Controls DLL */
InitCommonControls();
@@ -445,32 +445,32 @@
nParts[0] = 100;
nParts[1] = 210;
nParts[2] = 400;
- SendMessage(hStatusWnd, SB_SETPARTS, 3, (LPARAM) (LPINT) nParts);
+ SendMessageW(hStatusWnd, SB_SETPARTS, 3, (LPARAM) (LPINT) nParts);
/* Create tab pages */
hTabWnd = GetDlgItem(hWnd, IDC_TAB);
#if 1
- hApplicationPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_APPLICATION_PAGE), hWnd,
ApplicationPageWndProc);
- hProcessPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROCESS_PAGE), hWnd,
ProcessPageWndProc);
- hPerformancePage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PERFORMANCE_PAGE), hWnd,
PerformancePageWndProc);
+ hApplicationPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_APPLICATION_PAGE), hWnd,
ApplicationPageWndProc);
+ hProcessPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PROCESS_PAGE), hWnd,
ProcessPageWndProc);
+ hPerformancePage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PERFORMANCE_PAGE), hWnd,
PerformancePageWndProc);
#else
- hApplicationPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_APPLICATION_PAGE),
hTabWnd, ApplicationPageWndProc);
- hProcessPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PROCESS_PAGE), hTabWnd,
ProcessPageWndProc);
- hPerformancePage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PERFORMANCE_PAGE),
hTabWnd, PerformancePageWndProc);
+ hApplicationPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_APPLICATION_PAGE),
hTabWnd, ApplicationPageWndProc);
+ hProcessPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PROCESS_PAGE), hTabWnd,
ProcessPageWndProc);
+ hPerformancePage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PERFORMANCE_PAGE),
hTabWnd, PerformancePageWndProc);
#endif
/* Insert tabs */
- LoadString(hInst, IDS_TAB_APPS, szTemp, 256);
+ LoadStringW(hInst, IDS_TAB_APPS, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 0, &item);
- LoadString(hInst, IDS_TAB_PROCESSES, szTemp, 256);
+ LoadStringW(hInst, IDS_TAB_PROCESSES, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
(void)TabCtrl_InsertItem(hTabWnd, 1, &item);
- LoadString(hInst, IDS_TAB_PERFORMANCE, szTemp, 256);
+ LoadStringW(hInst, IDS_TAB_PERFORMANCE, szTemp, 256);
memset(&item, 0, sizeof(TCITEM));
item.mask = TCIF_TEXT;
item.pszText = szTemp;
@@ -633,13 +633,13 @@
/* Update the status bar size */
GetWindowRect(hStatusWnd, &rc);
- SendMessage(hStatusWnd, WM_SIZE, nType, MAKELPARAM(cx, cy + (rc.bottom - rc.top)));
+ SendMessageW(hStatusWnd, WM_SIZE, nType, MAKELPARAM(cx, cy + (rc.bottom - rc.top)));
/* Update the status bar pane sizes */
nParts[0] = bInMenuLoop ? -1 : 100;
nParts[1] = 210;
nParts[2] = cx;
- SendMessage(hStatusWnd, SB_SETPARTS, bInMenuLoop ? 1 : 3, (LPARAM) (LPINT) nParts);
+ SendMessageW(hStatusWnd, SB_SETPARTS, bInMenuLoop ? 1 : 3, (LPARAM) (LPINT) nParts);
/* Resize the tab control */
GetWindowRect(hTabWnd, &rc);
@@ -714,11 +714,11 @@
TaskManagerSettings.ShowKernelTimes = FALSE;
/* Open the key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER, szSubKey, 0, KEY_READ, &hKey) !=
ERROR_SUCCESS)
+ if (RegOpenKeyExW(HKEY_CURRENT_USER, szSubKey, 0, KEY_READ, &hKey) !=
ERROR_SUCCESS)
return;
/* Read the settings */
dwSize = sizeof(TASKMANAGER_SETTINGS);
- RegQueryValueEx(hKey, L"Preferences", NULL, NULL,
(LPBYTE)&TaskManagerSettings, &dwSize);
+ RegQueryValueExW(hKey, L"Preferences", NULL, NULL,
(LPBYTE)&TaskManagerSettings, &dwSize);
/*
* ATM, the 'ImageName' column is always visible
@@ -740,16 +740,16 @@
/* Open (or create) the key */
hKey = NULL;
- RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey1, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL);
+ RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey1, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL);
RegCloseKey(hKey);
hKey = NULL;
- RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey2, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL);
+ RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey2, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL);
RegCloseKey(hKey);
hKey = NULL;
- if (RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey3, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, szSubKey3, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
return;
/* Save the settings */
- RegSetValueEx(hKey, L"Preferences", 0, REG_BINARY,
(LPBYTE)&TaskManagerSettings, sizeof(TASKMANAGER_SETTINGS));
+ RegSetValueExW(hKey, L"Preferences", 0, REG_BINARY,
(LPBYTE)&TaskManagerSettings, sizeof(TASKMANAGER_SETTINGS));
/* Close the key */
RegCloseKey(hKey);
}
@@ -761,7 +761,7 @@
hMenu = GetMenu(hMainWnd);
hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
- OnTop = ((GetWindowLong(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
+ OnTop = ((GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
OpenIcon(hMainWnd);
SetForegroundWindow(hMainWnd);
@@ -774,9 +774,9 @@
/* Update the status bar pane sizes */
nParts = -1;
- SendMessage(hStatusWnd, SB_SETPARTS, 1, (LPARAM) (LPINT)&nParts);
+ SendMessageW(hStatusWnd, SB_SETPARTS, 1, (LPARAM) (LPINT)&nParts);
bInMenuLoop = TRUE;
- SendMessage(hStatusWnd, SB_SETTEXT, (WPARAM)0, (LPARAM)L"");
+ SendMessageW(hStatusWnd, SB_SETTEXT, (WPARAM)0, (LPARAM)L"");
}
void TaskManager_OnExitMenuLoop(HWND hWnd)
@@ -786,8 +786,8 @@
WCHAR text[260];
WCHAR szCpuUsage[256], szProcesses[256];
- LoadString(hInst, IDS_STATUS_CPUUSAGE, szCpuUsage, 256);
- LoadString(hInst, IDS_STATUS_PROCESSES, szProcesses, 256);
+ LoadStringW(hInst, IDS_STATUS_CPUUSAGE, szCpuUsage, 256);
+ LoadStringW(hInst, IDS_STATUS_PROCESSES, szProcesses, 256);
bInMenuLoop = FALSE;
/* Update the status bar pane sizes */
@@ -795,12 +795,12 @@
nParts[0] = 100;
nParts[1] = 210;
nParts[2] = rc.right;
- SendMessage(hStatusWnd, SB_SETPARTS, 3, (LPARAM) (LPINT) nParts);
- SendMessage(hStatusWnd, SB_SETTEXT, 0, (LPARAM)L"");
- wsprintf(text, szCpuUsage, PerfDataGetProcessorUsage());
- SendMessage(hStatusWnd, SB_SETTEXT, 1, (LPARAM)text);
- wsprintf(text, szProcesses, PerfDataGetProcessCount());
- SendMessage(hStatusWnd, SB_SETTEXT, 0, (LPARAM)text);
+ SendMessageW(hStatusWnd, SB_SETPARTS, 3, (LPARAM) (LPINT) nParts);
+ SendMessageW(hStatusWnd, SB_SETTEXT, 0, (LPARAM)L"");
+ wsprintfW(text, szCpuUsage, PerfDataGetProcessorUsage());
+ SendMessageW(hStatusWnd, SB_SETTEXT, 1, (LPARAM)text);
+ wsprintfW(text, szProcesses, PerfDataGetProcessCount());
+ SendMessageW(hStatusWnd, SB_SETTEXT, 0, (LPARAM)text);
}
void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
@@ -808,15 +808,15 @@
WCHAR str[100];
wcscpy(str, L"");
- if (LoadString(hInst, nItemID, str, 100)) {
+ if (LoadStringW(hInst, nItemID, str, 100)) {
/* load appropriate string */
- LPTSTR lpsz = str;
+ LPWSTR lpsz = str;
/* first newline terminates actual string */
lpsz = wcschr(lpsz, '\n');
if (lpsz != NULL)
*lpsz = '\0';
}
- SendMessage(hStatusWnd, SB_SETTEXT, 0, (LPARAM)str);
+ SendMessageW(hStatusWnd, SB_SETTEXT, 0, (LPARAM)str);
}
void TaskManager_OnViewUpdateSpeedHigh(void)
@@ -872,7 +872,7 @@
void TaskManager_OnViewRefresh(void)
{
- PostMessage(hMainWnd, WM_TIMER, 0, 0);
+ PostMessageW(hMainWnd, WM_TIMER, 0, 0);
}
void TaskManager_OnViewUpdateSpeedPaused(void)
@@ -916,20 +916,20 @@
ShowWindow(hPerformancePage, SW_HIDE);
BringWindowToTop(hApplicationPage);
- LoadString(hInst, IDS_MENU_LARGEICONS, szTemp, 256);
- AppendMenu(hViewMenu, MF_STRING, ID_VIEW_LARGE, szTemp);
-
- LoadString(hInst, IDS_MENU_SMALLICONS, szTemp, 256);
- AppendMenu(hViewMenu, MF_STRING, ID_VIEW_SMALL, szTemp);
-
- LoadString(hInst, IDS_MENU_DETAILS, szTemp, 256);
- AppendMenu(hViewMenu, MF_STRING, ID_VIEW_DETAILS, szTemp);
+ LoadStringW(hInst, IDS_MENU_LARGEICONS, szTemp, 256);
+ AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_LARGE, szTemp);
+
+ LoadStringW(hInst, IDS_MENU_SMALLICONS, szTemp, 256);
+ AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SMALL, szTemp);
+
+ LoadStringW(hInst, IDS_MENU_DETAILS, szTemp, 256);
+ AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_DETAILS, szTemp);
if (GetMenuItemCount(hMenu) <= 4) {
- hSubMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_WINDOWSMENU));
-
- LoadString(hInst, IDS_MENU_WINDOWS, szTemp, 256);
- InsertMenu(hMenu, 3, MF_BYPOSITION|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
+ hSubMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_WINDOWSMENU));
+
+ LoadStringW(hInst, IDS_MENU_WINDOWS, szTemp, 256);
+ InsertMenuW(hMenu, 3, MF_BYPOSITION|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
DrawMenuBar(hMainWnd);
}
@@ -951,11 +951,11 @@
ShowWindow(hPerformancePage, SW_HIDE);
BringWindowToTop(hProcessPage);
- LoadString(hInst, IDS_MENU_SELECTCOLUMNS, szTemp, 256);
- AppendMenu(hViewMenu, MF_STRING, ID_VIEW_SELECTCOLUMNS, szTemp);
-
- LoadString(hInst, IDS_MENU_16BITTASK, szTemp, 256);
- AppendMenu(hOptionsMenu, MF_STRING, ID_OPTIONS_SHOW16BITTASKS, szTemp);
+ LoadStringW(hInst, IDS_MENU_SELECTCOLUMNS, szTemp, 256);
+ AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SELECTCOLUMNS, szTemp);
+
+ LoadStringW(hInst, IDS_MENU_16BITTASK, szTemp, 256);
+ AppendMenuW(hOptionsMenu, MF_STRING, ID_OPTIONS_SHOW16BITTASKS, szTemp);
if (TaskManagerSettings.Show16BitTasks)
CheckMenuItem(hOptionsMenu, ID_OPTIONS_SHOW16BITTASKS,
MF_BYCOMMAND|MF_CHECKED);
@@ -981,17 +981,17 @@
}
hSubMenu = CreatePopupMenu();
- LoadString(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
- AppendMenu(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
-
- LoadString(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
- AppendMenu(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
-
- LoadString(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
- AppendMenu(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
-
- LoadString(hInst, IDS_MENU_SHOWKERNELTIMES, szTemp, 256);
- AppendMenu(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp);
+ LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
+ AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
+
+ LoadStringW(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
+ AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
+
+ LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
+ AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
+
+ LoadStringW(hInst, IDS_MENU_SHOWKERNELTIMES, szTemp, 256);
+ AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp);
if (TaskManagerSettings.ShowKernelTimes)
CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_CHECKED);
@@ -1009,16 +1009,16 @@
}
}
-LPTSTR GetLastErrorText(LPTSTR lpszBuf, DWORD dwSize)
+LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize)
{
DWORD dwRet;
- LPTSTR lpszTemp = NULL;
-
- dwRet = FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM
|FORMAT_MESSAGE_ARGUMENT_ARRAY,
+ LPWSTR lpszTemp = NULL;
+
+ dwRet = FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM
|FORMAT_MESSAGE_ARGUMENT_ARRAY,
NULL,
GetLastError(),
LANG_NEUTRAL,
- (LPTSTR)&lpszTemp,
+ (LPWSTR)&lpszTemp,
0,
NULL );
@@ -1026,8 +1026,8 @@
if (!dwRet || ( (long)dwSize < (long)dwRet+14)) {
lpszBuf[0] = L'\0';
} else {
- lpszTemp[lstrlen(lpszTemp)-2] = L'\0'; /*remove cr and newline character
*/
- wsprintf(lpszBuf, L"%s (0x%x)", lpszTemp, (int)GetLastError());
+ lpszTemp[lstrlenW(lpszTemp)-2] = L'\0'; /*remove cr and newline
character */
+ wsprintfW(lpszBuf, L"%s (0x%x)", lpszTemp, (int)GetLastError());
}
if (lpszTemp) {
LocalFree((HLOCAL)lpszTemp);
Modified: trunk/reactos/base/applications/taskmgr/trayicon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/trayicon.c (original)
+++ trunk/reactos/base/applications/taskmgr/trayicon.c Fri Nov 9 18:26:02 2007
@@ -54,8 +54,8 @@
/*
* Load the bitmaps
*/
- hBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TRAYICON));
- hBitmapMask = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TRAYMASK));
+ hBitmap = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_TRAYICON));
+ hBitmapMask = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_TRAYMASK));
if (!hBitmap || !hBitmapMask)
goto done;
@@ -132,16 +132,16 @@
BOOL TrayIcon_ShellAddTrayIcon(void)
{
- NOTIFYICONDATA nid;
+ NOTIFYICONDATAW nid;
HICON hIcon = NULL;
BOOL bRetVal;
WCHAR szMsg[256];
- memset(&nid, 0, sizeof(NOTIFYICONDATA));
+ memset(&nid, 0, sizeof(NOTIFYICONDATAW));
hIcon = TrayIcon_GetProcessorUsageIcon();
- nid.cbSize = sizeof(NOTIFYICONDATA);
+ nid.cbSize = sizeof(NOTIFYICONDATAW);
nid.hWnd = hMainWnd;
nid.uID = 0;
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
@@ -149,10 +149,10 @@
nid.hIcon = hIcon;
- LoadString( GetModuleHandle(NULL), IDS_MSG_TRAYICONCPUUSAGE, szMsg, sizeof(szMsg) /
sizeof(szMsg[0]));
- wsprintf(nid.szTip, szMsg, PerfDataGetProcessorUsage());
-
- bRetVal = Shell_NotifyIcon(NIM_ADD, &nid);
+ LoadStringW( GetModuleHandleW(NULL), IDS_MSG_TRAYICONCPUUSAGE, szMsg, sizeof(szMsg) /
sizeof(szMsg[0]));
+ wsprintfW(nid.szTip, szMsg, PerfDataGetProcessorUsage());
+
+ bRetVal = Shell_NotifyIconW(NIM_ADD, &nid);
if (hIcon)
DestroyIcon(hIcon);
@@ -162,43 +162,43 @@
BOOL TrayIcon_ShellRemoveTrayIcon(void)
{
- NOTIFYICONDATA nid;
+ NOTIFYICONDATAW nid;
BOOL bRetVal;
- memset(&nid, 0, sizeof(NOTIFYICONDATA));
-
- nid.cbSize = sizeof(NOTIFYICONDATA);
+ memset(&nid, 0, sizeof(NOTIFYICONDATAW));
+
+ nid.cbSize = sizeof(NOTIFYICONDATAW);
nid.hWnd = hMainWnd;
nid.uID = 0;
nid.uFlags = 0;
nid.uCallbackMessage = WM_ONTRAYICON;
- bRetVal = Shell_NotifyIcon(NIM_DELETE, &nid);
+ bRetVal = Shell_NotifyIconW(NIM_DELETE, &nid);
return bRetVal;
}
BOOL TrayIcon_ShellUpdateTrayIcon(void)
{
- NOTIFYICONDATA nid;
+ NOTIFYICONDATAW nid;
HICON hIcon = NULL;
BOOL bRetVal;
WCHAR szTemp[256];
- memset(&nid, 0, sizeof(NOTIFYICONDATA));
+ memset(&nid, 0, sizeof(NOTIFYICONDATAW));
hIcon = TrayIcon_GetProcessorUsageIcon();
- nid.cbSize = sizeof(NOTIFYICONDATA);
+ nid.cbSize = sizeof(NOTIFYICONDATAW);
nid.hWnd = hMainWnd;
nid.uID = 0;
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage = WM_ONTRAYICON;
nid.hIcon = hIcon;
- LoadString(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp, 256);
- wsprintf(nid.szTip, szTemp, PerfDataGetProcessorUsage());
-
- bRetVal = Shell_NotifyIcon(NIM_MODIFY, &nid);
+ LoadStringW(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp, 256);
+ wsprintfW(nid.szTip, szTemp, PerfDataGetProcessorUsage());
+
+ bRetVal = Shell_NotifyIconW(NIM_MODIFY, &nid);
if (hIcon)
DestroyIcon(hIcon);