Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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 codeDescription
S_OK

Success.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

One or more of the arguments is not valid.

DISP_E_TYPEMISMATCH

The argument could not be coerced to the specified type.

 

Remarks

The locale lcid controls the formatted output string.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show:
© 2016 Microsoft