diff --git a/reactos/base/applications/mscutils/servman/precomp.h b/reactos/base/applications/mscutils/servman/precomp.h index 4a63984bdfa..73ec61583b1 100644 --- a/reactos/base/applications/mscutils/servman/precomp.h +++ b/reactos/base/applications/mscutils/servman/precomp.h @@ -14,6 +14,7 @@ #include #include #include +#include #include "resource.h" diff --git a/reactos/base/applications/mscutils/servman/propsheet_depends.c b/reactos/base/applications/mscutils/servman/propsheet_depends.c index 01ebd0dca05..52afc515330 100644 --- a/reactos/base/applications/mscutils/servman/propsheet_depends.c +++ b/reactos/base/applications/mscutils/servman/propsheet_depends.c @@ -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; } } diff --git a/reactos/base/applications/mscutils/servman/query.c b/reactos/base/applications/mscutils/servman/query.c index 69f0343ca0e..14a68e5a938 100644 --- a/reactos/base/applications/mscutils/servman/query.c +++ b/reactos/base/applications/mscutils/servman/query.c @@ -183,9 +183,9 @@ GetServiceDescription(LPTSTR lpServiceName) dwSize * sizeof(TCHAR)); if (lpDescription) { - _tcscpy_s(lpDescription, - dwSize, - pServiceDescription->lpDescription); + StringCchCopy(lpDescription, + dwSize, + pServiceDescription->lpDescription); } } } diff --git a/reactos/base/applications/mscutils/servman/stop_dependencies.c b/reactos/base/applications/mscutils/servman/stop_dependencies.c index 5ef227663f6..559002c6073 100644 --- a/reactos/base/applications/mscutils/servman/stop_dependencies.c +++ b/reactos/base/applications/mscutils/servman/stop_dependencies.c @@ -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';