VerLanguageNameW function (winver.h)
Retrieves a description string for the language associated with a specified binary Microsoft language identifier.
Syntax
DWORD VerLanguageNameW(
[in] DWORD wLang,
[out] LPWSTR szLang,
[in] DWORD cchLang
);
Parameters
[in] wLang
Type: DWORD
The binary language identifier. For a complete list of the language identifiers, see Language Identifiers.
For example, the description string associated with the language identifier 0x040A is "Spanish (Traditional Sort)". If the identifier is unknown, the szLang parameter points to a default string ("Language Neutral").
[out] szLang
Type: LPTSTR
The language specified by the wLang parameter.
[in] cchLang
Type: DWORD
The size, in characters, of the buffer pointed to by szLang.
Return value
Type: DWORD
The return value is the size, in characters, of the string returned in the buffer. This value does not include the terminating null character. If the description string is smaller than or equal to the buffer, the entire description string is in the buffer. If the description string is larger than the buffer, the description string is truncated to the length of the buffer.
If an error occurs, the return value is zero. Unknown language identifiers do not produce errors.
Remarks
This function works on 16-, 32-, and 64-bit file images.
Typically, an installation program uses this function to translate a language identifier returned by the VerQueryValue function. The text string may be used in a dialog box that asks the user how to proceed in the event of a language conflict.
Note
The winver.h header defines VerLanguageName as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winver.h (include Windows.h) |
Library | Version.lib |
DLL | Api-ms-win-core-localization-l1-2-1.dll |