UniLocaleTokenToStr: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== | Convert a locale token to a locale specific string. | ||
=== Syntax === | |||
UniLocaleTokenToStr(localeToken, localeStrType, result); | |||
=== Parameters === | === Parameters === | ||
; localeToken - [[ | ; localeToken - [[LocaleToken]] - input : A locale token. | ||
; localeStrType - integer - input : Requested string locale format. | ; localeStrType - integer - input : Requested string locale format. | ||
; result - [[ | ; result - [[PVOID]] - output : The result of the locale conversion. | ||
=== Constants === | === Constants === | ||
These constants are for localeStrType. | These constants are for localeStrType. | ||
* [[ | *[[UNI#UNI_MBS_STRING_POINTER|UNI_MBS_STRING_POINTER]] | ||
* [[ | *[[UNI#UNI_UCS_STRING_POINTER|UNI_UCS_STRING_POINTER]] | ||
=== Returns === | === Returns === | ||
An integer with values of: | An integer with values of: | ||
* [[ | *[[Unicode Errors|ULS_INVALID]] | ||
* [[ | *[[Unicode Errors|ULS_NOMEMORY]] | ||
* [[ | *[[Unicode Errors|ULS_SUCCESS]] | ||
=== Calling Convention === | |||
=== Calling | |||
[[Cdecl32]] | [[Cdecl32]] | ||
=== Example Code === | === Example Code === | ||
LocaleToken localeToken; | |||
integer localeStrType; | integer localeStrType; | ||
PVOID result; | |||
integer rc; | integer rc; | ||
... | ... | ||
rc = UniLocaleTokenToStr(localeToken, localeStrType, result); | rc = UniLocaleTokenToStr(localeToken, localeStrType, result); | ||
... | ... | ||
=== Notes === | === Notes === | ||
'''UniLocaleTokenToStr''' allocates the memory for the result of the locale string conversion. It is the responsibility to call '''UniFreeMem''' when it is no longer needed. If no local string can be generated for the given token, the value returned is undefined. | |||
=== OS Version Introduced === | === OS Version Introduced === | ||
OS/2 Warp | OS/2 Warp | ||
== Related Functions == | |||
*[[UniLocaleStrToToken]] | |||
[[Category:Uni]] | |||
[[Category: |
Latest revision as of 18:50, 26 July 2017
Convert a locale token to a locale specific string.
Syntax
UniLocaleTokenToStr(localeToken, localeStrType, result);
Parameters
- localeToken - LocaleToken - input
- A locale token.
- localeStrType - integer - input
- Requested string locale format.
- result - PVOID - output
- The result of the locale conversion.
Constants
These constants are for localeStrType.
Returns
An integer with values of:
Calling Convention
Example Code
LocaleToken localeToken; integer localeStrType; PVOID result; integer rc; ... rc = UniLocaleTokenToStr(localeToken, localeStrType, result); ...
Notes
UniLocaleTokenToStr allocates the memory for the result of the locale string conversion. It is the responsibility to call UniFreeMem when it is no longer needed. If no local string can be generated for the given token, the value returned is undefined.
OS Version Introduced
OS/2 Warp