大网数据广告活动
性能与资源

__stdio_common_vsnprintf_s

· 52CE 我爱测

Prints a formatted list of arguments to a character array with a max buffer.

Prints a formatted list of arguments to a character array, with security checks and error handling.

Syntax

int __stdio_common_vsnprintf_s(
    unsigned __int64 const options,
    char*            const buffer,
    size_t           const buffer_count,
    size_t           const max_count,
    char const*      const format,
    _locale_t        const locale,
    va_list          const arglist
    )

Parameters

options
The options that modify the behavior of the function.

buffer
The destination buffer where the formatted output is stored.

buffer_count
The size of the destination buffer in bytes.

max_count
The maximum size of the destination buffer in bytes.

format
The format string that specifies how to format the output.

locale
The locale to use when formatting the output.

arglist
The variable argument list that contains the values to be formatted.

Returns

Returns 0 if successful, or a nonzero value if an error occurs.

Remarks

The function returns the number of characters written to the buffer, or a negative value if an error occurs. The function also ensures that the buffer is null-terminated, and that no buffer overflow occurs.

Requirements

Routine Exported by
__stdio_common_vsnprintf_s <ucrtbase_enclave.dll>

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 11/21/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。