RtlGetNtSystemRoot - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_REDSTONE2)
#ifdef PHNT_INLINE_TYPEDEFS

// rev
FORCEINLINE
PWSTR
NTAPI
RtlGetNtSystemRoot(
    VOID
    )
{
    if (NtCurrentPeb()->SharedData && NtCurrentPeb()->SharedData->ServiceSessionId) // RtlGetCurrentServiceSessionId
        return NtCurrentPeb()->SharedData->NtSystemRoot;
    else
        return USER_SHARED_DATA->NtSystemRoot;
}

#endif
#endif
#endif

View code on GitHub
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_REDSTONE2)
#ifdef PHNT_INLINE_TYPEDEFS
// ...
#else

// private
NTSYSAPI
PWSTR
NTAPI
RtlGetNtSystemRoot(
    VOID
    );

#endif
#endif
#endif

View code on GitHub

No description available.