diff --git a/dlls/oleaut32/oleaut32.spec b/dlls/oleaut32/oleaut32.spec index a4317f1325..2bb7f1873b 100644 --- a/dlls/oleaut32/oleaut32.spec +++ b/dlls/oleaut32/oleaut32.spec @@ -318,7 +318,7 @@ debug_channels (ole typelib) 437 stub VarAdd # stdcall (ptr ptr ptr) 438 stub VarAnd # stdcall (ptr ptr ptr) 439 stub VarBstrCat # stdcall (ptr ptr ptr) -440 stub VarBstrCmp # stdcall (ptr ptr long long) +440 stdcall VarBstrCmp(ptr ptr long long) VarBstrCmp 441 stub VarCat # stdcall (ptr ptr ptr) 442 stub VarCmp # stdcall (ptr ptr long long) 443 stub VarCyAbs diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index c0390c6c4b..86d20bc25a 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -4640,3 +4640,35 @@ HRESULT WINAPI VarDateFromUdate(UDATE *pudateout, return i; } + + +/********************************************************************** + * VarBstrCmp [OLEAUT32.440] + * + * flags can be: + * NORM_IGNORECASE, NORM_IGNORENONSPACE, NORM_IGNORESYMBOLS + * NORM_IGNORESTRINGWIDTH, NORM_IGNOREKANATYPE, NORM_IGNOREKASHIDA + * + */ +HRESULT WINAPI VarBstrCmp(BSTR left, BSTR right, LCID lcid, DWORD flags) +{ + DWORD r; + + FIXME("( %s %s %ld %lx ) partial stub\n", debugstr_w(left), debugstr_w(right), lcid, flags); + + if((!left) || (!right)) + return VARCMP_NULL; + + if(flags&NORM_IGNORECASE) + r = lstrcmpiW(left,right); + else + r = lstrcmpW(left,right); + + if(r<0) + return VARCMP_LT; + if(r>0) + return VARCMP_GT; + + return VARCMP_EQ; +} +