Commit ef7b6e27 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

oleaut32: ITypeComp_fnBind should do case-insensitive compares on the name passed in.

parent c71af733
......@@ -83,6 +83,7 @@ static void test_TypeComp(void)
static WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0};
static WCHAR wszOLE_COLOR[] = {'O','L','E','_','C','O','L','O','R',0};
static WCHAR wszClone[] = {'C','l','o','n','e',0};
static WCHAR wszclone[] = {'c','l','o','n','e',0};
hr = LoadTypeLib(wszStdOle2, &pTypeLib);
ok_ole_success(hr, LoadTypeLib);
......@@ -245,6 +246,18 @@ static void test_TypeComp(void)
ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n");
ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n");
/* tests that the compare is case-insensitive */
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszclone);
hr = ITypeComp_Bind(pTypeComp, wszclone, ulHash, 0, &pTypeInfo, &desckind, &bindptr);
ok_ole_success(hr, ITypeComp_Bind);
ok(desckind == DESCKIND_FUNCDESC,
"desckind should have been DESCKIND_FUNCDESC instead of %d\n",
desckind);
ok(bindptr.lpfuncdesc != NULL, "bindptr.lpfuncdesc should not have been set to NULL\n");
ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc);
ITypeInfo_Release(pTypeInfo);
ITypeComp_Release(pTypeComp);
ITypeInfo_Release(pFontTypeInfo);
ITypeLib_Release(pTypeLib);
......
......@@ -6544,7 +6544,7 @@ static HRESULT WINAPI ITypeComp_fnBind(
*ppTInfo = NULL;
for(pFDesc = This->funclist; pFDesc; pFDesc = pFDesc->next)
if (!strcmpW(pFDesc->Name, szName)) {
if (!strcmpiW(pFDesc->Name, szName)) {
if (!wFlags || (pFDesc->funcdesc.invkind & wFlags))
break;
else
......@@ -6566,7 +6566,7 @@ static HRESULT WINAPI ITypeComp_fnBind(
return S_OK;
} else {
for(pVDesc = This->varlist; pVDesc; pVDesc = pVDesc->next) {
if (!strcmpW(pVDesc->Name, szName)) {
if (!strcmpiW(pVDesc->Name, szName)) {
HRESULT hr = TLB_AllocAndInitVarDesc(&pVDesc->vardesc, &pBindPtr->lpvardesc);
if (FAILED(hr))
return hr;
......
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