mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[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:
@@ -14,6 +14,7 @@
|
||||
#include <wincon.h>
|
||||
#include <tchar.h>
|
||||
#include <shlobj.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,9 +183,9 @@ GetServiceDescription(LPTSTR lpServiceName)
|
||||
dwSize * sizeof(TCHAR));
|
||||
if (lpDescription)
|
||||
{
|
||||
_tcscpy_s(lpDescription,
|
||||
dwSize,
|
||||
pServiceDescription->lpDescription);
|
||||
StringCchCopy(lpDescription,
|
||||
dwSize,
|
||||
pServiceDescription->lpDescription);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user