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.

wvnsprintf function

Takes a list of arguments and returns the values of the arguments as a printf-style formatted string.

Note  Do not use this function. See Remarks for alternative functions.
 

Syntax


int wvnsprintf(
  _Out_ PTSTR   pszDest,
  _In_  int     cchDest,
  _In_  PCTSTR  pszFmt,
  _In_  va_list arglist
);

Parameters

pszDest [out]

Type: PTSTR

A pointer to a buffer that, when this function returns successfully, receives the output string.

cchDest [in]

Type: int

The maximum number of characters allowed in pszDest.

pszFmt [in]

Type: PCTSTR

A printf-style format string. The %s format identifier should never be used in an unbounded form. To avoid potential buffer overruns, always specify a size; for instance "%32s".

arglist [in]

Type: va_list

A pointer to a list of command-line parameters used to customize the output.

Return value

Type: int

Returns the number of characters written to the buffer, excluding any terminating NULL characters. A negative value is returned if an error occurs.

Remarks

Security Warning:  Using this function incorrectly can compromise the security of your application. The copied string is not guaranteed to be null-terminated. Consider using one of the following alternatives. StringCbPrintf, StringCbPrintfEx, StringCbVPrintf, StringCbVPrintfEx, StringCchPrintf, StringCchPrintfEx, StringCchVPrintf, or StringCchVPrintfEx. You should review Security Considerations: Microsoft Windows Shell before continuing.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

wvnsprintfW (Unicode) and wvnsprintfA (ANSI)

 

 

Show:
© 2017 Microsoft