StringCbPrintf 函数

Writes formatted data to the specified string. The size of the destination buffer is provided to the function to ensure that it does not write past the end of this buffer.

写入有格式的数据到指定的字符串里。目标缓存的大小被用来确保写入数据时缓冲区溢出。

StringCbPrintf is a replacement for the following functions:

StringCbPrintf是一个代替一下函数的函数

Syntax 语法

C++
HRESULT StringCbPrintf(
  _Out_  LPTSTR pszDest,
  _In_   size_t cbDest,
  _In_   LPCTSTR pszFormat,
  _In_    ...
);

Parameters 参数

pszDest [out]

Type: LPTSTR

The destination buffer, which receives the formatted, null-terminated string created from pszFormat and its arguments.

目标缓存。按照pszFormat格式从后面的参数创建的嗲有空字符的字符串

cbDest [in]

Type: size_t

The size of the destination buffer, in bytes. This value must be sufficiently large to accommodate the final formatted string plus the terminating null character. The maximum number of bytes allowed is STRSAFE_MAX_CCH * sizeof(TCHAR).

目标缓存的字节大小。这个值必须足够大。

pszFormat [in]

Type: LPCTSTR

The format string. This string must be null-terminated.

格式字符串。这个字符串必须为空字符终止。

... [in]

The arguments to be inserted into the pszFormat string.

被插入到格式字符串里的参数。

Return value 返回值

Type: HRESULT

This function can return one of the following values. It is strongly recommended that you use the  SUCCEEDED  and  FAILED  macros to test the return value of this function.
这个函数会返回一个跟随值,它可以表明你使用这个函数是否成功。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值