Robert Shearman : oleaut32: Implement GetTypeInfoCount and GetTypeInfo for standard pictures.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 28 07:15:30 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: d82d37443020fb22e40b54dae75b8f2ba5fc3d41
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=d82d37443020fb22e40b54dae75b8f2ba5fc3d41

Author: Robert Shearman <rob at codeweavers.com>
Date:   Fri Jul 28 01:26:13 2006 +0100

oleaut32: Implement GetTypeInfoCount and GetTypeInfo for standard pictures.

---

 dlls/oleaut32/olepicture.c |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index e1ab8ec..927c85c 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -1992,9 +1992,11 @@ static HRESULT WINAPI OLEPictureImpl_Get
   IDispatch*    iface,
   unsigned int* pctinfo)
 {
-  FIXME("():Stub\n");
+  TRACE("(%p)", pctinfo);
 
-  return E_NOTIMPL;
+  *pctinfo = 1;
+
+  return S_OK;
 }
 
 /************************************************************************
@@ -2008,9 +2010,27 @@ static HRESULT WINAPI OLEPictureImpl_Get
   LCID        lcid,
   ITypeInfo** ppTInfo)
 {
-  FIXME("():Stub\n");
+  static const WCHAR stdole2tlb[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
+  ITypeLib *tl;
+  HRESULT hres;
 
-  return E_NOTIMPL;
+  TRACE("(iTInfo=%d, lcid=%04x, %p)\n", iTInfo, (int)lcid, ppTInfo);
+
+  if (iTInfo != 0)
+    return E_FAIL;
+
+  hres = LoadTypeLib(stdole2tlb, &tl);
+  if (FAILED(hres))
+  {
+    ERR("Could not load stdole2.tlb\n");
+    return hres;
+  }
+
+  hres = ITypeLib_GetTypeInfoOfGuid(tl, &IID_IPictureDisp, ppTInfo);
+  if (FAILED(hres))
+    ERR("Did not get IPictureDisp typeinfo from typelib, hres %lx\n", hres);
+
+  return hres;
 }
 
 /************************************************************************




More information about the wine-cvs mailing list