RtlWideCharArrayVPrintfWorker - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTSTRSAFE_H_INCLUDED_
#ifndef NTSTRSAFE_NO_UNICODE_STRING_FUNCTIONS

NTSTRSAFEWORKERDDI
RtlWideCharArrayVPrintfWorker(
        _Out_writes_to_(cchDest, *pcchNewDestLength) wchar_t* pszDest,
        _In_ size_t cchDest,
        _Out_ size_t* pcchNewDestLength,
        _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,
        _In_ va_list argList);

#endif
#endif

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
    RtlWideCharArrayVPrintfWorker(
            _Out_writes_to_(cchDest, *pcchNewDestLength) wchar_t* pszDest,
            _In_ size_t cchDest,
            _Out_ size_t* pcchNewDestLength,
            _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,
            _In_ va_list argList)
{
    NTSTATUS status = STATUS_SUCCESS;
    int iRet;

#pragma warning(push)
#pragma warning(disable: __WARNING_BANNED_API_USAGE)// "STRSAFE not included"
    iRet = _vsnwprintf(pszDest, cchDest, pszFormat, argList);
#pragma warning(pop)
    // ASSERT((iRet < 0) || (((size_t)iRet) <= cchMax));

    if ((iRet < 0) || (((size_t)iRet) > cchDest))
    {
        *pcchNewDestLength = cchDest;

        // we have truncated pszDest
        status = STATUS_BUFFER_OVERFLOW;
    }
    else
    {
        *pcchNewDestLength = (size_t)iRet;
    }

    return status;
}

#endif
#endif
#endif

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 RtlWideCharArrayVPrintfWorker       RtlWideCharArrayVPrintfWorker_instead_use_RtlUnicodeStringVPrintf_or_RtlUnicodeStringPrintf

#endif
#endif

View code on GitHub

No description available.