taskmgr: Use C runtime wchar functions instead of wine/unicode.h.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-04-01 11:50:11 +02:00
parent 0b18409cfc
commit 3036649a34
10 changed files with 62 additions and 72 deletions

View File

@ -29,7 +29,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"

View File

@ -27,7 +27,6 @@
#include <windows.h> #include <windows.h>
#include <commctrl.h> #include <commctrl.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
typedef struct typedef struct
@ -147,13 +146,13 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
{ {
/* Check to see if anything needs updating */ /* Check to see if anything needs updating */
if ((pAPLI->hIcon != hIcon) || if ((pAPLI->hIcon != hIcon) ||
(strcmpW(pAPLI->wszTitle, wszTitle) != 0) || (lstrcmpW(pAPLI->wszTitle, wszTitle) != 0) ||
(pAPLI->bHung != bHung)) (pAPLI->bHung != bHung))
{ {
/* Update the structure */ /* Update the structure */
pAPLI->hIcon = hIcon; pAPLI->hIcon = hIcon;
pAPLI->bHung = bHung; pAPLI->bHung = bHung;
strcpyW(pAPLI->wszTitle, wszTitle); lstrcpyW(pAPLI->wszTitle, wszTitle);
/* Update the image list */ /* Update the image list */
ImageList_ReplaceIcon(hImageListLarge, item.iItem, hIcon); ImageList_ReplaceIcon(hImageListLarge, item.iItem, hIcon);
@ -174,7 +173,7 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
pAPLI->hWnd = hWnd; pAPLI->hWnd = hWnd;
pAPLI->hIcon = hIcon; pAPLI->hIcon = hIcon;
pAPLI->bHung = bHung; pAPLI->bHung = bHung;
strcpyW(pAPLI->wszTitle, wszTitle); lstrcpyW(pAPLI->wszTitle, wszTitle);
/* Add the item to the list */ /* Add the item to the list */
memset(&item, 0, sizeof(LV_ITEMW)); memset(&item, 0, sizeof(LV_ITEMW));
@ -198,7 +197,7 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (!IsWindow(pAPLI->hWnd)|| if (!IsWindow(pAPLI->hWnd)||
(strlenW(pAPLI->wszTitle) <= 0) || (lstrlenW(pAPLI->wszTitle) <= 0) ||
!IsWindowVisible(pAPLI->hWnd) || !IsWindowVisible(pAPLI->hWnd) ||
(GetParent(pAPLI->hWnd) != NULL) || (GetParent(pAPLI->hWnd) != NULL) ||
(GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) || (GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
@ -402,7 +401,7 @@ static int CALLBACK ApplicationPageCompareFunc(LPARAM lParam1, LPARAM lParam2, L
Param1 = (LPAPPLICATION_PAGE_LIST_ITEM)lParam2; Param1 = (LPAPPLICATION_PAGE_LIST_ITEM)lParam2;
Param2 = (LPAPPLICATION_PAGE_LIST_ITEM)lParam1; Param2 = (LPAPPLICATION_PAGE_LIST_ITEM)lParam1;
} }
return strcmpW(Param1->wszTitle, Param2->wszTitle); return lstrcmpW(Param1->wszTitle, Param2->wszTitle);
} }
static void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam) static void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)

View File

@ -27,7 +27,6 @@
#include <windows.h> #include <windows.h>
#include <commctrl.h> #include <commctrl.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "column.h" #include "column.h"
@ -358,127 +357,127 @@ void SaveColumnSettings(void)
SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMW, i, (LPARAM) &hditem); SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMW, i, (LPARAM) &hditem);
if (strcmpW(text, wszImageName) == 0) if (lstrcmpW(text, wszImageName) == 0)
{ {
TaskManagerSettings.Column_ImageName = TRUE; TaskManagerSettings.Column_ImageName = TRUE;
TaskManagerSettings.ColumnSizeArray[0] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[0] = hditem.cxy;
} }
if (strcmpW(text, wszPID) == 0) if (lstrcmpW(text, wszPID) == 0)
{ {
TaskManagerSettings.Column_PID = TRUE; TaskManagerSettings.Column_PID = TRUE;
TaskManagerSettings.ColumnSizeArray[1] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[1] = hditem.cxy;
} }
if (strcmpW(text, wszUserName) == 0) if (lstrcmpW(text, wszUserName) == 0)
{ {
TaskManagerSettings.Column_UserName = TRUE; TaskManagerSettings.Column_UserName = TRUE;
TaskManagerSettings.ColumnSizeArray[2] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[2] = hditem.cxy;
} }
if (strcmpW(text, wszSessionID) == 0) if (lstrcmpW(text, wszSessionID) == 0)
{ {
TaskManagerSettings.Column_SessionID = TRUE; TaskManagerSettings.Column_SessionID = TRUE;
TaskManagerSettings.ColumnSizeArray[3] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[3] = hditem.cxy;
} }
if (strcmpW(text, wszCPU) == 0) if (lstrcmpW(text, wszCPU) == 0)
{ {
TaskManagerSettings.Column_CPUUsage = TRUE; TaskManagerSettings.Column_CPUUsage = TRUE;
TaskManagerSettings.ColumnSizeArray[4] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[4] = hditem.cxy;
} }
if (strcmpW(text, wszCPUTime) == 0) if (lstrcmpW(text, wszCPUTime) == 0)
{ {
TaskManagerSettings.Column_CPUTime = TRUE; TaskManagerSettings.Column_CPUTime = TRUE;
TaskManagerSettings.ColumnSizeArray[5] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[5] = hditem.cxy;
} }
if (strcmpW(text, wszMemUsage) == 0) if (lstrcmpW(text, wszMemUsage) == 0)
{ {
TaskManagerSettings.Column_MemoryUsage = TRUE; TaskManagerSettings.Column_MemoryUsage = TRUE;
TaskManagerSettings.ColumnSizeArray[6] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[6] = hditem.cxy;
} }
if (strcmpW(text, wszPeakMemUsage) == 0) if (lstrcmpW(text, wszPeakMemUsage) == 0)
{ {
TaskManagerSettings.Column_PeakMemoryUsage = TRUE; TaskManagerSettings.Column_PeakMemoryUsage = TRUE;
TaskManagerSettings.ColumnSizeArray[7] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[7] = hditem.cxy;
} }
if (strcmpW(text, wszMemDelta) == 0) if (lstrcmpW(text, wszMemDelta) == 0)
{ {
TaskManagerSettings.Column_MemoryUsageDelta = TRUE; TaskManagerSettings.Column_MemoryUsageDelta = TRUE;
TaskManagerSettings.ColumnSizeArray[8] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[8] = hditem.cxy;
} }
if (strcmpW(text, wszPageFaults) == 0) if (lstrcmpW(text, wszPageFaults) == 0)
{ {
TaskManagerSettings.Column_PageFaults = TRUE; TaskManagerSettings.Column_PageFaults = TRUE;
TaskManagerSettings.ColumnSizeArray[9] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[9] = hditem.cxy;
} }
if (strcmpW(text, wszPFDelta) == 0) if (lstrcmpW(text, wszPFDelta) == 0)
{ {
TaskManagerSettings.Column_PageFaultsDelta = TRUE; TaskManagerSettings.Column_PageFaultsDelta = TRUE;
TaskManagerSettings.ColumnSizeArray[10] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[10] = hditem.cxy;
} }
if (strcmpW(text, wszVMSize) == 0) if (lstrcmpW(text, wszVMSize) == 0)
{ {
TaskManagerSettings.Column_VirtualMemorySize = TRUE; TaskManagerSettings.Column_VirtualMemorySize = TRUE;
TaskManagerSettings.ColumnSizeArray[11] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[11] = hditem.cxy;
} }
if (strcmpW(text, wszPagedPool) == 0) if (lstrcmpW(text, wszPagedPool) == 0)
{ {
TaskManagerSettings.Column_PagedPool = TRUE; TaskManagerSettings.Column_PagedPool = TRUE;
TaskManagerSettings.ColumnSizeArray[12] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[12] = hditem.cxy;
} }
if (strcmpW(text, wszNPPool) == 0) if (lstrcmpW(text, wszNPPool) == 0)
{ {
TaskManagerSettings.Column_NonPagedPool = TRUE; TaskManagerSettings.Column_NonPagedPool = TRUE;
TaskManagerSettings.ColumnSizeArray[13] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[13] = hditem.cxy;
} }
if (strcmpW(text, wszBasePri) == 0) if (lstrcmpW(text, wszBasePri) == 0)
{ {
TaskManagerSettings.Column_BasePriority = TRUE; TaskManagerSettings.Column_BasePriority = TRUE;
TaskManagerSettings.ColumnSizeArray[14] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[14] = hditem.cxy;
} }
if (strcmpW(text, wszHandles) == 0) if (lstrcmpW(text, wszHandles) == 0)
{ {
TaskManagerSettings.Column_HandleCount = TRUE; TaskManagerSettings.Column_HandleCount = TRUE;
TaskManagerSettings.ColumnSizeArray[15] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[15] = hditem.cxy;
} }
if (strcmpW(text, wszThreads) == 0) if (lstrcmpW(text, wszThreads) == 0)
{ {
TaskManagerSettings.Column_ThreadCount = TRUE; TaskManagerSettings.Column_ThreadCount = TRUE;
TaskManagerSettings.ColumnSizeArray[16] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[16] = hditem.cxy;
} }
if (strcmpW(text, wszUSERObjects) == 0) if (lstrcmpW(text, wszUSERObjects) == 0)
{ {
TaskManagerSettings.Column_USERObjects = TRUE; TaskManagerSettings.Column_USERObjects = TRUE;
TaskManagerSettings.ColumnSizeArray[17] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[17] = hditem.cxy;
} }
if (strcmpW(text, wszGDIObjects) == 0) if (lstrcmpW(text, wszGDIObjects) == 0)
{ {
TaskManagerSettings.Column_GDIObjects = TRUE; TaskManagerSettings.Column_GDIObjects = TRUE;
TaskManagerSettings.ColumnSizeArray[18] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[18] = hditem.cxy;
} }
if (strcmpW(text, wszIOReads) == 0) if (lstrcmpW(text, wszIOReads) == 0)
{ {
TaskManagerSettings.Column_IOReads = TRUE; TaskManagerSettings.Column_IOReads = TRUE;
TaskManagerSettings.ColumnSizeArray[19] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[19] = hditem.cxy;
} }
if (strcmpW(text, wszIOWrites) == 0) if (lstrcmpW(text, wszIOWrites) == 0)
{ {
TaskManagerSettings.Column_IOWrites = TRUE; TaskManagerSettings.Column_IOWrites = TRUE;
TaskManagerSettings.ColumnSizeArray[20] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[20] = hditem.cxy;
} }
if (strcmpW(text, wszIOOther) == 0) if (lstrcmpW(text, wszIOOther) == 0)
{ {
TaskManagerSettings.Column_IOOther = TRUE; TaskManagerSettings.Column_IOOther = TRUE;
TaskManagerSettings.ColumnSizeArray[21] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[21] = hditem.cxy;
} }
if (strcmpW(text, wszIOReadBytes) == 0) if (lstrcmpW(text, wszIOReadBytes) == 0)
{ {
TaskManagerSettings.Column_IOReadBytes = TRUE; TaskManagerSettings.Column_IOReadBytes = TRUE;
TaskManagerSettings.ColumnSizeArray[22] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[22] = hditem.cxy;
} }
if (strcmpW(text, wszIOWriteBytes) == 0) if (lstrcmpW(text, wszIOWriteBytes) == 0)
{ {
TaskManagerSettings.Column_IOWriteBytes = TRUE; TaskManagerSettings.Column_IOWriteBytes = TRUE;
TaskManagerSettings.ColumnSizeArray[23] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[23] = hditem.cxy;
} }
if (strcmpW(text, wszIOOtherBytes) == 0) if (lstrcmpW(text, wszIOOtherBytes) == 0)
{ {
TaskManagerSettings.Column_IOOtherBytes = TRUE; TaskManagerSettings.Column_IOOtherBytes = TRUE;
TaskManagerSettings.ColumnSizeArray[24] = hditem.cxy; TaskManagerSettings.ColumnSizeArray[24] = hditem.cxy;
@ -546,55 +545,55 @@ void UpdateColumnDataHints(void)
SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMW, Index, (LPARAM) &hditem); SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMW, Index, (LPARAM) &hditem);
if (strcmpW(text, wszImageName) == 0) if (lstrcmpW(text, wszImageName) == 0)
ColumnDataHints[Index] = COLUMN_IMAGENAME; ColumnDataHints[Index] = COLUMN_IMAGENAME;
if (strcmpW(text, wszPID) == 0) if (lstrcmpW(text, wszPID) == 0)
ColumnDataHints[Index] = COLUMN_PID; ColumnDataHints[Index] = COLUMN_PID;
if (strcmpW(text, wszUserName) == 0) if (lstrcmpW(text, wszUserName) == 0)
ColumnDataHints[Index] = COLUMN_USERNAME; ColumnDataHints[Index] = COLUMN_USERNAME;
if (strcmpW(text, wszSessionID) == 0) if (lstrcmpW(text, wszSessionID) == 0)
ColumnDataHints[Index] = COLUMN_SESSIONID; ColumnDataHints[Index] = COLUMN_SESSIONID;
if (strcmpW(text, wszCPU) == 0) if (lstrcmpW(text, wszCPU) == 0)
ColumnDataHints[Index] = COLUMN_CPUUSAGE; ColumnDataHints[Index] = COLUMN_CPUUSAGE;
if (strcmpW(text, wszCPUTime) == 0) if (lstrcmpW(text, wszCPUTime) == 0)
ColumnDataHints[Index] = COLUMN_CPUTIME; ColumnDataHints[Index] = COLUMN_CPUTIME;
if (strcmpW(text, wszMemUsage) == 0) if (lstrcmpW(text, wszMemUsage) == 0)
ColumnDataHints[Index] = COLUMN_MEMORYUSAGE; ColumnDataHints[Index] = COLUMN_MEMORYUSAGE;
if (strcmpW(text, wszPeakMemUsage) == 0) if (lstrcmpW(text, wszPeakMemUsage) == 0)
ColumnDataHints[Index] = COLUMN_PEAKMEMORYUSAGE; ColumnDataHints[Index] = COLUMN_PEAKMEMORYUSAGE;
if (strcmpW(text, wszMemDelta) == 0) if (lstrcmpW(text, wszMemDelta) == 0)
ColumnDataHints[Index] = COLUMN_MEMORYUSAGEDELTA; ColumnDataHints[Index] = COLUMN_MEMORYUSAGEDELTA;
if (strcmpW(text, wszPageFaults) == 0) if (lstrcmpW(text, wszPageFaults) == 0)
ColumnDataHints[Index] = COLUMN_PAGEFAULTS; ColumnDataHints[Index] = COLUMN_PAGEFAULTS;
if (strcmpW(text, wszPFDelta) == 0) if (lstrcmpW(text, wszPFDelta) == 0)
ColumnDataHints[Index] = COLUMN_PAGEFAULTSDELTA; ColumnDataHints[Index] = COLUMN_PAGEFAULTSDELTA;
if (strcmpW(text, wszVMSize) == 0) if (lstrcmpW(text, wszVMSize) == 0)
ColumnDataHints[Index] = COLUMN_VIRTUALMEMORYSIZE; ColumnDataHints[Index] = COLUMN_VIRTUALMEMORYSIZE;
if (strcmpW(text, wszPagedPool) == 0) if (lstrcmpW(text, wszPagedPool) == 0)
ColumnDataHints[Index] = COLUMN_PAGEDPOOL; ColumnDataHints[Index] = COLUMN_PAGEDPOOL;
if (strcmpW(text, wszNPPool) == 0) if (lstrcmpW(text, wszNPPool) == 0)
ColumnDataHints[Index] = COLUMN_NONPAGEDPOOL; ColumnDataHints[Index] = COLUMN_NONPAGEDPOOL;
if (strcmpW(text, wszBasePri) == 0) if (lstrcmpW(text, wszBasePri) == 0)
ColumnDataHints[Index] = COLUMN_BASEPRIORITY; ColumnDataHints[Index] = COLUMN_BASEPRIORITY;
if (strcmpW(text, wszHandles) == 0) if (lstrcmpW(text, wszHandles) == 0)
ColumnDataHints[Index] = COLUMN_HANDLECOUNT; ColumnDataHints[Index] = COLUMN_HANDLECOUNT;
if (strcmpW(text, wszThreads) == 0) if (lstrcmpW(text, wszThreads) == 0)
ColumnDataHints[Index] = COLUMN_THREADCOUNT; ColumnDataHints[Index] = COLUMN_THREADCOUNT;
if (strcmpW(text, wszUSERObjects) == 0) if (lstrcmpW(text, wszUSERObjects) == 0)
ColumnDataHints[Index] = COLUMN_USEROBJECTS; ColumnDataHints[Index] = COLUMN_USEROBJECTS;
if (strcmpW(text, wszGDIObjects) == 0) if (lstrcmpW(text, wszGDIObjects) == 0)
ColumnDataHints[Index] = COLUMN_GDIOBJECTS; ColumnDataHints[Index] = COLUMN_GDIOBJECTS;
if (strcmpW(text, wszIOReads) == 0) if (lstrcmpW(text, wszIOReads) == 0)
ColumnDataHints[Index] = COLUMN_IOREADS; ColumnDataHints[Index] = COLUMN_IOREADS;
if (strcmpW(text, wszIOWrites) == 0) if (lstrcmpW(text, wszIOWrites) == 0)
ColumnDataHints[Index] = COLUMN_IOWRITES; ColumnDataHints[Index] = COLUMN_IOWRITES;
if (strcmpW(text, wszIOOther) == 0) if (lstrcmpW(text, wszIOOther) == 0)
ColumnDataHints[Index] = COLUMN_IOOTHER; ColumnDataHints[Index] = COLUMN_IOOTHER;
if (strcmpW(text, wszIOReadBytes) == 0) if (lstrcmpW(text, wszIOReadBytes) == 0)
ColumnDataHints[Index] = COLUMN_IOREADBYTES; ColumnDataHints[Index] = COLUMN_IOREADBYTES;
if (strcmpW(text, wszIOWriteBytes) == 0) if (lstrcmpW(text, wszIOWriteBytes) == 0)
ColumnDataHints[Index] = COLUMN_IOWRITEBYTES; ColumnDataHints[Index] = COLUMN_IOWRITEBYTES;
if (strcmpW(text, wszIOOtherBytes) == 0) if (lstrcmpW(text, wszIOOtherBytes) == 0)
ColumnDataHints[Index] = COLUMN_IOOTHERBYTES; ColumnDataHints[Index] = COLUMN_IOOTHERBYTES;
} }
} }

