Alistair Leslie-Hughes : dpnet: Implement IDirectPlay8LobbyClient Initialize.

Alexandre Julliard julliard at winehq.org
Tue Nov 1 14:58:50 CDT 2016


Module: wine
Branch: master
Commit: 5183ebd8ab31cd3d65716d76621e579d5ddd3dec
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5183ebd8ab31cd3d65716d76621e579d5ddd3dec

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Oct 28 07:07:32 2016 +0000

dpnet: Implement IDirectPlay8LobbyClient Initialize.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dpnet/client.c       | 15 +++++++++++++--
 dlls/dpnet/tests/client.c |  5 ++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c
index f6f9e79..36df50d 100644
--- a/dlls/dpnet/client.c
+++ b/dlls/dpnet/client.c
@@ -40,6 +40,10 @@ typedef struct IDirectPlay8LobbyClientImpl
 {
     IDirectPlay8LobbyClient IDirectPlay8LobbyClient_iface;
     LONG ref;
+
+    PFNDPNMESSAGEHANDLER msghandler;
+    DWORD flags;
+    void *usercontext;
 } IDirectPlay8LobbyClientImpl;
 
 static inline IDirectPlay8LobbyClientImpl *impl_from_IDirectPlay8LobbyClient(IDirectPlay8LobbyClient *iface)
@@ -427,9 +431,16 @@ static HRESULT WINAPI lobbyclient_Initialize(IDirectPlay8LobbyClient *iface, voi
 {
     IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface);
 
-    FIXME("(%p)->(%p %p 0x%08x)\n", This, context, msghandler, flags);
+    TRACE("(%p):(%p,%p,%x)\n", This, context, msghandler, flags);
 
-    return E_NOTIMPL;
+    if(!msghandler)
+        return E_POINTER;
+
+    This->usercontext = context;
+    This->msghandler = msghandler;
+    This->flags = flags;
+
+    return DPN_OK;
 }
 
 static HRESULT WINAPI lobbyclient_EnumLocalPrograms(IDirectPlay8LobbyClient *iface, GUID* guidapplication,
diff --git a/dlls/dpnet/tests/client.c b/dlls/dpnet/tests/client.c
index f7d6c53..6732034 100644
--- a/dlls/dpnet/tests/client.c
+++ b/dlls/dpnet/tests/client.c
@@ -220,8 +220,11 @@ static void test_lobbyclient(void)
     ok(hr == S_OK, "Failed to create object\n");
     if(SUCCEEDED(hr))
     {
+        hr = IDirectPlay8LobbyClient_Initialize(client, NULL, NULL, 0);
+        ok(hr == E_POINTER, "got 0x%08x\n", hr);
+
         hr = IDirectPlay8LobbyClient_Initialize(client, NULL, DirectPlayLobbyClientMessageHandler, 0);
-        todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+        ok(hr == S_OK, "got 0x%08x\n", hr);
 
         hr = IDirectPlay8LobbyClient_Close(client, 0);
         todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);




More information about the wine-cvs mailing list