Retrieves information about the current version of a specified NLS capability for a locale specified by name.
Note
The application should call this function in preference to GetNLSVersion if designed to run only on Windows Vista and later.
BOOL GetNLSVersionEx(
NLS_FUNCTION function,
LPCWSTR lpLocaleName,
LPNLSVERSIONINFOEX lpVersionInformation
)
function
Type: NLS_FUNCTION
The NLS capability to query. This value must be COMPARE_STRING. See the SYSNLS_FUNCTION enumeration.
lpLocaleName
Type: LPCWSTR
Pointer to a locale name, or one of the following predefined values.
lpVersionInformation
Type: LPNLSVERSIONINFOEX
Pointer to an NLSVERSIONINFOEX structure. The application must initialize the dwNLSVersionInfoSize member to sizeof(NLSVERSIONINFOEX).
Note
On Windows Vista and later, the function can alternatively provide version information in an NLSVERSIONINFO structure.
Type: BOOL
Returns TRUE if and only if the application has supplied valid values in lpVersionInformation, or FALSE otherwise. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
This function allows an application such as Active Directory to determine if an NLS change affects the locale used for a particular index table. If it does not, there is no need to re-index the table. For more information, see Handling Sorting in Your Applications. In particular, to tell if a sort version changed and you need to reindex:
This is covered in more detail in the blog entry “How to tell if the collation version changed” (http://blogs.msdn.com/shawnste/archive/2007/06/01/how-to-tell-if-the-collation-version-changed.aspx).
This function supports custom locales. If lpLocaleName specifies a supplemental locale, the data retrieved is the correct data for the sort order associated with that supplemental locale.
Beginning in Windows 8: If your app passes language tags to this function from the Windows.Globalization namespace, it must first convert the tags by calling ResolveLocaleName.
Header: Declared in winnls.h.
Library: Use kernelx.lib.