David Hedberg : oleaut32: Make ITypeComp::BindType case-insensitive.

Alexandre Julliard julliard at winehq.org
Tue Jan 11 10:08:27 CST 2011


Module: wine
Branch: master
Commit: 900c5cde698d25367d45e6385bb2b836c36c16db
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=900c5cde698d25367d45e6385bb2b836c36c16db

Author: David Hedberg <dhedberg at codeweavers.com>
Date:   Tue Jan 11 10:10:01 2011 +0100

oleaut32: Make ITypeComp::BindType case-insensitive.

---

 dlls/oleaut32/tests/typelib.c |   12 ++++++++++++
 dlls/oleaut32/typelib.c       |    2 +-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index a47a188..03eda3b 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -117,6 +117,7 @@ static void test_TypeComp(void)
     static WCHAR wszIUnknown[] = {'I','U','n','k','n','o','w','n',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 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};
@@ -291,6 +292,17 @@ static void test_TypeComp(void)
     ITypeInfo_Release(pTypeInfo);
     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);
 
     /* tests for ITypeComp on an interface */
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 91da30a..b1e3e4f 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -4914,7 +4914,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType(
     for (pTypeInfo = This->pTypeInfo; pTypeInfo; pTypeInfo = pTypeInfo->next)
     {
         /* 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);
             *ppTInfo = (ITypeInfo *)&pTypeInfo->lpVtbl;




More information about the wine-cvs mailing list