Skip to content

w[v]sprintf[AW] - fix buffer sizes, document Id, Iu #1594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions sdk-api-src/content/winuser/nf-winuser-wsprintfa.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Writes formatted data to the specified buffer. Any arguments are converted and c

Type: <b>LPTSTR</b>

The buffer that is to receive the formatted output. The maximum size of the buffer is 1,024 bytes.
The buffer that is to receive the formatted output. The maximum size of the buffer is 1025 bytes (1024 characters and space for a null-terminator).

### -param unnamedParam2 [in]

Expand Down Expand Up @@ -184,6 +184,16 @@ Unsigned short integer.
<dd>
Signed decimal integer. This value is equivalent to <code>d</code>.

</dd>
<dt><a id="Id"></a><code>Id</code></dt>
<dd>
64-bit signed decimal integer on 64-bit platforms, 32-bit signed decimal integer on 32-bit platforms.

</dd>
<dt><a id="Iu"></a><code>Iu</code></dt>
<dd>
64-bit unsigned decimal integer on 64-bit platforms, 32-bit unsigned decimal integer on 32-bit platforms.

</dd>
<dt><a id="Ix__IX"></a><a id="ix__ix"></a><a id="IX__IX"></a><code>Ix</code>, <code>IX</code></dt>
<dd>
Expand Down Expand Up @@ -253,7 +263,7 @@ Unsigned hexadecimal integer in lowercase or uppercase.

<div class="alert"><b>Note</b>  It is important to note that <b>wsprintf</b> uses the C calling convention (<b>_cdecl</b>), rather than the standard call (<b>_stdcall</b>) calling convention. As a result, it is the responsibility of the calling process to pop arguments off the stack, and arguments are pushed on the stack from right to left. In C-language modules, the C compiler performs this task.</div>
<div> </div>
To use buffers larger than 1024 bytes, use <b>_snwprintf</b>. For more information, see the documentation for the C run-time library.
To format strings larger than 1024 characters, use <b>_snwprintf</b>. For more information, see the documentation for the C run-time library.



Expand Down
14 changes: 12 additions & 2 deletions sdk-api-src/content/winuser/nf-winuser-wsprintfw.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Writes formatted data to the specified buffer. Any arguments are converted and c

Type: <b>LPTSTR</b>

The buffer that is to receive the formatted output. The maximum size of the buffer is 1,024 bytes.
The buffer that is to receive the formatted output. The maximum size of the buffer is 2050 bytes (1024 characters and space for a null-terminator).

### -param unnamedParam2 [in]

Expand Down Expand Up @@ -184,6 +184,16 @@ Unsigned short integer.
<dd>
Signed decimal integer. This value is equivalent to <code>d</code>.

</dd>
<dt><a id="Id"></a><code>Id</code></dt>
<dd>
64-bit signed decimal integer on 64-bit platforms, 32-bit signed decimal integer on 32-bit platforms.

</dd>
<dt><a id="Iu"></a><code>Iu</code></dt>
<dd>
64-bit unsigned decimal integer on 64-bit platforms, 32-bit unsigned decimal integer on 32-bit platforms.

</dd>
<dt><a id="Ix__IX"></a><a id="ix__ix"></a><a id="IX__IX"></a><code>Ix</code>, <code>IX</code></dt>
<dd>
Expand Down Expand Up @@ -253,7 +263,7 @@ Unsigned hexadecimal integer in lowercase or uppercase.

<div class="alert"><b>Note</b>  It is important to note that <b>wsprintf</b> uses the C calling convention (<b>_cdecl</b>), rather than the standard call (<b>_stdcall</b>) calling convention. As a result, it is the responsibility of the calling process to pop arguments off the stack, and arguments are pushed on the stack from right to left. In C-language modules, the C compiler performs this task.</div>
<div> </div>
To use buffers larger than 1024 bytes, use <b>_snwprintf</b>. For more information, see the documentation for the C run-time library.
To format strings larger than 1024 characters, use <b>_snwprintf</b>. For more information, see the documentation for the C run-time library.



Expand Down
2 changes: 1 addition & 1 deletion sdk-api-src/content/winuser/nf-winuser-wvsprintfa.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Writes formatted data to the specified buffer using a pointer to a list of argum

Type: <b>LPTSTR</b>

The buffer that is to receive the formatted output. The maximum size of the buffer is 1,024 bytes.
The buffer that is to receive the formatted output. The maximum size of the buffer is 1025 bytes (1024 characters and space for a null-terminator).

### -param unnamedParam2 [in]

Expand Down
2 changes: 1 addition & 1 deletion sdk-api-src/content/winuser/nf-winuser-wvsprintfw.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Writes formatted data to the specified buffer using a pointer to a list of argum

Type: <b>LPTSTR</b>

The buffer that is to receive the formatted output. The maximum size of the buffer is 1,024 bytes.
The buffer that is to receive the formatted output. The maximum size of the buffer is 1025 bytes (1024 characters and space for a null-terminator).

### -param unnamedParam2 [in]

Expand Down