NtQueryDefaultLocale - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

//
// Locale
//

/**
 * The NtQueryDefaultLocale routine retrieves the default locale identifier for either the user profile or the system.
 *
 * \param UserProfile If TRUE, retrieves the user default locale; otherwise, retrieves the system default locale.
 * \param DefaultLocaleId A pointer that receives the resulting locale identifier (LCID).
 * \return NTSTATUS Successful or errant status.
 * \see https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getsystemdefaultlocale
 * \sa https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getuserdefaultlocale
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryDefaultLocale(
    _In_ BOOLEAN UserProfile,
    _Out_ PLCID DefaultLocaleId
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwQueryDefaultLocale(
    _In_ BOOLEAN UserProfile,
    _Out_ PLCID DefaultLocaleId
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

Function NtQueryDefaultLocale returns current Locale Identifier. Locale Identifier if defined as DWORD value, and contains locale code, sublocale etc. For more information about LCID see Microsoft SDK.

UserProfile

If set, function returns UserMode default locale. If not, result is system locale.

DefaultLocaleId

Pointer to LCID value receiving current locale.

Documented by

See also