Index: dll/win32/shlwapi/shlwapi.spec =================================================================== --- dll/win32/shlwapi/shlwapi.spec (revision 61577) +++ dll/win32/shlwapi/shlwapi.spec (working copy) @@ -760,6 +760,7 @@ @ stdcall StrCatBuffA (str str long) @ stdcall StrCatBuffW (wstr wstr long) @ stdcall StrCatW (ptr wstr) +@ stdcall StrCatChainW (ptr long long wstr) @ stdcall StrChrA (str long) @ stdcall StrChrIA (str long) @ stdcall StrChrIW (wstr long) Index: dll/win32/shlwapi/string.c =================================================================== --- dll/win32/shlwapi/string.c (revision 61577) +++ dll/win32/shlwapi/string.c (working copy) @@ -438,11 +438,50 @@ } /************************************************************************* - * StrCpyW [SHLWAPI.@] + * StrCatChainW [SHLWAPI.@] * - * Copy a string to another string. + * Concatenates two Unicode strings. * * PARAMS + * pszDst [O] Initial string + * cchDst Length of destination buffer + * ichAt Offset from the destination buffer to begin concatenation + * pszSrc [I] String to concatenate + * + * RETURNS + * The offset from the beginning of pszDst to the terminating NULL. + */ + +DWORD WINAPI StrCatChainW(PWSTR pszDst, DWORD cchDst, DWORD ichAt, PCWSTR pszSrc) +{ + LPWSTR d = pszDst; + LPCWSTR s = pszSrc; + DWORD mark; + + TRACE("(%s,%i,%i,%s)\n", debugstr_w(pszDst), cchDst, ichAt, debugstr_w(pszSrc)); + + if (ichAt == -1) + mark = strlenW(pszDst); + else + mark = ichAt; + d = d + mark; + if (pszSrc) + { + while ((mark < cchDst-1) && *s) + { + mark++; + *d++ = *s++; + } + } + *d = 0; + return mark; +} + +/************************************************************************* + * StrCpyW [SHLWAPI.@] + * + * Copy a string to another string. * + * PARAMS * lpszStr [O] Destination string * lpszSrc [I] Source string *