Skip to content

Latest commit

 

History

History
106 lines (76 loc) · 4.16 KB

nf-winnls-getuserdefaultlocalename.md

File metadata and controls

106 lines (76 loc) · 4.16 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winnls.GetUserDefaultLocaleName
GetUserDefaultLocaleName function (winnls.h)
Retrieves the user default locale name.Note  The application should call this function in preference to GetUserDefaultLCID if designed to run only on Windows Vista and later.
GetUserDefaultLocaleName
GetUserDefaultLocaleName function [Internationalization for Windows Applications]
_win32_GetUserDefaultLocaleName
intl.getuserdefaultlocalename
winnls/GetUserDefaultLocaleName
intl\getuserdefaultlocalename.htm
Intl
81b896de-1f06-4315-aa64-90806c0fed75
12/05/2018
GetUserDefaultLocaleName, GetUserDefaultLocaleName function [Internationalization for Windows Applications], _win32_GetUserDefaultLocaleName, intl.getuserdefaultlocalename, winnls/GetUserDefaultLocaleName
winnls.h
Windows.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Kernel32.lib
Kernel32.dll
Windows
19H1
GetUserDefaultLocaleName
winnls/GetUserDefaultLocaleName
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-Localization-l1-2-0.dll
KernelBase.dll
API-MS-Win-Core-Localization-l1-2-1.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
API-MS-Win-Core-Localization-L1-2-2.dll
GetUserDefaultLocaleName

GetUserDefaultLocaleName function

-description

Retrieves the user default locale name.

Note  The application should call this function in preference to GetUserDefaultLCID if designed to run only on Windows Vista and later.

 

-parameters

-param lpLocaleName [out]

Pointer to a buffer in which this function retrieves the locale name.

-param cchLocaleName [in]

Size, in characters, of the buffer indicated by lpLocaleName. The maximum possible length of a locale name, including a terminating null character, is LOCALE_NAME_MAX_LENGTH. This is the recommended size to supply in this parameter.

-returns

Returns the size of the buffer containing the locale name, including the terminating null character, if successful.

Note  On single-user systems, the return value is the same as that returned by GetSystemDefaultLocaleName.

 

The function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes:

  • ERROR_INSUFFICIENT_BUFFER. A supplied buffer size was not large enough, or it was incorrectly set to NULL.

-remarks

This function can retrieve data from custom locales. Data is not guaranteed to be the same from computer to computer or between runs of an application. If your application must persist or transmit data, see Using Persistent Locale Data.

-see-also

GetLocaleInfoEx

GetSystemDefaultLocaleName

GetUserDefaultLCID

National Language Support

National Language Support Functions