#ifndef _NTSTRSAFE_H_INCLUDED_
#ifndef NTSTRSAFE_NO_UNICODE_STRING_FUNCTIONS
NTSTRSAFEWORKERDDI
RtlStringCopyWideCharArrayWorker(
_Out_writes_(cchDest) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cchDest,
_Out_opt_ size_t* pcchNewDestLength,
_In_reads_(cchSrcLength) const wchar_t* pszSrc,
_In_ size_t cchSrcLength);
View code on GitHub
#ifndef _NTSTRSAFE_H_INCLUDED_
// Below here are the worker functions that actually do the work
#if defined(NTSTRSAFE_LIB_IMPL) || !defined(NTSTRSAFE_LIB)
#ifndef NTSTRSAFE_NO_UNICODE_STRING_FUNCTIONS
NTSTRSAFEWORKERDDI
RtlStringCopyWideCharArrayWorker(
_Out_writes_(cchDest) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cchDest,
_Out_opt_ size_t* pcchNewDestLength,
_In_reads_(cchSrcLength) const wchar_t* pszSrc,
_In_ size_t cchSrcLength)
{
NTSTATUS status = STATUS_SUCCESS;
size_t cchNewDestLength = 0;
// ASSERT(cchDest != 0);
while (cchDest && cchSrcLength)
{
*pszDest++ = *pszSrc++;
cchDest--;
cchSrcLength--;
cchNewDestLength++;
}
if (cchDest == 0)
{
// we are going to truncate pszDest
pszDest--;
cchNewDestLength--;
status = STATUS_BUFFER_OVERFLOW;
}
*pszDest = L'\0';
if (pcchNewDestLength)
{
*pcchNewDestLength = cchNewDestLength;
}
return status;
}
View code on GitHub
#ifndef _NTSTRSAFE_H_INCLUDED_
// Do not call these functions, they are worker functions for internal use within this file
#ifdef DEPRECATE_SUPPORTED
// ...
#else
#define RtlStringCopyWideCharArrayWorker RtlStringCopyWideCharArrayWorker_instead_use_RtlStringCchCopyUnicodeString_or_RtlStringCbCopyUnicodeString
View code on GitHub
No description available.