combase: Implement WindowsConcatString.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4afb30c544
commit
63f95fedfe
|
@ -7,7 +7,7 @@
|
|||
@ stub HSTRING_UserUnmarshal
|
||||
@ stub HSTRING_UserUnmarshal64
|
||||
@ stub WindowsCompareStringOrdinal
|
||||
@ stub WindowsConcatString
|
||||
@ stdcall WindowsConcatString(ptr ptr ptr) combase.WindowsConcatString
|
||||
@ stdcall WindowsCreateString(wstr long ptr) combase.WindowsCreateString
|
||||
@ stdcall WindowsCreateStringReference(wstr long ptr ptr) combase.WindowsCreateStringReference
|
||||
@ stdcall WindowsDeleteString(ptr) combase.WindowsDeleteString
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
@ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr) ole32.WdtpInterfacePointer_UserUnmarshal
|
||||
@ stub WdtpInterfacePointer_UserUnmarshal64
|
||||
@ stub WindowsCompareStringOrdinal
|
||||
@ stub WindowsConcatString
|
||||
@ stdcall WindowsConcatString(ptr ptr ptr)
|
||||
@ stdcall WindowsCreateString(wstr long ptr)
|
||||
@ stdcall WindowsCreateStringReference(wstr long ptr ptr)
|
||||
@ stdcall WindowsDeleteString(ptr)
|
||||
|
|
|
@ -329,6 +329,36 @@ HRESULT WINAPI WindowsSubstringWithSpecifiedLength(HSTRING str, UINT32 start, UI
|
|||
return WindowsCreateString(&priv->buffer[start], len, out);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WindowsConcatString (combase.@)
|
||||
*/
|
||||
HRESULT WINAPI WindowsConcatString(HSTRING str1, HSTRING str2, HSTRING *out)
|
||||
{
|
||||
struct hstring_private *priv1 = impl_from_HSTRING(str1);
|
||||
struct hstring_private *priv2 = impl_from_HSTRING(str2);
|
||||
struct hstring_private *priv;
|
||||
|
||||
TRACE("(%p, %p, %p)\n", str1, str2, out);
|
||||
|
||||
if (out == NULL)
|
||||
return E_INVALIDARG;
|
||||
if (str1 == NULL)
|
||||
return WindowsDuplicateString(str2, out);
|
||||
if (str2 == NULL)
|
||||
return WindowsDuplicateString(str1, out);
|
||||
if (!priv1->length && !priv2->length)
|
||||
{
|
||||
*out = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
if (!alloc_string(priv1->length + priv2->length, out))
|
||||
return E_OUTOFMEMORY;
|
||||
priv = impl_from_HSTRING(*out);
|
||||
memcpy(priv->buffer, priv1->buffer, priv1->length * sizeof(*priv1->buffer));
|
||||
memcpy(priv->buffer + priv1->length, priv2->buffer, priv2->length * sizeof(*priv2->buffer));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WindowsIsStringEmpty (combase.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue