|
pure virtual |
Print formatted wide-character output into a buffer.
This function is a safe replacement for the decprecated swprintf() method. It does not use use varargs and instead takes an array of P6ARG structs. There are helper macros available to help intitialize the P6ARG's (see P6AI_BOOL(), P6AI_CHAR(), P6AI_INT32() etc.).
The format string uses positional notation to allow I18N issues to be easily handled.
position$
Position indicates the argument position in the pArgs argument array that should be rendered. This value begins at 1 (not zero). For example:
"%1$ is the first argument in the array and %2$ is the second"
Notice that they type of the item to be expanded is defined in the pArgs parameter and not specified in the "%1$" format.
pDst | [ out ] The address of the P6WCHAR buffer in which to place the output string. |
cDst | [ in ] The number of characters in pDst |
pcWritten | [ out ] The number of output characters written into pDst |
pszFormat | [ in ] A NULL terminated P6WCHAR string containing the format string to use. |
pArgs | [ in ] The address of an array of P6R::P6ARG structures that define the aruments that are to be expanded. |
cArgs | [ in ] The number of array elements in pArgs. |
Success | P6R::eOk | |
Failure | P6R::eInvalidArg | pDst or pszFormat is NULL, or pDstSize is zero |
P6R::eEndOfRecord | A position was specified that exceeds the number of arguments in the array. | |
P6R::eFormatError | The format string is invalid. Replacements must have the form, 'position$' OR and invalid format type (P6ARGFMT) was specified in the P6ARG array. | |
P6R::eTooSmall | The expanded string would not fit in the specified buffer. |