combase: Implement WindowsSubstring.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a90ed505a7
commit
3ba2d995c8
|
@ -21,7 +21,7 @@
|
|||
@ stdcall WindowsPromoteStringBuffer(ptr ptr) combase.WindowsPromoteStringBuffer
|
||||
@ stub WindowsReplaceString
|
||||
@ stdcall WindowsStringHasEmbeddedNull(ptr ptr) combase.WindowsStringHasEmbeddedNull
|
||||
@ stub WindowsSubstring
|
||||
@ stdcall WindowsSubstring(ptr long ptr) combase.WindowsSubstring
|
||||
@ stub WindowsSubstringWithSpecifiedLength
|
||||
@ stub WindowsTrimStringEnd
|
||||
@ stub WindowsTrimStringStart
|
||||
|
|
|
@ -302,7 +302,7 @@
|
|||
@ stdcall WindowsPromoteStringBuffer(ptr ptr)
|
||||
@ stub WindowsReplaceString
|
||||
@ stdcall WindowsStringHasEmbeddedNull(ptr ptr)
|
||||
@ stub WindowsSubstring
|
||||
@ stdcall WindowsSubstring(ptr long ptr)
|
||||
@ stub WindowsSubstringWithSpecifiedLength
|
||||
@ stub WindowsTrimStringEnd
|
||||
@ stub WindowsTrimStringStart
|
||||
|
|
|
@ -254,6 +254,25 @@ HRESULT WINAPI WindowsStringHasEmbeddedNull(HSTRING str, BOOL *out)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WindowsSubstring (combase.@)
|
||||
*/
|
||||
HRESULT WINAPI WindowsSubstring(HSTRING str, UINT32 start, HSTRING *out)
|
||||
{
|
||||
struct hstring_private *priv = impl_from_HSTRING(str);
|
||||
UINT32 len = WindowsGetStringLen(str);
|
||||
if (out == NULL)
|
||||
return E_INVALIDARG;
|
||||
if (start > len)
|
||||
return E_BOUNDS;
|
||||
if (start == len)
|
||||
{
|
||||
*out = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
return WindowsCreateString(&priv->buffer[start], len - start, out);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* WindowsIsStringEmpty (combase.@)
|
||||
*/
|
||||
|
|
|
@ -2092,6 +2092,7 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x)
|
|||
#define S_FALSE _HRESULT_TYPEDEF_(1)
|
||||
|
||||
#define E_PENDING _HRESULT_TYPEDEF_(0x8000000A)
|
||||
#define E_BOUNDS _HRESULT_TYPEDEF_(0x8000000B)
|
||||
|
||||
|
||||
#define E_NOTIMPL _HRESULT_TYPEDEF_(0x80004001)
|
||||
|
|
Loading…
Reference in New Issue