#ifndef _NTSTRSAFE_H_INCLUDED_
#ifndef NTSTRSAFE_NO_UNICODE_STRING_FUNCTIONS
NTSTRSAFEWORKERDDI
RtlWideCharArrayCopyWorker(
_Out_writes_to_(cchDest, *pcchNewDestLength) wchar_t* pszDest,
_In_ size_t cchDest,
_Out_ 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
RtlWideCharArrayCopyWorker(
_Out_writes_to_(cchDest, *pcchNewDestLength) wchar_t* pszDest,
_In_ size_t cchDest,
_Out_ size_t* pcchNewDestLength,
_In_reads_(cchSrcLength) const wchar_t* pszSrc,
_In_ size_t cchSrcLength)
{
NTSTATUS status = STATUS_SUCCESS;
size_t cchNewDestLength = 0;
while (cchDest && cchSrcLength)
{
*pszDest++ = *pszSrc++;
cchDest--;
cchSrcLength--;
cchNewDestLength++;
}
if ((cchDest == 0) && (cchSrcLength != 0))
{
// we are going to truncate pszDest
status = STATUS_BUFFER_OVERFLOW;
}
*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 RtlWideCharArrayCopyWorker RtlWideCharArrayCopyWorker_instead_use_RtlUnicodeStringCopy_or_RtlUnicodeStringCopyEx
View code on GitHub
No description available.