4 * Copyright 2004 Raphael Junqueira
5 * Copyright 2008 Alexander N. Sørnes <alex@thehandofagony.com>
6 * Copyright 2011 Louis Lenders
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
34 #include "wine/debug.h"
37 #include "dpnet_private.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(dpnet
);
42 typedef struct IDirectPlay8PeerImpl
44 IDirectPlay8Peer IDirectPlay8Peer_iface
;
47 PFNDPNMESSAGEHANDLER msghandler
;
50 } IDirectPlay8PeerImpl
;
52 static inline IDirectPlay8PeerImpl
*impl_from_IDirectPlay8Peer(IDirectPlay8Peer
*iface
)
54 return CONTAINING_RECORD(iface
, IDirectPlay8PeerImpl
, IDirectPlay8Peer_iface
);
57 /* IUnknown interface follows */
58 static HRESULT WINAPI
IDirectPlay8PeerImpl_QueryInterface(IDirectPlay8Peer
*iface
, REFIID riid
,
61 IDirectPlay8PeerImpl
* This
= impl_from_IDirectPlay8Peer(iface
);
63 if(IsEqualGUID(riid
, &IID_IUnknown
) ||
64 IsEqualGUID(riid
, &IID_IDirectPlay8Peer
))
66 IUnknown_AddRef(iface
);
71 WARN("(%p)->(%s,%p): not found\n", This
, debugstr_guid(riid
), ppobj
);
75 static ULONG WINAPI
IDirectPlay8PeerImpl_AddRef(IDirectPlay8Peer
*iface
)
77 IDirectPlay8PeerImpl
* This
= impl_from_IDirectPlay8Peer(iface
);
78 ULONG RefCount
= InterlockedIncrement(&This
->ref
);
80 TRACE("(%p) ref=%d\n", This
, RefCount
);
85 static ULONG WINAPI
IDirectPlay8PeerImpl_Release(IDirectPlay8Peer
*iface
)
87 IDirectPlay8PeerImpl
* This
= impl_from_IDirectPlay8Peer(iface
);
88 ULONG RefCount
= InterlockedDecrement(&This
->ref
);
90 TRACE("(%p) ref=%d\n", This
, RefCount
);
93 HeapFree(GetProcessHeap(), 0, This
);
98 /* IDirectPlay8Peer interface follows */
100 static HRESULT WINAPI
IDirectPlay8PeerImpl_Initialize(IDirectPlay8Peer
*iface
,
101 void * const pvUserContext
, const PFNDPNMESSAGEHANDLER pfn
, const DWORD dwFlags
)
103 IDirectPlay8PeerImpl
* This
= impl_from_IDirectPlay8Peer(iface
);
105 TRACE("(%p)->(%p,%p,%x): stub\n", iface
, pvUserContext
, pfn
, dwFlags
);
108 return DPNERR_INVALIDPARAM
;
110 This
->usercontext
= pvUserContext
;
111 This
->msghandler
= pfn
;
112 This
->flags
= dwFlags
;
117 static HRESULT WINAPI
IDirectPlay8PeerImpl_EnumServiceProviders(IDirectPlay8Peer
*iface
,
118 const GUID
* const pguidServiceProvider
, const GUID
* const pguidApplication
,
119 DPN_SERVICE_PROVIDER_INFO
* const pSPInfoBuffer
, DWORD
* const pcbEnumData
,
120 DWORD
* const pcReturned
, const DWORD dwFlags
)
122 static const WCHAR dp_providerW
[] = {'D','i','r','e','c','t','P','l','a','y','8',' ','T','C','P','/','I','P',' ',
123 'S','e','r','v','i','c','e',' ','P','r','o','v','i','d','e','r','\0'};
124 static const WCHAR dp_adapterW
[] = {'L','o','c','a','l',' ','A','r','e','a',' ','C','o','n','n','e','c','t','i','o','n',
125 ' ','-',' ','I','P','v','4','\0'};
127 static const GUID adapter_guid
= {0x4ce725f6, 0xd3c0, 0xdade, {0xba, 0x6f, 0x11, 0xf9, 0x65, 0xbc, 0x42, 0x99}};
130 TRACE("(%p)->(%p,%p,%p,%p,%p,%x): stub\n", iface
, pguidServiceProvider
, pguidApplication
, pSPInfoBuffer
,
131 pcbEnumData
, pcReturned
, dwFlags
);
133 if(!pcReturned
|| !pcbEnumData
)
136 if(!pguidServiceProvider
)
138 req_size
= sizeof(DPN_SERVICE_PROVIDER_INFO
) + sizeof(dp_providerW
);
140 else if(IsEqualGUID(pguidServiceProvider
, &CLSID_DP8SP_TCPIP
))
142 req_size
= sizeof(DPN_SERVICE_PROVIDER_INFO
) + sizeof(dp_adapterW
);
146 FIXME("Application requested a provider we don't handle (yet)\n");
148 return DPNERR_DOESNOTEXIST
;
151 if(*pcbEnumData
< req_size
)
153 *pcbEnumData
= req_size
;
154 return DPNERR_BUFFERTOOSMALL
;
157 pSPInfoBuffer
->pwszName
= (LPWSTR
)(pSPInfoBuffer
+ 1);
159 if(!pguidServiceProvider
)
161 lstrcpyW(pSPInfoBuffer
->pwszName
, dp_providerW
);
162 pSPInfoBuffer
->guid
= CLSID_DP8SP_TCPIP
;
166 lstrcpyW(pSPInfoBuffer
->pwszName
, dp_adapterW
);
167 pSPInfoBuffer
->guid
= adapter_guid
;
174 static HRESULT WINAPI
IDirectPlay8PeerImpl_CancelAsyncOperation(IDirectPlay8Peer
*iface
,
175 const DPNHANDLE hAsyncHandle
, const DWORD dwFlags
)
177 FIXME("(%p)->(%x,%x): stub\n", iface
, hAsyncHandle
, dwFlags
);
179 return DPNERR_GENERIC
;
182 static HRESULT WINAPI
IDirectPlay8PeerImpl_Connect(IDirectPlay8Peer
*iface
,
183 const DPN_APPLICATION_DESC
* const pdnAppDesc
, IDirectPlay8Address
* const pHostAddr
,
184 IDirectPlay8Address
* const pDeviceInfo
, const DPN_SECURITY_DESC
* const pdnSecurity
,
185 const DPN_SECURITY_CREDENTIALS
* const pdnCredentials
, const void * const pvUserConnectData
,
186 const DWORD dwUserConnectDataSize
, void * const pvPlayerContext
,
187 void * const pvAsyncContext
, DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
189 FIXME("(%p)->(%p,%p,%p,%p,%p,%p,%x,%p,%p,%p,%x): stub\n", iface
, pdnAppDesc
, pHostAddr
, pDeviceInfo
, pdnSecurity
, pdnCredentials
, pvUserConnectData
, dwUserConnectDataSize
, pvPlayerContext
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
191 return DPNERR_GENERIC
;
194 static HRESULT WINAPI
IDirectPlay8PeerImpl_SendTo(IDirectPlay8Peer
*iface
, const DPNID dpnId
,
195 const DPN_BUFFER_DESC
*pBufferDesc
, const DWORD cBufferDesc
, const DWORD dwTimeOut
,
196 void * const pvAsyncContext
, DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
198 FIXME("(%p)->(%x,%p,%x,%x,%p,%p,%x): stub\n", iface
, dpnId
, pBufferDesc
, cBufferDesc
, dwTimeOut
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
200 return DPNERR_GENERIC
;
203 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetSendQueueInfo(IDirectPlay8Peer
*iface
,
204 const DPNID dpnid
, DWORD
* const pdwNumMsgs
, DWORD
* const pdwNumBytes
, const DWORD dwFlags
)
206 FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface
, dpnid
, pdwNumMsgs
, pdwNumBytes
, dwFlags
);
208 return DPNERR_GENERIC
;
211 static HRESULT WINAPI
IDirectPlay8PeerImpl_Host(IDirectPlay8Peer
*iface
,
212 const DPN_APPLICATION_DESC
* const pdnAppDesc
, IDirectPlay8Address
** const prgpDeviceInfo
,
213 const DWORD cDeviceInfo
, const DPN_SECURITY_DESC
* const pdpSecurity
,
214 const DPN_SECURITY_CREDENTIALS
* const pdpCredentials
, void * const pvPlayerContext
,
217 FIXME("(%p)->(%p,%p,%x,%p,%p,%p,%x): stub\n", iface
, pdnAppDesc
, prgpDeviceInfo
, cDeviceInfo
, pdpSecurity
, pdpCredentials
, pvPlayerContext
, dwFlags
);
219 return DPNERR_GENERIC
;
222 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetApplicationDesc(IDirectPlay8Peer
*iface
,
223 DPN_APPLICATION_DESC
* const pAppDescBuffer
, DWORD
* const pcbDataSize
, const DWORD dwFlags
)
225 FIXME("(%p)->(%p,%p,%x): stub\n", iface
, pAppDescBuffer
, pcbDataSize
, dwFlags
);
227 return DPNERR_GENERIC
;
230 static HRESULT WINAPI
IDirectPlay8PeerImpl_SetApplicationDesc(IDirectPlay8Peer
*iface
,
231 const DPN_APPLICATION_DESC
* const pad
, const DWORD dwFlags
)
233 FIXME("(%p)->(%p,%x): stub\n", iface
, pad
, dwFlags
);
235 return DPNERR_GENERIC
;
238 static HRESULT WINAPI
IDirectPlay8PeerImpl_CreateGroup(IDirectPlay8Peer
*iface
,
239 const DPN_GROUP_INFO
* const pdpnGroupInfo
, void * const pvGroupContext
,
240 void * const pvAsyncContext
, DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
242 FIXME("(%p)->(%p,%p,%p,%p,%x): stub\n", iface
, pdpnGroupInfo
, pvGroupContext
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
244 return DPNERR_GENERIC
;
247 static HRESULT WINAPI
IDirectPlay8PeerImpl_DestroyGroup(IDirectPlay8Peer
*iface
,
248 const DPNID idGroup
, void * const pvAsyncContext
, DPNHANDLE
* const phAsyncHandle
,
251 FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface
, idGroup
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
253 return DPNERR_GENERIC
;
256 static HRESULT WINAPI
IDirectPlay8PeerImpl_AddPlayerToGroup(IDirectPlay8Peer
*iface
,
257 const DPNID idGroup
, const DPNID idClient
, void * const pvAsyncContext
,
258 DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
260 FIXME("(%p)->(%x,%x,%p,%p,%x): stub\n", iface
, idGroup
, idClient
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
262 return DPNERR_GENERIC
;
265 static HRESULT WINAPI
IDirectPlay8PeerImpl_RemovePlayerFromGroup(IDirectPlay8Peer
*iface
,
266 const DPNID idGroup
, const DPNID idClient
, void * const pvAsyncContext
,
267 DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
269 FIXME("(%p)->(%x,%x,%p,%p,%x): stub\n", iface
, idGroup
, idClient
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
271 return DPNERR_GENERIC
;
274 static HRESULT WINAPI
IDirectPlay8PeerImpl_SetGroupInfo(IDirectPlay8Peer
*iface
, const DPNID dpnid
,
275 DPN_GROUP_INFO
* const pdpnGroupInfo
, void * const pvAsyncContext
,
276 DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
278 FIXME("(%p)->(%x,%p,%p,%p,%x): stub\n", iface
, dpnid
, pdpnGroupInfo
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
280 return DPNERR_GENERIC
;
283 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetGroupInfo(IDirectPlay8Peer
*iface
, const DPNID dpnid
,
284 DPN_GROUP_INFO
* const pdpnGroupInfo
, DWORD
* const pdwSize
, const DWORD dwFlags
)
286 FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface
, dpnid
, pdpnGroupInfo
, pdwSize
, dwFlags
);
288 return DPNERR_GENERIC
;
291 static HRESULT WINAPI
IDirectPlay8PeerImpl_EnumPlayersAndGroups(IDirectPlay8Peer
*iface
,
292 DPNID
* const prgdpnid
, DWORD
* const pcdpnid
, const DWORD dwFlags
)
294 FIXME("(%p)->(%p,%p,%x): stub\n", iface
, prgdpnid
, pcdpnid
, dwFlags
);
296 return DPNERR_GENERIC
;
299 static HRESULT WINAPI
IDirectPlay8PeerImpl_EnumGroupMembers(IDirectPlay8Peer
*iface
,
300 const DPNID dpnid
, DPNID
* const prgdpnid
, DWORD
* const pcdpnid
, const DWORD dwFlags
)
302 FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface
, dpnid
, prgdpnid
, pcdpnid
, dwFlags
);
304 return DPNERR_GENERIC
;
307 static HRESULT WINAPI
IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer
*iface
,
308 const DPN_PLAYER_INFO
* const pdpnPlayerInfo
, void * const pvAsyncContext
,
309 DPNHANDLE
* const phAsyncHandle
, const DWORD dwFlags
)
311 FIXME("(%p)->(%p,%p,%p,%x): stub\n", iface
, pdpnPlayerInfo
, pvAsyncContext
, phAsyncHandle
, dwFlags
);
313 return DPNERR_GENERIC
;
316 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetPeerInfo(IDirectPlay8Peer
*iface
, const DPNID dpnid
,
317 DPN_PLAYER_INFO
* const pdpnPlayerInfo
, DWORD
* const pdwSize
, const DWORD dwFlags
)
319 FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface
, dpnid
, pdpnPlayerInfo
, pdwSize
, dwFlags
);
321 return DPNERR_GENERIC
;
324 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetPeerAddress(IDirectPlay8Peer
*iface
,
325 const DPNID dpnid
, IDirectPlay8Address
** const pAddress
, const DWORD dwFlags
)
327 FIXME("(%p)->(%x,%p,%x): stub\n", iface
, dpnid
, pAddress
, dwFlags
);
329 return DPNERR_GENERIC
;
332 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetLocalHostAddresses(IDirectPlay8Peer
*iface
,
333 IDirectPlay8Address
** const prgpAddress
, DWORD
* const pcAddress
, const DWORD dwFlags
)
335 FIXME("(%p)->(%p,%p,%x): stub\n", iface
, prgpAddress
, pcAddress
, dwFlags
);
337 return DPNERR_GENERIC
;
340 static HRESULT WINAPI
IDirectPlay8PeerImpl_Close(IDirectPlay8Peer
*iface
, const DWORD dwFlags
)
342 FIXME("(%p)->(%x): stub\n", iface
, dwFlags
);
347 static HRESULT WINAPI
IDirectPlay8PeerImpl_EnumHosts(IDirectPlay8Peer
*iface
,
348 PDPN_APPLICATION_DESC
const pApplicationDesc
, IDirectPlay8Address
* const pAddrHost
,
349 IDirectPlay8Address
* const pDeviceInfo
, void * const pUserEnumData
,
350 const DWORD dwUserEnumDataSize
, const DWORD dwEnumCount
, const DWORD dwRetryInterval
,
351 const DWORD dwTimeOut
, void * const pvUserContext
, DPNHANDLE
* const pAsyncHandle
, const DWORD dwFlags
)
353 FIXME("(%p)->(%p,%p,%p,%p,%x,%x,%x,%x,%p,%p,%x): stub\n",
354 iface
, pApplicationDesc
, pAddrHost
, pDeviceInfo
, pUserEnumData
, dwUserEnumDataSize
, dwEnumCount
,
355 dwRetryInterval
, dwTimeOut
, pvUserContext
, pAsyncHandle
, dwFlags
);
357 return DPNERR_GENERIC
;
360 static HRESULT WINAPI
IDirectPlay8PeerImpl_DestroyPeer(IDirectPlay8Peer
*iface
, const DPNID dpnidClient
,
361 const void * const pvDestroyData
, const DWORD dwDestroyDataSize
, const DWORD dwFlags
)
363 FIXME("(%p)->(%x,%p,%x,%x): stub\n", iface
, dpnidClient
, pvDestroyData
, dwDestroyDataSize
, dwFlags
);
365 return DPNERR_GENERIC
;
368 static HRESULT WINAPI
IDirectPlay8PeerImpl_ReturnBuffer(IDirectPlay8Peer
*iface
, const DPNHANDLE hBufferHandle
,
371 FIXME("(%p)->(%x,%x): stub\n", iface
, hBufferHandle
, dwFlags
);
373 return DPNERR_GENERIC
;
376 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetPlayerContext(IDirectPlay8Peer
*iface
, const DPNID dpnid
,
377 void ** const ppvPlayerContext
, const DWORD dwFlags
)
379 FIXME("(%p)->(%x,%p,%x): stub\n", iface
, dpnid
, ppvPlayerContext
, dwFlags
);
381 return DPNERR_GENERIC
;
384 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetGroupContext(IDirectPlay8Peer
*iface
, const DPNID dpnid
,
385 void ** const ppvGroupContext
, const DWORD dwFlags
)
387 FIXME("(%p)->(%x,%p,%x): stub\n", iface
, dpnid
, ppvGroupContext
, dwFlags
);
389 return DPNERR_GENERIC
;
392 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetCaps(IDirectPlay8Peer
*iface
, DPN_CAPS
* const pdpCaps
,
395 FIXME("(%p)->(%p,%x): stub\n", iface
, pdpCaps
, dwFlags
);
397 return DPNERR_GENERIC
;
400 static HRESULT WINAPI
IDirectPlay8PeerImpl_SetCaps(IDirectPlay8Peer
*iface
, const DPN_CAPS
* const pdpCaps
,
403 FIXME("(%p)->(%p,%x): stub\n", iface
, pdpCaps
, dwFlags
);
405 return DPNERR_GENERIC
;
408 static HRESULT WINAPI
IDirectPlay8PeerImpl_SetSPCaps(IDirectPlay8Peer
*iface
, const GUID
* const pguidSP
,
409 const DPN_SP_CAPS
* const pdpspCaps
, const DWORD dwFlags
)
411 FIXME("(%p)->(%p,%p,%x): stub\n", iface
, pguidSP
, pdpspCaps
, dwFlags
);
413 return DPNERR_GENERIC
;
416 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetSPCaps(IDirectPlay8Peer
*iface
, const GUID
* const pguidSP
,
417 DPN_SP_CAPS
* const pdpspCaps
, const DWORD dwFlags
)
419 TRACE("(%p)->(%p,%p,%x)\n", iface
, pguidSP
, pdpspCaps
, dwFlags
);
421 if(pdpspCaps
->dwSize
!= sizeof(DPN_SP_CAPS
))
423 return DPNERR_INVALIDPARAM
;
426 pdpspCaps
->dwFlags
= DPNSPCAPS_SUPPORTSDPNSRV
| DPNSPCAPS_SUPPORTSBROADCAST
|
427 DPNSPCAPS_SUPPORTSALLADAPTERS
| DPNSPCAPS_SUPPORTSTHREADPOOL
;
428 pdpspCaps
->dwNumThreads
= 3;
429 pdpspCaps
->dwDefaultEnumCount
= 5;
430 pdpspCaps
->dwDefaultEnumRetryInterval
= 1500;
431 pdpspCaps
->dwDefaultEnumTimeout
= 1500;
432 pdpspCaps
->dwMaxEnumPayloadSize
= 983;
433 pdpspCaps
->dwBuffersPerThread
= 1;
434 pdpspCaps
->dwSystemBufferSize
= 0x10000;
439 static HRESULT WINAPI
IDirectPlay8PeerImpl_GetConnectionInfo(IDirectPlay8Peer
*iface
, const DPNID dpnid
,
440 DPN_CONNECTION_INFO
* const pdpConnectionInfo
, const DWORD dwFlags
)
442 FIXME("(%p)->(%x,%p,%x): stub\n", iface
, dpnid
, pdpConnectionInfo
, dwFlags
);
444 return DPNERR_GENERIC
;
447 static HRESULT WINAPI
IDirectPlay8PeerImpl_RegisterLobby(IDirectPlay8Peer
*iface
, const DPNHANDLE dpnHandle
,
448 struct IDirectPlay8LobbiedApplication
* const pIDP8LobbiedApplication
, const DWORD dwFlags
)
450 FIXME("(%p)->(%x,%p,%x): stub\n", iface
, dpnHandle
, pIDP8LobbiedApplication
, dwFlags
);
452 return DPNERR_GENERIC
;
455 static HRESULT WINAPI
IDirectPlay8PeerImpl_TerminateSession(IDirectPlay8Peer
*iface
, void * const pvTerminateData
,
456 const DWORD dwTerminateDataSize
, const DWORD dwFlags
)
458 FIXME("(%p)->(%p,%x,%x): stub\n", iface
, pvTerminateData
, dwTerminateDataSize
, dwFlags
);
460 return DPNERR_GENERIC
;
463 static const IDirectPlay8PeerVtbl DirectPlay8Peer_Vtbl
=
465 IDirectPlay8PeerImpl_QueryInterface
,
466 IDirectPlay8PeerImpl_AddRef
,
467 IDirectPlay8PeerImpl_Release
,
468 IDirectPlay8PeerImpl_Initialize
,
469 IDirectPlay8PeerImpl_EnumServiceProviders
,
470 IDirectPlay8PeerImpl_CancelAsyncOperation
,
471 IDirectPlay8PeerImpl_Connect
,
472 IDirectPlay8PeerImpl_SendTo
,
473 IDirectPlay8PeerImpl_GetSendQueueInfo
,
474 IDirectPlay8PeerImpl_Host
,
475 IDirectPlay8PeerImpl_GetApplicationDesc
,
476 IDirectPlay8PeerImpl_SetApplicationDesc
,
477 IDirectPlay8PeerImpl_CreateGroup
,
478 IDirectPlay8PeerImpl_DestroyGroup
,
479 IDirectPlay8PeerImpl_AddPlayerToGroup
,
480 IDirectPlay8PeerImpl_RemovePlayerFromGroup
,
481 IDirectPlay8PeerImpl_SetGroupInfo
,
482 IDirectPlay8PeerImpl_GetGroupInfo
,
483 IDirectPlay8PeerImpl_EnumPlayersAndGroups
,
484 IDirectPlay8PeerImpl_EnumGroupMembers
,
485 IDirectPlay8PeerImpl_SetPeerInfo
,
486 IDirectPlay8PeerImpl_GetPeerInfo
,
487 IDirectPlay8PeerImpl_GetPeerAddress
,
488 IDirectPlay8PeerImpl_GetLocalHostAddresses
,
489 IDirectPlay8PeerImpl_Close
,
490 IDirectPlay8PeerImpl_EnumHosts
,
491 IDirectPlay8PeerImpl_DestroyPeer
,
492 IDirectPlay8PeerImpl_ReturnBuffer
,
493 IDirectPlay8PeerImpl_GetPlayerContext
,
494 IDirectPlay8PeerImpl_GetGroupContext
,
495 IDirectPlay8PeerImpl_GetCaps
,
496 IDirectPlay8PeerImpl_SetCaps
,
497 IDirectPlay8PeerImpl_SetSPCaps
,
498 IDirectPlay8PeerImpl_GetSPCaps
,
499 IDirectPlay8PeerImpl_GetConnectionInfo
,
500 IDirectPlay8PeerImpl_RegisterLobby
,
501 IDirectPlay8PeerImpl_TerminateSession
504 HRESULT
DPNET_CreateDirectPlay8Peer(IClassFactory
*iface
, IUnknown
*pUnkOuter
, REFIID riid
, LPVOID
*ppobj
)
506 IDirectPlay8PeerImpl
* Client
;
509 Client
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirectPlay8PeerImpl
));
515 WARN("Not enough memory\n");
516 return E_OUTOFMEMORY
;
519 Client
->IDirectPlay8Peer_iface
.lpVtbl
= &DirectPlay8Peer_Vtbl
;
521 Client
->usercontext
= NULL
;
522 Client
->msghandler
= NULL
;
525 ret
= IDirectPlay8Peer_QueryInterface(&Client
->IDirectPlay8Peer_iface
, riid
, ppobj
);
526 IDirectPlay8Peer_Release(&Client
->IDirectPlay8Peer_iface
);