inkobj: Implement InkCollector_Create

John Klehm xixsimplicityxix at gmail.com
Fri Aug 24 03:15:41 CDT 2007


This fleshes out the Create function for InkCollector. Initiailizes
the data members we have in our not so secret InkCollector struct and
passes off to QueryInterface.. but for that tune in next time same bat
channel same bat time.

-John Klehm
-------------- next part --------------
From 8c92f3a2f798b5e96c9977737f7d9900440e6586 Mon Sep 17 00:00:00 2001
From: John Klehm <xixsimplicityxix at gmail.com>
Date: Fri, 24 Aug 2007 01:50:21 -0500
Subject: inkobj: Implement InkCollector_Create

---
 dlls/inkobj/inkcollector.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/dlls/inkobj/inkcollector.c b/dlls/inkobj/inkcollector.c
index 7eb4329..17f460f 100644
--- a/dlls/inkobj/inkcollector.c
+++ b/dlls/inkobj/inkcollector.c
@@ -88,8 +88,22 @@ HRESULT InkCollector_Create(IUnknown* pUnkOuter, REFIID riid, void** ppvObject)
     InkCollector* ret;
     HRESULT result = E_NOINTERFACE;
 
-    FIXME("pUnkOuter=%p, riid=%s, ppvObject=%p\n",
+    TRACE("pUnkOuter=%p, riid=%s, ppvObject=%p\n",
         pUnkOuter, debugstr_guid(riid), ppvObject);
 
+    ret = HeapAlloc(GetProcessHeap(), 0, sizeof(InkCollector));
+    ret->lpInkCollectorVtbl = &InkCollectorVtbl;
+    ret->refCount = 0;
+
+    result = IInkCollector_QueryInterface(
+        ((IInkCollector*) &(ret->lpInkCollectorVtbl)), riid, ppvObject);
+    if (FAILED(result))
+    {
+        HeapFree(GetProcessHeap(), 0, ret);
+        return result;
+    }
+
+    InterlockedIncrement(&INKOBJ_refCount);
+
     return result;
 }
-- 
1.5.1.6



More information about the wine-patches mailing list