VarFormatFromTokens function
Takes a tokenized format string and applies it to a variant to produce a formatted output string.
Syntax
HRESULT VarFormatFromTokens( _In_ LPVARIANT pvarIn, _In_opt_ LPOLESTR pstrFormat, _In_ LPBYTE pbTokCur, _In_ ULONG dwFlags, _Out_ BSTR *pbstrOut, _In_ LCID lcid );
Parameters
- pvarIn [in]
-
The variant containing the value to format.
- pstrFormat [in, optional]
-
The original format string.
- pbTokCur [in]
-
The tokenized format string from VarTokenizeFormatString.
- dwFlags [in]
-
The only flags that can be set are VAR_CALENDAR_HIJRI or VAR_FORMAT_NOSUBSTITUTE.
- pbstrOut [out]
-
The formatted output string.
- lcid [in]
-
The locale to use for the formatted output string.
Return value
This function can return one of these values.
| Return code | Description |
|---|---|
|
Success. |
|
Out of memory. |
|
One or more of the arguments is not valid. |
|
The argument could not be coerced to the specified type. |
Remarks
The locale lcid controls the formatted output string.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|