INFO: wsprintf() Buffer Limit in Windows (77255)



The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) 3.1
  • Microsoft Win32 Application Programming Interface (API), when used with:
    • Microsoft Windows NT Server 3.5
    • Microsoft Windows NT Server 3.51
    • Microsoft Windows NT Server 4.0
    • Microsoft Windows NT Workstation 3.5
    • Microsoft Windows NT Workstation 3.51
    • Microsoft Windows NT Workstation 4.0

This article was previously published under Q77255

SUMMARY

The wsprintf(lpOutput, lpFormat [, argument] ...) and wvsprintf() functions format and store a series of characters and values in a buffer specified by the first parameter, lpOutput. This buffer is limited to 1K (1024 bytes); in other words, the largest buffer that wsprintf can use is 1K.

If an application tries to use a buffer larger than 1K, the string will be truncated automatically to a length of 1K.


Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kbinfo KB77255