mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
oleaut32: ITypeComp_fnBind should do case-insensitive compares on the name passed in.
This commit is contained in:
parent
c71af73324
commit
ef7b6e2740
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user