Patch to implement OLE32.OleDraw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Index: dlls/ole32/ole2.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/ole2.c,v
retrieving revision 1.42
diff -u -r1.42 ole2.c
--- dlls/ole32/ole2.c	28 Jan 2003 01:06:20 -0000	1.42
+++ dlls/ole32/ole2.c	25 Jun 2003 01:18:15 -0000
@@ -2256,6 +2244,45 @@
     mf->yExt = 20; /* dito */
     mf->hMF = CloseMetaFile16(HDC_16(hdc));
     return hmf;
+}
+
+/******************************************************************************
+ * OleDraw (OLE32.101)
+ *
+ * The operation of this function is documented literally in the WinAPI
+ * documentation to involve a QueryInterface for the IViewObject interface,
+ * followed by a call to IViewObject::Draw.
+ */
+HRESULT WINAPI OleDraw(
+	IUnknown *pUnk,
+	DWORD dwAspect,
+	HDC hdcDraw,
+	LPCRECT lprcBounds)
+{
+  HRESULT hres;
+  IViewObject *viewobject;
+
+  hres = IUnknown_QueryInterface(pUnk,
+				 &IID_IViewObject,
+				 (void**)&viewobject);
+
+  if (SUCCEEDED(hres))
+  {
+    RECTL rectl;
+
+    rectl.left = lprcBounds->left;
+    rectl.right = lprcBounds->right;
+    rectl.top = lprcBounds->top;
+    rectl.bottom = lprcBounds->bottom;
+    hres = IViewObject_Draw(viewobject, dwAspect, -1, 0, 0, 0, hdcDraw, 
&rectl, 0, 0, 0);
+
+    IViewObject_Release(viewobject);
+    return hres;
+  }
+  else
+  {
+    return DV_E_NOIVIEWOBJECT;
+  }
 }
 
 
/******************************************************************************
Index: dlls/ole32/ole32.spec
===================================================================
RCS file: /home/wine/wine/dlls/ole32/ole32.spec,v
retrieving revision 1.46
diff -u -r1.46 ole32.spec
--- dlls/ole32/ole32.spec	28 Mar 2003 19:33:04 -0000	1.46
+++ dlls/ole32/ole32.spec	25 Jun 2003 01:18:15 -0000
@@ -98,7 +98,7 @@
  98 stdcall OleCreateStaticFromData(ptr ptr long ptr ptr ptr ptr)
  99 stdcall OleDestroyMenuDescriptor(long)
 100 stub OleDoAutoConvert
-101 stub OleDraw
+101 stdcall OleDraw(ptr long ptr ptr)
 102 stdcall OleDuplicateData(long long long)
 103 stdcall OleFlushClipboard()
 104 stdcall OleGetAutoConvert(ptr ptr)



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux