This documentation is archived and is not being maintained.
VarFormatFromTokens Function
Takes the output of VarTokenizeFormatString as a format and applies it to a variant to produce a formatted output string.
HRESULT VarFormatFromTokens(
LPVARIANT pvarIn,
LPOLESTR pstrFormat,
LBYTE pbTokCur,
ULONG dwFlags,
BSTR *pbstrOut,
LCID lcid
);
- pvarIn
[in] The variant containing the value to format.
- pstrFormat
[in] The original format string.
- pbTokCur
[in] The tokenized format string from VarTokenizeFormatString.
- dwFlags
[in] Flags that control the formatting process. 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.
The function returns one of the following:
Return value | Meaning |
|---|
S_OK | Success. |
E_OUTOFMEMORY | Out of memory. |
E_INVALIDARG | One or more of the arguments is invalid. |
DISP_E_TYPEMISMATCH | The argument could not be coerced to the specified type. |
The locale lcidcontrols the formatted output string.