RtlGetActiveConsoleId - NtDoc

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

// rev
FORCEINLINE
ULONG
NTAPI
RtlGetActiveConsoleId(
    VOID
    )
{
    if (NtCurrentPeb()->SharedData && NtCurrentPeb()->SharedData->ServiceSessionId)
        return NtCurrentPeb()->SharedData->ActiveConsoleId;
    else
        return USER_SHARED_DATA->ActiveConsoleId;
}

#endif
#endif

View code on GitHub
#ifndef _NTRTL_H
#ifdef PHNT_INLINE_TYPEDEFS
// ...
#else

// private
NTSYSAPI
ULONG
NTAPI
RtlGetActiveConsoleId(
    VOID
    );

#endif
#endif

View code on GitHub

No description available.