Commit e39405d4 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

combase: Implement WindowsCompareStringOrdinal.

parent b2caf751
......@@ -6,7 +6,7 @@
@ stub HSTRING_UserSize64
@ stub HSTRING_UserUnmarshal
@ stub HSTRING_UserUnmarshal64
@ stub WindowsCompareStringOrdinal
@ stdcall WindowsCompareStringOrdinal(ptr ptr ptr) combase.WindowsCompareStringOrdinal
@ stdcall WindowsConcatString(ptr ptr ptr) combase.WindowsConcatString
@ stdcall WindowsCreateString(wstr long ptr) combase.WindowsCreateString
@ stdcall WindowsCreateStringReference(wstr long ptr ptr) combase.WindowsCreateStringReference
......
......@@ -287,7 +287,7 @@
@ stub WdtpInterfacePointer_UserSize64
@ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr) ole32.WdtpInterfacePointer_UserUnmarshal
@ stub WdtpInterfacePointer_UserUnmarshal64
@ stub WindowsCompareStringOrdinal
@ stdcall WindowsCompareStringOrdinal(ptr ptr ptr)
@ stdcall WindowsConcatString(ptr ptr ptr)
@ stdcall WindowsCreateString(wstr long ptr)
@ stdcall WindowsCreateStringReference(wstr long ptr ptr)
......
......@@ -372,3 +372,36 @@ BOOL WINAPI WindowsIsStringEmpty(HSTRING str)
return TRUE;
return priv->length == 0;
}
/***********************************************************************
* WindowsCompareStringOrdinal (combase.@)
*/
HRESULT WINAPI WindowsCompareStringOrdinal(HSTRING str1, HSTRING str2, INT32 *res)
{
struct hstring_private *priv1 = impl_from_HSTRING(str1);
struct hstring_private *priv2 = impl_from_HSTRING(str2);
const WCHAR *buf1 = empty, *buf2 = empty;
UINT32 len1 = 0, len2 = 0;
TRACE("(%p, %p, %p)\n", str1, str2, res);
if (res == NULL)
return E_INVALIDARG;
if (str1 == str2)
{
*res = 0;
return S_OK;
}
if (str1)
{
buf1 = priv1->buffer;
len1 = priv1->length;
}
if (str2)
{
buf2 = priv2->buffer;
len2 = priv2->length;
}
*res = CompareStringOrdinal(buf1, len1, buf2, len2, FALSE) - CSTR_EQUAL;
return S_OK;
}
......@@ -831,6 +831,7 @@ WINBASEAPI INT WINAPI CompareStringA(LCID,DWORD,LPCSTR,INT,LPCSTR,INT);
WINBASEAPI INT WINAPI CompareStringW(LCID,DWORD,LPCWSTR,INT,LPCWSTR,INT);
#define CompareString WINELIB_NAME_AW(CompareString)
WINBASEAPI INT WINAPI CompareStringEx(LPCWSTR,DWORD,LPCWSTR,INT,LPCWSTR,INT,LPNLSVERSIONINFO,LPVOID,LPARAM);
WINBASEAPI INT WINAPI CompareStringOrdinal(const WCHAR *,INT,const WCHAR *,INT,BOOL);
WINBASEAPI LCID WINAPI ConvertDefaultLocale(LCID);
WINBASEAPI BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE);
WINBASEAPI BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment