The wvsprintf function formats and stores a series of characters and values in a buffer. The items pointed to by the argument list are converted and copied to an output buffer according to the corresponding format specification in the format-control string. The function appends a terminating null character to the characters it writes, but the return value does not include the terminating null character in its character count.
int wvsprintf(
LPTSTR lpOutput, // pointer to buffer for output
LPCTSTR lpFormat, // pointer to format-control string
va_list arglist // variable list of format-control arguments
);
If the function succeeds, the return value is the number of characters stored in the buffer, not counting the terminating null character.
If the function fails, the return value is less than the length of the format-control string. To get extended error information, call GetLastError.
The function copies the format-control string into the output buffer character by character, starting with the first character in the string. When it encounters a format specification in the string, the function retrieves the value of the next available argument (starting with the first argument in the list), converts that value into the specified format, and copies the result to the output buffer. The function continues to copy characters and expand format specifications in this way until it reaches the end of the format-control string. If there are more arguments than format specifications, the extra arguments are ignored. If there are not enough arguments for all of the format specifications, the results are undefined.
Windows CE: Windows CE supports only the Unicode version of wvsprintf.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
String Manipulation Overview, String Manipulation Functions, wsprintf