View File

@ -28,7 +28,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"

View File

@ -28,7 +28,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"

View File

@ -28,7 +28,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"
@ -82,15 +81,15 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
*/ */
if (CpuUsage == 100) if (CpuUsage == 100)
{ {
sprintfW(Text, wszFormatI, (int)CpuUsage); swprintf(Text, wszFormatI, (int)CpuUsage);
} }
else if (CpuUsage < 10) else if (CpuUsage < 10)
{ {
sprintfW(Text, wszFormatII, (int)CpuUsage); swprintf(Text, wszFormatII, (int)CpuUsage);
} }
else else
{ {
sprintfW(Text, wszFormatIII, (int)CpuUsage); swprintf(Text, wszFormatIII, (int)CpuUsage);
} }
/* /*
@ -252,13 +251,13 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
CommitChargeTotal = (ULONGLONG)PerfDataGetCommitChargeTotalK(); CommitChargeTotal = (ULONGLONG)PerfDataGetCommitChargeTotalK();
CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK(); CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK();
sprintfW(Text, wszFormat, (int)CommitChargeTotal); swprintf(Text, wszFormat, (int)CommitChargeTotal);
/* /*
* Draw the font text onto the graph * Draw the font text onto the graph
* The bottom 20 pixels are reserved for the text * The bottom 20 pixels are reserved for the text
*/ */
Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (strlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5); Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (lstrlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5);
/* /*
* Now we have to draw the graph * Now we have to draw the graph

View File

@ -28,7 +28,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"
#include "graphctl.h" #include "graphctl.h"

View File

@ -28,7 +28,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"

View File

@ -28,7 +28,6 @@
#include <commctrl.h> #include <commctrl.h>
#include <winnt.h> #include <winnt.h>
#include "wine/unicode.h"
#include "resource.h" #include "resource.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"
@ -727,8 +726,8 @@ LPWSTR GetLastErrorText(LPWSTR lpwszBuf, DWORD dwSize)
if (!dwRet || ( dwSize < dwRet+14)) { if (!dwRet || ( dwSize < dwRet+14)) {
lpwszBuf[0] = '\0'; lpwszBuf[0] = '\0';
} else { } else {
lpwszTemp[strlenW(lpwszTemp)-2] = '\0'; /* remove cr and newline character */ lpwszTemp[lstrlenW(lpwszTemp)-2] = '\0'; /* remove cr and newline character */
sprintfW(lpwszBuf, wszFormat, lpwszTemp, GetLastError()); swprintf(lpwszBuf, wszFormat, lpwszTemp, GetLastError());
} }
if (lpwszTemp) { if (lpwszTemp) {
LocalFree(lpwszTemp); LocalFree(lpwszTemp);

View File

@ -28,7 +28,6 @@
#include <winnt.h> #include <winnt.h>
#include <shellapi.h> #include <shellapi.h>
#include "wine/unicode.h"
#include "taskmgr.h" #include "taskmgr.h"
#include "perfdata.h" #include "perfdata.h"