Takes a variable-length argument list 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 wnsprintf(
LPTSTR lpOut,
int cchLimitIn,
LPCTSTR pszFmt,
...
);
Parameters
- lpOut
-
[out] A buffer to hold the output string.
- cchLimitIn
-
[in] The maximum number of characters allowed in lpOut.
- pszFmt
-
[in] 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".
- ...
-
[in] The additional parameters containing the data to be output.
Return Value
Returns the number of characters written to the buffer, excluding any terminating NULL characters. A negative value is returned if an error occurs.
Remarks
This is a Microsoft Windows version of sprintf. It does not support floating point or pointer types. It supports only the left alignment flag.
Function Information
| Minimum DLL Version | shlwapi.dll version 5.0 or later |
|---|
| Custom Implementation | No |
|---|
| Header | shlwapi.h |
|---|
| Import library | shlwapi.lib |
|---|
| Minimum operating systems |
Windows 2000, Windows NT 4.0 with Internet Explorer 5, Windows 98, Windows 95 with Internet Explorer 5 |
|---|
| Unicode | Implemented as
ANSI and Unicode versions. |
|---|