Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StrCat function

Appends one string to another.

Note  Do not use. See Remarks for alternative functions.
 

Syntax


PTSTR StrCat(
  _Inout_ PTSTR  psz1,
  _In_    PCTSTR psz2
);

Parameters

psz1 [in, out]

Type: PTSTR

A pointer to a null-terminated string. When this function returns successfully, this string contains its original content with the string psz2 appended. This buffer must be large enough to hold both strings and the terminating null character.

psz2 [in]

Type: PCTSTR

A pointer to a null-terminated string to be appended to psz1.

Return value

Type: PTSTR

Returns a pointer to psz1, which holds the combined strings.

Remarks

Security Warning:  Using this function incorrectly can compromise the security of your application. The first argument, psz1, must be large enough to hold psz2 and the closing '\0', otherwise a buffer overrun may occur. Buffer overruns may lead to a denial of service attack against the application if an access violation occurs. In the worst case, a buffer overrun may allow an attacker to inject executable code into your process, especially if psz1 is a stack-based buffer. 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.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 4.71 or later)

Unicode and ANSI names

StrCatW (Unicode)

 

 

Show:
© 2017 Microsoft