[SERVMAN]

* Use StringCchCopy instead of {_t,w}cscpy_s as these shouldn't be exported.
CORE-8174

svn path=/trunk/; revision=63458
This commit is contained in:
Amine Khaldi 2014-05-26 09:53:49 +00:00
parent 6215b105d6
commit 0841e6c36d
4 changed files with 11 additions and 10 deletions

View file

@ -14,6 +14,7 @@
#include <wincon.h>
#include <tchar.h>
#include <shlobj.h>
#include <strsafe.h>
#include "resource.h"

View file

@ -60,7 +60,7 @@ AddItemToTreeView(HWND hTreeView,
dwSize * sizeof(TCHAR));
if (lpName)
{
_tcscpy_s(lpName, dwSize, lpServiceName);
StringCchCopy(lpName, dwSize, lpServiceName);
tvi.lParam = (LPARAM)lpName;
}
}

View file

@ -183,9 +183,9 @@ GetServiceDescription(LPTSTR lpServiceName)
dwSize * sizeof(TCHAR));
if (lpDescription)
{
_tcscpy_s(lpDescription,
dwSize,
pServiceDescription->lpDescription);
StringCchCopy(lpDescription,
dwSize,
pServiceDescription->lpDescription);
}
}
}

View file

@ -32,9 +32,9 @@ AddServiceToList(LPWSTR *lpServiceList,
if (lpNewList)
{
/* Copy the service name */
wcscpy_s(lpNewList,
dwToAddSize,
lpServiceToAdd);
StringCchCopy(lpNewList,
dwToAddSize,
lpServiceToAdd);
/* Add the double null char */
lpNewList[dwToAddSize - 1] = L'\0';
@ -68,9 +68,9 @@ AddServiceToList(LPWSTR *lpServiceList,
if (lpNewList)
{
/* Copy the service name */
wcscpy_s(&lpNewList[dwCurSize - 1],
dwToAddSize,
lpServiceToAdd);
StringCchCopy(&lpNewList[dwCurSize - 1],
dwToAddSize,
lpServiceToAdd);
/* Add the double null char */
lpNewList[dwCurSize + dwToAddSize - 1] = L'\0';