olefont GetTypeInfo

Walt Ogburn reuben at ugcs.caltech.edu
Mon Sep 12 23:43:28 CDT 2005


Changelog:

Get IFontDisp type information from stdole2.tlb, instead of IDispatch
information from stdole32.tlb.

--

Next patch is a test that passes once this one is applied.

This is the first step in implementing GetIDsOfNames in olefont. In order
for GetIDsOfNames to know about the members of IFontDisp, GetTypeInfo
first has to be able to get the information for this type from
stdole2.tlb.
-------------- next part --------------
Index: dlls/oleaut32/olefont.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/olefont.c,v
retrieving revision 1.46
diff -u -p -r1.46 olefont.c
--- dlls/oleaut32/olefont.c	22 Aug 2005 09:22:43 -0000	1.46
+++ dlls/oleaut32/olefont.c	13 Sep 2005 02:35:56 -0000
@@ -1235,7 +1235,7 @@ static HRESULT WINAPI OLEFontImpl_GetTyp
   LCID        lcid,
   ITypeInfo** ppTInfo)
 {
-  static const WCHAR stdole32tlb[] = {'s','t','d','o','l','e','3','2','.','t','l','b',0};
+  static const WCHAR stdole2tlb[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
   ITypeLib *tl;
   HRESULT hres;
 
@@ -1243,12 +1243,12 @@ static HRESULT WINAPI OLEFontImpl_GetTyp
   TRACE("(%p, iTInfo=%d, lcid=%04x, %p)\n", this, iTInfo, (int)lcid, ppTInfo);
   if (iTInfo != 0)
     return E_FAIL;
-  hres = LoadTypeLib(stdole32tlb, &tl);
+  hres = LoadTypeLib(stdole2tlb, &tl);
   if (FAILED(hres)) {
-    ERR("Could not load the stdole32.tlb?\n");
+    ERR("Could not load the stdole2.tlb?\n");
     return hres;
   }
-  hres = ITypeLib_GetTypeInfoOfGuid(tl, &IID_IDispatch, ppTInfo);
+  hres = ITypeLib_GetTypeInfoOfGuid(tl, &IID_IFontDisp, ppTInfo);
   if (FAILED(hres)) {
     FIXME("Did not IDispatch typeinfo from typelib, hres %lx\n",hres);
   }


More information about the wine-patches mailing list