StrCatBuffA function (shlwapi.h)
Copies and appends characters from one string to the end of another.
Syntax
PSTR StrCatBuffA(
[in, out] PSTR pszDest,
[in] PCSTR pszSrc,
int cchDestBuffSize
);
Parameters
[in, out] pszDest
Type: PTSTR
A pointer to a null-terminated string. When this function returns successfully, this string contains its original content with the string pszSrc appended.
[in] pszSrc
Type: PCTSTR
A pointer to the string to be appended to pszDest.
cchDestBuffSize
Type: int
The size of the buffer, in characters, pointed to by pszDest. This value must be at least the length of the combined string plus the terminating null character. If the buffer is too small to fit the entire string, the string will be truncated.
Return value
Type: PTSTR
Returns a pointer to the destination string.
Remarks
Security Warning: Using this function incorrectly can compromise the security of your application. The final string is not guaranteed to be null-terminated. Consider using one of the following alternatives: StringCbCat, StringCbCatEx, StringCbCatN, StringCbCatNEx, StringCchCat, StringCchCatEx, StringCchCatN, or StringCchCatNEx. You should review Security Considerations: Microsoft Windows Shell before continuing.
Note
The shlwapi.h header defines StrCatBuff as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shlwapi.h |
Library | Shlwapi.lib |
DLL | Shlwapi.dll (version 5.0 or later) |