RtlStringExValidateDestAndLengthA - NtDoc

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

NTSTRSAFEWORKERDDI
RtlStringExValidateDestAndLengthA(
    _In_reads_opt_(cchDest) NTSTRSAFE_PCSTR pszDest,
    _In_ size_t cchDest,
    _Out_ _Deref_out_range_(0, (cchDest>0?cchDest-1:0)) size_t* pcchDestLength,
    _In_ const size_t cchMax,
    _In_ DWORD dwFlags);

#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)

NTSTRSAFEWORKERDDI
    RtlStringExValidateDestAndLengthA(
            _In_reads_opt_(cchDest) NTSTRSAFE_PCSTR pszDest,
            _In_ size_t cchDest,
            _Out_ _Deref_out_range_(0, (cchDest>0?cchDest-1:0)) size_t* pcchDestLength,
            _In_ const size_t cchMax,
            _In_ DWORD dwFlags)
{
    NTSTATUS status;

    if (dwFlags & STRSAFE_IGNORE_NULLS)
    {
        status = RtlStringExValidateDestA(pszDest, cchDest, cchMax, dwFlags);

        if (!NT_SUCCESS(status) || (cchDest == 0))
        {
            *pcchDestLength = 0;
        }
        else
        {
            status = RtlStringLengthWorkerA(pszDest, cchDest, pcchDestLength);
        }
    }
    else
    {
        status = RtlStringValidateDestAndLengthA(pszDest,
                cchDest,
                pcchDestLength,
                cchMax);
    }

    return status;
}

#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 RtlStringExValidateDestAndLengthA  RtlStringExValidateDestAndLengthA_do_not_call_this_function

#endif
#endif

View code on GitHub

No description available.