Jump to content

UniLocaleTokenToStr: Difference between revisions

From EDM2
m fixed typo
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== UniLocaleTokenToStr ==
Convert a locale token to a locale specific string.
; UniLocaleTokenToStr(localeToken, localeStrType, result) : Convert a locale token to a locale specific string.
 
=== Syntax ===
UniLocaleTokenToStr(localeToken, localeStrType, result);


=== Parameters ===
=== Parameters ===
; localeToken - [[OS2 API:DataType:LocaleToken|LocaleToken]] - input : A locale token.
; localeToken - [[LocaleToken]] - input : A locale token.
; localeStrType - integer - input : Requested string locale format.
; localeStrType - integer - input : Requested string locale format.
; result - [[OS2 API:DataType:PVOID|PVOID]] - output : The result of the locale conversion.
; result - [[PVOID]] - output : The result of the locale conversion.


=== Constants ===
=== Constants ===
These constants are for localeStrType.
These constants are for localeStrType.
* [[OS2 API:Constants:UNI#UNI_MBS_STRING_POINTER|UNI_MBS_STRING_POINTER]]
*[[UNI#UNI_MBS_STRING_POINTER|UNI_MBS_STRING_POINTER]]
* [[OS2 API:Constants:UNI#UNI_UCS_STRING_POINTER|UNI_UCS_STRING_POINTER]]
*[[UNI#UNI_UCS_STRING_POINTER|UNI_UCS_STRING_POINTER]]


=== Returns ===
=== Returns ===
An integer with values of:
An integer with values of:
* [[OS2 API:Unicode:error#ULS_INVALID|ULS_INVALID]]
*[[Unicode Errors|ULS_INVALID]]
* [[OS2 API:Unicode:error#ULS_NOMEMORY|ULS_NOMEMORY]]
*[[Unicode Errors|ULS_NOMEMORY]]
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
*[[Unicode Errors|ULS_SUCCESS]]
 
=== Module ===
 
=== Define (C/C++) ===


=== Export name/Ordinal ===
=== Calling Convention ===
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:LocaleToken|LocaleToken]] localeToken;
  LocaleToken localeToken;
  integer    localeStrType;
  integer    localeStrType;
  [[OS2 API:DataType:PVOID|PVOID]]       result;
  PVOID      result;
  integer    rc;
  integer    rc;
  ...
  ...
  rc = UniLocaleTokenToStr(localeToken, localeStrType, result);
  rc = UniLocaleTokenToStr(localeToken, localeStrType, result);
  ...
  ...
=== Related Functions ===
[[OS2 API:UniLocaleStrToToken|UniLocaleStrToToken]]


=== Notes ===
=== Notes ===
[[OS2 API:UniLocaleTokenToStr|UniLocaleTokenToStr]] allocates the memory for the result of the locale string conversion. It is the responsibility to call [[OS2 API:UniFreeMem|UniFreeMem]] when it is no longer needed. If no local string can be generated for the given token, the value returned is undefined.
'''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]]

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

Cdecl32

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

Related Functions