Commit 900c5cde authored by David Hedberg's avatar David Hedberg Committed by Alexandre Julliard

oleaut32: Make ITypeComp::BindType case-insensitive.

parent 454b1fca
...@@ -117,6 +117,7 @@ static void test_TypeComp(void) ...@@ -117,6 +117,7 @@ static void test_TypeComp(void)
static WCHAR wszIUnknown[] = {'I','U','n','k','n','o','w','n',0}; static WCHAR wszIUnknown[] = {'I','U','n','k','n','o','w','n',0};
static WCHAR wszFont[] = {'F','o','n','t',0}; static WCHAR wszFont[] = {'F','o','n','t',0};
static WCHAR wszGUID[] = {'G','U','I','D',0}; static WCHAR wszGUID[] = {'G','U','I','D',0};
static WCHAR wszguid[] = {'g','u','i','d',0};
static WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0}; 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 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};
...@@ -291,6 +292,17 @@ static void test_TypeComp(void) ...@@ -291,6 +292,17 @@ static void test_TypeComp(void)
ITypeInfo_Release(pTypeInfo); ITypeInfo_Release(pTypeInfo);
if(pTypeComp_tmp) ITypeComp_Release(pTypeComp_tmp); /* fixme */ if(pTypeComp_tmp) ITypeComp_Release(pTypeComp_tmp); /* fixme */
/* test BindType case-insensitivity */
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszguid);
pTypeComp_tmp = (void*)0xdeadbeef;
pTypeInfo = (void*)0xdeadbeef;
hr = ITypeComp_BindType(pTypeComp, wszguid, ulHash, &pTypeInfo, &pTypeComp_tmp);
ok_ole_success(hr, ITypeComp_BindType);
ok(pTypeInfo != NULL, "Got NULL pTypeInfo\n");
todo_wine ok(pTypeComp_tmp == NULL, "Got pTypeComp_tmp %p\n", pTypeComp_tmp);
ITypeInfo_Release(pTypeInfo);
if(pTypeComp_tmp) ITypeComp_Release(pTypeComp_tmp); /* fixme */
ITypeComp_Release(pTypeComp); ITypeComp_Release(pTypeComp);
/* tests for ITypeComp on an interface */ /* tests for ITypeComp on an interface */
......
...@@ -4914,7 +4914,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType( ...@@ -4914,7 +4914,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType(
for (pTypeInfo = This->pTypeInfo; pTypeInfo; pTypeInfo = pTypeInfo->next) for (pTypeInfo = This->pTypeInfo; pTypeInfo; pTypeInfo = pTypeInfo->next)
{ {
/* FIXME: should use lHash to do the search */ /* FIXME: should use lHash to do the search */
if (pTypeInfo->Name && !strcmpW(pTypeInfo->Name, szName)) if (pTypeInfo->Name && !strcmpiW(pTypeInfo->Name, szName))
{ {
TRACE("returning %p\n", pTypeInfo); TRACE("returning %p\n", pTypeInfo);
*ppTInfo = (ITypeInfo *)&pTypeInfo->lpVtbl; *ppTInfo = (ITypeInfo *)&pTypeInfo->lpVtbl;
......
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