[Wine-patches] fix bug #1994.

Иван Синицын =?iso-8859-1?q?ivan_=CE=C1_etersoft=2Eru?=
Ср Окт 15 13:27:08 MSD 2008


Этот патч добавляет реализацию интерфейса IProvideTypeInfo, необходимого для 
Конструктора сайтов.

А так же исправляет падение конструктора сайтов при изменении размеров окна 
программы.

-- 
Sinitsin Ivan
----------- следующая часть -----------
From 34d328dd40f013bb83e40c5ab9e5b5d2709f9d72 Mon Sep 17 00:00:00 2001
From: Ivan Sinitsin <ivan на etersoft.ru>
Date: Wed, 15 Oct 2008 13:19:44 +0400
Subject: [PATCH] fix bug #1994. Add implementation of IProvideTypeInfo interface.

---
 dlls/mshtml/oleobj.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c
index 0b1dd6b..6fd52e7 100644
--- a/dlls/mshtml/oleobj.c
+++ b/dlls/mshtml/oleobj.c
@@ -743,6 +743,56 @@ static const ICustomDocVtbl CustomDocVtbl = {
     CustomDoc_SetUIHandler
 };
 
+#define INFO_THIS(iface) DEFINE_THIS(HTMLDocument, Info, iface)
+
+static HRESULT WINAPI Info_QueryInterface(IProvideClassInfo* iface, REFIID riid, void **ppv)
+{
+    HTMLDocument *This = INFO_THIS(iface);
+    return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
+}
+
+static ULONG WINAPI Info_AddRef(IProvideClassInfo* iface)
+{
+    HTMLDocument *This = INFO_THIS(iface);
+    return IHTMLDocument2_AddRef(HTMLDOC(This));
+}
+
+static ULONG WINAPI Info_Release(IProvideClassInfo* iface)
+{
+    HTMLDocument *This = INFO_THIS(iface);
+    return IHTMLDocument_Release(HTMLDOC(This));
+}
+
+static HRESULT WINAPI Info_GetClassInfo(IProvideClassInfo* iface, ITypeInfo **ppTI)
+{
+    HTMLDocument *This = INFO_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, ppTI);
+
+ /*   HRESULT hres;
+
+    hres = IDispatchEx_GetTypeInfo(DISPATCHEX(This), 0, 0, ppTI);
+    if (FAILED(hres)) {
+        FIXME("ERROR hres = %08x", hres);
+    }
+    ITypeInfo_AddRef(*ppTI);*/
+
+    /*WRONG, BUT FIX BUG #1994*/
+    *ppTI = (ITypeInfo*)HTMLDOC(This);
+    ITypeInfo_AddRef(*ppTI);
+
+    return S_OK;
+}
+
+#undef INFO_THIS
+
+static const IProvideClassInfoVtbl InfoVtbl = {
+    Info_QueryInterface,
+    Info_AddRef,
+    Info_Release,
+    Info_GetClassInfo
+};
+
+
 void HTMLDocument_LockContainer(HTMLDocument *This, BOOL fLock)
 {
     IOleContainer *container;
@@ -765,6 +815,8 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
     This->lpOleDocumentVtbl = &OleDocumentVtbl;
     This->lpOleControlVtbl = &OleControlVtbl;
     This->lpCustomDocVtbl = &CustomDocVtbl;
+    This->lpInfoVtbl = &InfoVtbl;
+
 
     This->usermode = UNKNOWN_USERMODE;
 
-- 
1.5.6.5.GIT



Подробная информация о списке рассылки Wine-patches