source: trunk/src/DPlayX/dplayx.cpp@ 940

Last change on this file since 940 was 940, checked in by phaller, 26 years ago

Add: incomplete port of DPLAYX from WINE

File size: 77.3 KB
Line 
1/* $Id: dplayx.cpp,v 1.1 1999-09-15 16:07:26 phaller Exp $ */
2
3/* Direct Play 3 and Direct Play Lobby 2 Implementation
4 *
5 * Copyright 1998,1999 - Peter Hunnisett
6 *
7 * <presently under construction - contact hunnise@nortelnetworks.com>
8 *
9 */
10#include <string.h>
11
12#include <odin.h>
13#define ICOM_CINTERFACE 1
14#define CINTERFACE
15
16#include "winerror.h"
17#include "winnt.h"
18#include "winreg.h"
19#include "dplay.h"
20#include "dplobby.h"
21#include "heap.h"
22#include "debugtools.h"
23
24#include <misc.h>
25#include <heapstring.h>
26
27DEFAULT_DEBUG_CHANNEL(dplay)
28
29/*****************************************************************************
30 * Predeclare the interface implementation structures
31 */
32typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyImpl;
33typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyAImpl;
34typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyWImpl;
35typedef struct IDirectPlayLobby2Impl IDirectPlayLobby2Impl;
36typedef struct IDirectPlayLobby2Impl IDirectPlayLobby2AImpl;
37typedef struct IDirectPlay2Impl IDirectPlay2Impl;
38typedef struct IDirectPlay2Impl IDirectPlay2AImpl;
39typedef struct IDirectPlay3Impl IDirectPlay3Impl;
40typedef struct IDirectPlay3Impl IDirectPlay3AImpl;
41
42/*****************************************************************************
43 * IDirectPlayLobby implementation structure
44 */
45struct IDirectPlayLobbyImpl
46{
47 /* IUnknown fields */
48 ICOM_VTABLE(IDirectPlayLobby)* lpvtbl;
49 DWORD ref;
50 /* IDirectPlayLobbyImpl fields */
51 DWORD dwConnFlags;
52 DPSESSIONDESC2 sessionDesc;
53 DPNAME playerName;
54 GUID guidSP;
55 LPVOID lpAddress;
56 DWORD dwAddressSize;
57};
58
59/*****************************************************************************
60 * IDirectPlayLobby2 implementation structure
61 */
62struct IDirectPlayLobby2Impl
63{
64 /* IUnknown fields */
65 ICOM_VTABLE(IDirectPlayLobby2)* lpvtbl;
66 DWORD ref;
67 /* IDirectPlayLobby2Impl fields */
68 DWORD dwConnFlags;
69 DPSESSIONDESC2 lpSessionDesc;
70 DPNAME lpPlayerName;
71 GUID guidSP;
72 LPVOID lpAddress;
73 DWORD dwAddressSize;
74};
75
76/*****************************************************************************
77 * IDirectPlay2 implementation structure
78 */
79struct IDirectPlay2Impl
80{
81 /* IUnknown fields */
82 ICOM_VTABLE(IDirectPlay2)* lpvtbl;
83 DWORD ref;
84 /* IDirectPlay2Impl fields */
85 /* none */
86};
87
88/*****************************************************************************
89 * IDirectPlay3 implementation structure
90 */
91struct IDirectPlay3Impl
92{
93 /* IUnknown fields */
94 ICOM_VTABLE(IDirectPlay3)* lpvtbl;
95 DWORD ref;
96 /* IDirectPlay3Impl fields */
97 /* none */
98};
99
100/* Forward declarations of virtual tables */
101extern ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyAVT;
102extern ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyWVT;
103extern ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2AVT;
104extern ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2WVT;
105extern ICOM_VTABLE(IDirectPlay2) directPlay2WVT;
106extern ICOM_VTABLE(IDirectPlay2) directPlay2AVT;
107extern ICOM_VTABLE(IDirectPlay3) directPlay3WVT;
108extern ICOM_VTABLE(IDirectPlay3) directPlay3AVT;
109
110
111
112
113/* Routine called when starting up the server thread */
114DWORD DPLobby_Spawn_Server( LPVOID startData )
115{
116 DPSESSIONDESC2* lpSession = (DPSESSIONDESC2*) startData;
117 DWORD sessionDwFlags = lpSession->dwFlags;
118
119 TRACE("spawing thread for lpConn=%p dwFlags=%08lx\n", lpSession, sessionDwFlags );
120 FIXME("thread needs something to do\n" );
121
122/*for(;;)*/
123 {
124
125 /* Check out the connection flags to determine what to do. Ensure we have
126 no leftover bits in this structure */
127 if( sessionDwFlags & DPSESSION_CLIENTSERVER )
128 {
129 /* This indicates that the application which is requesting the creation
130 * of this session is going to be the server (application/player)
131 */
132 if( sessionDwFlags & DPSESSION_SECURESERVER )
133 {
134 sessionDwFlags &= ~DPSESSION_SECURESERVER;
135 }
136 sessionDwFlags &= ~DPSESSION_CLIENTSERVER;
137 }
138
139 if( sessionDwFlags & DPSESSION_JOINDISABLED )
140 {
141 sessionDwFlags &= ~DPSESSION_JOINDISABLED;
142 }
143
144 if( sessionDwFlags & DPSESSION_KEEPALIVE )
145 {
146 sessionDwFlags &= ~DPSESSION_KEEPALIVE;
147 }
148
149 if( sessionDwFlags & DPSESSION_MIGRATEHOST )
150 {
151 sessionDwFlags &= ~DPSESSION_MIGRATEHOST;
152 }
153
154 if( sessionDwFlags & DPSESSION_MULTICASTSERVER )
155 {
156 sessionDwFlags &= ~DPSESSION_MULTICASTSERVER;
157 }
158
159 if( sessionDwFlags & DPSESSION_NEWPLAYERSDISABLED )
160 {
161 sessionDwFlags &= ~DPSESSION_NEWPLAYERSDISABLED;
162 }
163
164 if( sessionDwFlags & DPSESSION_NODATAMESSAGES )
165 {
166 sessionDwFlags &= ~DPSESSION_NODATAMESSAGES;
167 }
168
169 if( sessionDwFlags & DPSESSION_NOMESSAGEID )
170 {
171 sessionDwFlags &= ~DPSESSION_NOMESSAGEID;
172 }
173
174 if( sessionDwFlags & DPSESSION_PASSWORDREQUIRED )
175 {
176 sessionDwFlags &= ~DPSESSION_PASSWORDREQUIRED;
177 }
178
179 }
180
181 ExitThread(0);
182 return 0;
183}
184
185
186/*********************************************************
187 *
188 * Direct Play and Direct Play Lobby Interface Implementation
189 *
190 *********************************************************/
191
192/* The COM interface for upversioning an interface
193 * We've been given a GUID (riid) and we need to replace the present
194 * interface with that of the requested interface.
195 *
196 * Snip from some Microsoft document:
197 * There are four requirements for implementations of QueryInterface (In these
198 * cases, "must succeed" means "must succeed barring catastrophic failure."):
199 *
200 * * The set of interfaces accessible on an object through
201 * IUnknown::QueryInterface must be static, not dynamic. This means that
202 * if a call to QueryInterface for a pointer to a specified interface
203 * succeeds the first time, it must succeed again, and if it fails the
204 * first time, it must fail on all subsequent queries.
205 * * It must be symmetric ~W if a client holds a pointer to an interface on
206 * an object, and queries for that interface, the call must succeed.
207 * * It must be reflexive ~W if a client holding a pointer to one interface
208 * queries successfully for another, a query through the obtained pointer
209 * for the first interface must succeed.
210 * * It must be transitive ~W if a client holding a pointer to one interface
211 * queries successfully for a second, and through that pointer queries
212 * successfully for a third interface, a query for the first interface
213 * through the pointer for the third interface must succeed.
214 *
215 * As you can see, this interface doesn't qualify but will most likely
216 * be good enough for the time being.
217 */
218
219/* Helper function for DirectPlayLobby QueryInterface */
220static HRESULT directPlayLobby_QueryInterface
221 ( REFIID riid, LPVOID* ppvObj )
222{
223
224 if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
225 {
226 IDirectPlayLobbyImpl* lpDpL = (IDirectPlayLobbyImpl*)(*ppvObj);
227
228 lpDpL = (IDirectPlayLobbyImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
229 sizeof( *lpDpL ) );
230
231 if( !lpDpL )
232 {
233 return E_NOINTERFACE;
234 }
235
236 lpDpL->lpvtbl = &directPlayLobbyWVT;
237 lpDpL->ref = 1;
238
239 return S_OK;
240 }
241 else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
242 {
243 IDirectPlayLobbyAImpl* lpDpL = (IDirectPlayLobbyAImpl*)(*ppvObj);
244
245 lpDpL = (IDirectPlayLobbyAImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
246 sizeof( *lpDpL ) );
247
248 if( !lpDpL )
249 {
250 return E_NOINTERFACE;
251 }
252
253 lpDpL->lpvtbl = &directPlayLobbyAVT;
254 lpDpL->ref = 1;
255
256 return S_OK;
257 }
258 else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
259 {
260 IDirectPlayLobby2Impl* lpDpL = (IDirectPlayLobby2Impl*)(*ppvObj);
261
262 lpDpL = (IDirectPlayLobby2Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
263 sizeof( *lpDpL ) );
264
265 if( !lpDpL )
266 {
267 return E_NOINTERFACE;
268 }
269
270 lpDpL->lpvtbl = &directPlayLobby2WVT;
271 lpDpL->ref = 1;
272
273 return S_OK;
274 }
275 else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
276 {
277 IDirectPlayLobby2AImpl* lpDpL = (IDirectPlayLobby2AImpl*)(*ppvObj);
278
279 lpDpL = (IDirectPlayLobby2AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
280 sizeof( *lpDpL ) );
281
282 if( !lpDpL )
283 {
284 return E_NOINTERFACE;
285 }
286
287 lpDpL->lpvtbl = &directPlayLobby2AVT;
288 lpDpL->ref = 1;
289
290 return S_OK;
291 }
292
293 /* Unknown interface */
294 *ppvObj = NULL;
295 return E_NOINTERFACE;
296}
297static HRESULT WINAPI IDirectPlayLobbyAImpl_QueryInterface
298( LPDIRECTPLAYLOBBYA iface,
299 REFIID riid,
300 LPVOID* ppvObj )
301{
302 ICOM_THIS(IDirectPlayLobby2Impl,iface);
303 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
304
305 if( IsEqualGUID( &IID_IUnknown, riid ) ||
306 IsEqualGUID( &IID_IDirectPlayLobbyA, riid )
307 )
308 {
309 IDirectPlayLobby_AddRef( iface );
310 *ppvObj = This;
311 return S_OK;
312 }
313
314 return directPlayLobby_QueryInterface( riid, ppvObj );
315
316}
317
318static HRESULT WINAPI IDirectPlayLobbyW_QueryInterface
319( LPDIRECTPLAYLOBBY iface,
320 REFIID riid,
321 LPVOID* ppvObj )
322{
323 ICOM_THIS(IDirectPlayLobbyImpl,iface);
324 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
325
326 if( IsEqualGUID( &IID_IUnknown, riid ) ||
327 IsEqualGUID( &IID_IDirectPlayLobby, riid )
328 )
329 {
330 IDirectPlayLobby_AddRef( iface );
331 *ppvObj = This;
332 return S_OK;
333 }
334
335 return directPlayLobby_QueryInterface( riid, ppvObj );
336}
337
338
339static HRESULT WINAPI IDirectPlayLobby2AImpl_QueryInterface
340( LPDIRECTPLAYLOBBY2A iface,
341 REFIID riid,
342 LPVOID* ppvObj )
343{
344 ICOM_THIS(IDirectPlayLobby2Impl,iface);
345 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
346
347 /* Compare riids. We know this object is a direct play lobby 2A object.
348 If we are asking about the same type of interface we're fine.
349 */
350 if( IsEqualGUID( &IID_IUnknown, riid ) ||
351 IsEqualGUID( &IID_IDirectPlayLobby2A, riid )
352 )
353 {
354 IDirectPlayLobby2_AddRef( iface );
355 *ppvObj = This;
356 return S_OK;
357 }
358 return directPlayLobby_QueryInterface( riid, ppvObj );
359}
360
361static HRESULT WINAPI IDirectPlayLobby2WImpl_QueryInterface
362( LPDIRECTPLAYLOBBY2 iface,
363 REFIID riid,
364 LPVOID* ppvObj )
365{
366 ICOM_THIS(IDirectPlayLobby2Impl,iface);
367
368 /* Compare riids. We know this object is a direct play lobby 2 object.
369 If we are asking about the same type of interface we're fine.
370 */
371 if( IsEqualGUID( &IID_IUnknown, riid ) ||
372 IsEqualGUID( &IID_IDirectPlayLobby2, riid )
373 )
374 {
375 IDirectPlayLobby2_AddRef( iface );
376 *ppvObj = This;
377 return S_OK;
378 }
379
380 return directPlayLobby_QueryInterface( riid, ppvObj );
381
382}
383
384/*
385 * Simple procedure. Just increment the reference count to this
386 * structure and return the new reference count.
387 */
388static ULONG WINAPI IDirectPlayLobby2AImpl_AddRef
389( LPDIRECTPLAYLOBBY2A iface )
390{
391 ICOM_THIS(IDirectPlayLobby2Impl,iface);
392 ++(This->ref);
393 TRACE("ref count now %lu\n", This->ref );
394 return (This->ref);
395}
396
397static ULONG WINAPI IDirectPlayLobby2WImpl_AddRef
398( LPDIRECTPLAYLOBBY2 iface )
399{
400 ICOM_THIS(IDirectPlayLobby2Impl,iface);
401 return IDirectPlayLobby2AImpl_AddRef( (LPDIRECTPLAYLOBBY2) This );
402}
403
404
405/*
406 * Simple COM procedure. Decrease the reference count to this object.
407 * If the object no longer has any reference counts, free up the associated
408 * memory.
409 */
410static ULONG WINAPI IDirectPlayLobby2AImpl_Release
411( LPDIRECTPLAYLOBBY2A iface )
412{
413 ICOM_THIS(IDirectPlayLobby2Impl,iface);
414 TRACE("ref count decremeneted from %lu\n", This->ref );
415
416 This->ref--;
417
418 /* Deallocate if this is the last reference to the object */
419 if( !(This->ref) )
420 {
421 FIXME("memory leak\n" );
422 /* Implement memory deallocation */
423
424 HeapFree( GetProcessHeap(), 0, This );
425
426 return 0;
427 }
428
429 return This->ref;
430}
431
432static ULONG WINAPI IDirectPlayLobby2WImpl_Release
433( LPDIRECTPLAYLOBBY2 iface )
434{
435 ICOM_THIS(IDirectPlayLobby2Impl,iface);
436 return IDirectPlayLobby2AImpl_Release( (LPDIRECTPLAYLOBBY2A) This );
437}
438
439
440/********************************************************************
441 *
442 * Connects an application to the session specified by the DPLCONNECTION
443 * structure currently stored with the DirectPlayLobby object.
444 *
445 * Returns a IDirectPlay interface.
446 *
447 */
448static HRESULT WINAPI IDirectPlayLobby2AImpl_Connect
449( LPDIRECTPLAYLOBBY2A iface,
450 DWORD dwFlags,
451 LPDIRECTPLAY2* lplpDP,
452 IUnknown* pUnk)
453{
454 FIXME(": dwFlags=%08lx %p %p stub\n", dwFlags, lplpDP, pUnk );
455 return DPERR_OUTOFMEMORY;
456}
457
458static HRESULT WINAPI IDirectPlayLobby2WImpl_Connect
459( LPDIRECTPLAYLOBBY2 iface,
460 DWORD dwFlags,
461 LPDIRECTPLAY2* lplpDP,
462 IUnknown* pUnk)
463{
464 ICOM_THIS(IDirectPlayLobby2Impl,iface);
465 LPDIRECTPLAY2* directPlay2W;
466 HRESULT createRC;
467
468 FIXME("(%p)->(%08lx,%p,%p): stub\n", This, dwFlags, lplpDP, pUnk );
469
470 if( dwFlags )
471 {
472 return DPERR_INVALIDPARAMS;
473 }
474
475 if( ( createRC = DirectPlayCreate( (LPGUID)&IID_IDirectPlayLobby2, lplpDP, pUnk ) ) != DP_OK )
476 {
477 ERR("error creating Direct Play 2W interface. Return Code = %ld.\n", createRC );
478 return createRC;
479 }
480
481 /* This should invoke IDirectPlay3::InitializeConnection IDirectPlay3::Open */
482 directPlay2W = lplpDP;
483
484
485
486
487#if 0
488 /* All the stuff below this is WRONG! */
489 if( This->lpSession->dwFlags == DPLCONNECTION_CREATESESSION )
490 {
491 DWORD threadIdSink;
492
493 /* Spawn a thread to deal with all of this and to handle the incomming requests */
494 threadIdSink = CreateThread( NULL, 0, &DPLobby_Spawn_Server,
495 (LPVOID)This->lpSession->lpConn->lpSessionDesc, 0, &threadIdSink );
496
497 }
498 else if ( This->lpSession->dwFlags == DPLCONNECTION_JOINSESSION )
499 {
500 /* Let's search for a matching session */
501 FIXME("joining session not yet supported.\n");
502 return DPERR_OUTOFMEMORY;
503 }
504 else /* Unknown type of connection request */
505 {
506 ERR(": Unknown connection request lpConn->dwFlags=%08lx\n",
507 lpConn->dwFlags );
508
509 return DPERR_OUTOFMEMORY;
510 }
511
512 /* This does the work of the following methods...
513 IDirectPlay3::InitializeConnection,
514 IDirectPlay3::EnumSessions,
515 IDirectPlay3::Open
516 */
517
518
519#endif
520
521 return DP_OK;
522
523}
524
525/********************************************************************
526 *
527 * Creates a DirectPlay Address, given a service provider-specific network
528 * address.
529 * Returns an address contains the globally unique identifier
530 * (GUID) of the service provider and data that the service provider can
531 * interpret as a network address.
532 *
533 */
534static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateAddress
535( LPDIRECTPLAYLOBBY2A iface,
536 REFGUID guidSP,
537 REFGUID guidDataType,
538 LPCVOID lpData,
539 DWORD dwDataSize,
540 LPVOID lpAddress,
541 LPDWORD lpdwAddressSize )
542{
543 FIXME(":stub\n");
544 return DPERR_OUTOFMEMORY;
545}
546
547static HRESULT WINAPI IDirectPlayLobby2WImpl_CreateAddress
548( LPDIRECTPLAYLOBBY2 iface,
549 REFGUID guidSP,
550 REFGUID guidDataType,
551 LPCVOID lpData,
552 DWORD dwDataSize,
553 LPVOID lpAddress,
554 LPDWORD lpdwAddressSize )
555{
556 FIXME(":stub\n");
557 return DPERR_OUTOFMEMORY;
558}
559
560
561/********************************************************************
562 *
563 * Parses out chunks from the DirectPlay Address buffer by calling the
564 * given callback function, with lpContext, for each of the chunks.
565 *
566 */
567static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumAddress
568( LPDIRECTPLAYLOBBY2A iface,
569 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
570 LPCVOID lpAddress,
571 DWORD dwAddressSize,
572 LPVOID lpContext )
573{
574 FIXME(":stub\n");
575 return DPERR_OUTOFMEMORY;
576}
577
578static HRESULT WINAPI IDirectPlayLobby2WImpl_EnumAddress
579( LPDIRECTPLAYLOBBY2 iface,
580 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
581 LPCVOID lpAddress,
582 DWORD dwAddressSize,
583 LPVOID lpContext )
584{
585 FIXME(":stub\n");
586 return DPERR_OUTOFMEMORY;
587}
588
589/********************************************************************
590 *
591 * Enumerates all the address types that a given service provider needs to
592 * build the DirectPlay Address.
593 *
594 */
595static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes
596( LPDIRECTPLAYLOBBYA iface,
597 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
598 REFGUID guidSP,
599 LPVOID lpContext,
600 DWORD dwFlags )
601{
602 FIXME(":stub\n");
603 return DPERR_OUTOFMEMORY;
604}
605
606static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumAddressTypes
607( LPDIRECTPLAYLOBBY2A iface,
608 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
609 REFGUID guidSP,
610 LPVOID lpContext,
611 DWORD dwFlags )
612{
613 ICOM_THIS(IDirectPlayLobby2Impl,iface);
614 return IDirectPlayLobbyAImpl_EnumAddressTypes( (LPDIRECTPLAYLOBBYA)This, lpEnumAddressTypeCallback,
615 guidSP, lpContext, dwFlags );
616}
617
618static HRESULT WINAPI IDirectPlayLobby2WImpl_EnumAddressTypes
619( LPDIRECTPLAYLOBBY2 iface,
620 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
621 REFGUID guidSP,
622 LPVOID lpContext,
623 DWORD dwFlags )
624{
625 FIXME(":stub\n");
626 return DPERR_OUTOFMEMORY;
627}
628
629/********************************************************************
630 *
631 * Enumerates what applications are registered with DirectPlay by
632 * invoking the callback function with lpContext.
633 *
634 */
635static HRESULT WINAPI IDirectPlayLobbyW_EnumLocalApplications
636( LPDIRECTPLAYLOBBY iface,
637 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
638 LPVOID lpContext,
639 DWORD dwFlags )
640{
641 FIXME(":stub\n");
642 return DPERR_OUTOFMEMORY;
643}
644
645static HRESULT WINAPI IDirectPlayLobby2WImpl_EnumLocalApplications
646( LPDIRECTPLAYLOBBY2 iface,
647 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
648 LPVOID lpContext,
649 DWORD dwFlags )
650{
651 ICOM_THIS(IDirectPlayLobby2Impl,iface);
652 return IDirectPlayLobbyW_EnumLocalApplications( (LPDIRECTPLAYLOBBY)This, a,
653 lpContext, dwFlags );
654}
655
656static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumLocalApplications
657( LPDIRECTPLAYLOBBYA iface,
658 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
659 LPVOID lpContext,
660 DWORD dwFlags )
661{
662 FIXME(":stub\n");
663 return DPERR_OUTOFMEMORY;
664}
665
666static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumLocalApplications
667( LPDIRECTPLAYLOBBY2A iface,
668 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
669 LPVOID lpContext,
670 DWORD dwFlags )
671{
672 ICOM_THIS(IDirectPlayLobby2Impl,iface);
673 return IDirectPlayLobbyAImpl_EnumLocalApplications( (LPDIRECTPLAYLOBBYA)This, a,
674 lpContext, dwFlags );
675}
676
677
678/********************************************************************
679 *
680 * Retrieves the DPLCONNECTION structure that contains all the information
681 * needed to start and connect an application. This was generated using
682 * either the RunApplication or SetConnectionSettings methods.
683 *
684 * NOTES: If lpData is NULL then just return lpdwDataSize. This allows
685 * the data structure to be allocated by our caller which can then
686 * call this procedure/method again with a valid data pointer.
687 */
688static HRESULT WINAPI IDirectPlayLobbyAImpl_GetConnectionSettings
689( LPDIRECTPLAYLOBBYA iface,
690 DWORD dwAppID,
691 LPVOID lpData,
692 LPDWORD lpdwDataSize )
693{
694 ICOM_THIS(IDirectPlayLobbyImpl,iface);
695 LPDPLCONNECTION lpDplConnection;
696
697 FIXME(": semi stub (%p)->(0x%08lx,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
698
699 /* Application is requesting us to give the required size */
700 if ( !lpData )
701 {
702 /* Let's check the size of the buffer that the application has allocated */
703 if( *lpdwDataSize >= sizeof( DPLCONNECTION ) )
704 {
705 return DP_OK;
706 }
707 else
708 {
709 *lpdwDataSize = sizeof( DPLCONNECTION );
710 return DPERR_BUFFERTOOSMALL;
711 }
712 }
713
714 /* Fill in the fields - let them just use the ptrs */
715 lpDplConnection = (LPDPLCONNECTION)lpData;
716
717 /* Make sure we were given the right size */
718 if( lpDplConnection->dwSize < sizeof( DPLCONNECTION ) )
719 {
720 ERR("bad passed size 0x%08lx.\n", lpDplConnection->dwSize );
721 return DPERR_INVALIDPARAMS;
722 }
723
724 /* Copy everything we've got into here */
725 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
726 lpDplConnection->dwFlags = This->dwConnFlags;
727
728 /* Copy LPDPSESSIONDESC2 struct */
729 lpDplConnection->lpSessionDesc = (tagDPSESSIONDESC2*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( This->sessionDesc ) );
730 memcpy( lpDplConnection->lpSessionDesc, &(This->sessionDesc), sizeof( This->sessionDesc ) );
731
732 if( This->sessionDesc.sess.lpszSessionName )
733 {
734 lpDplConnection->lpSessionDesc->sess.lpszSessionName =
735 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->sessionDesc.sess.lpszSessionName );
736 }
737
738 if( This->sessionDesc.pass.lpszPassword )
739 {
740 lpDplConnection->lpSessionDesc->pass.lpszPassword =
741 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->sessionDesc.pass.lpszPassword );
742 }
743
744 /* I don't know what to use the reserved for. We'll set it to 0 just for fun */
745 This->sessionDesc.dwReserved1 = This->sessionDesc.dwReserved2 = 0;
746
747 /* Copy DPNAME struct - seems to be optional - check for existance first */
748 lpDplConnection->lpPlayerName = (tagDPNAME*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( This->playerName ) );
749 memcpy( lpDplConnection->lpPlayerName, &(This->playerName), sizeof( This->playerName ) );
750
751 if( This->playerName.psn.lpszShortName )
752 {
753 lpDplConnection->lpPlayerName->psn.lpszShortName =
754 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->playerName.psn.lpszShortName );
755 }
756
757 if( This->playerName.pln.lpszLongName )
758 {
759 lpDplConnection->lpPlayerName->pln.lpszLongName =
760 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->playerName.pln.lpszLongName );
761 }
762
763
764
765 memcpy( &(lpDplConnection->guidSP), &(This->guidSP), sizeof( This->guidSP ) );
766
767 lpDplConnection->lpAddress = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, This->dwAddressSize );
768 memcpy( lpDplConnection->lpAddress, This->lpAddress, This->dwAddressSize );
769
770 lpDplConnection->dwAddressSize = This->dwAddressSize;
771
772 return DP_OK;
773}
774
775static HRESULT WINAPI IDirectPlayLobby2AImpl_GetConnectionSettings
776( LPDIRECTPLAYLOBBY2A iface,
777 DWORD dwAppID,
778 LPVOID lpData,
779 LPDWORD lpdwDataSize )
780{
781 ICOM_THIS(IDirectPlayLobby2Impl,iface);
782 return IDirectPlayLobbyAImpl_GetConnectionSettings( (LPDIRECTPLAYLOBBYA)This,
783 dwAppID, lpData, lpdwDataSize );
784}
785
786static HRESULT WINAPI IDirectPlayLobbyWImpl_GetConnectionSettings
787( LPDIRECTPLAYLOBBY iface,
788 DWORD dwAppID,
789 LPVOID lpData,
790 LPDWORD lpdwDataSize )
791{
792 ICOM_THIS(IDirectPlayLobbyImpl,iface);
793 FIXME(":semi stub %p %08lx %p %p \n", This, dwAppID, lpData, lpdwDataSize );
794
795 /* Application is requesting us to give the required size */
796 if ( !lpData )
797 {
798 /* Let's check the size of the buffer that the application has allocated */
799 if( *lpdwDataSize >= sizeof( DPLCONNECTION ) )
800 {
801 return DP_OK;
802 }
803 else
804 {
805 *lpdwDataSize = sizeof( DPLCONNECTION );
806 return DPERR_BUFFERTOOSMALL;
807 }
808 }
809
810 /* Fill in the fields - let them just use the ptrs */
811 FIXME("stub\n" );
812
813 return DP_OK;
814}
815
816static HRESULT WINAPI IDirectPlayLobby2WImpl_GetConnectionSettings
817( LPDIRECTPLAYLOBBY2 iface,
818 DWORD dwAppID,
819 LPVOID lpData,
820 LPDWORD lpdwDataSize )
821{
822 ICOM_THIS(IDirectPlayLobby2Impl,iface);
823 return IDirectPlayLobbyWImpl_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This,
824 dwAppID, lpData, lpdwDataSize );
825}
826
827/********************************************************************
828 *
829 * Retrieves the message sent between a lobby client and a DirectPlay
830 * application. All messages are queued until received.
831 *
832 */
833static HRESULT WINAPI IDirectPlayLobbyAImpl_ReceiveLobbyMessage
834( LPDIRECTPLAYLOBBYA iface,
835 DWORD dwFlags,
836 DWORD dwAppID,
837 LPDWORD lpdwMessageFlags,
838 LPVOID lpData,
839 LPDWORD lpdwDataSize )
840{
841 ICOM_THIS(IDirectPlayLobbyImpl,iface);
842 FIXME(":stub %p %08lx %08lx %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
843 lpdwDataSize );
844 return DPERR_OUTOFMEMORY;
845}
846
847static HRESULT WINAPI IDirectPlayLobby2AImpl_ReceiveLobbyMessage
848( LPDIRECTPLAYLOBBY2A iface,
849 DWORD dwFlags,
850 DWORD dwAppID,
851 LPDWORD lpdwMessageFlags,
852 LPVOID lpData,
853 LPDWORD lpdwDataSize )
854{
855 ICOM_THIS(IDirectPlayLobby2Impl,iface);
856 return IDirectPlayLobbyAImpl_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBYA)This, dwFlags, dwAppID,
857 lpdwMessageFlags, lpData, lpdwDataSize );
858}
859
860
861static HRESULT WINAPI IDirectPlayLobbyW_ReceiveLobbyMessage
862( LPDIRECTPLAYLOBBY iface,
863 DWORD dwFlags,
864 DWORD dwAppID,
865 LPDWORD lpdwMessageFlags,
866 LPVOID lpData,
867 LPDWORD lpdwDataSize )
868{
869 ICOM_THIS(IDirectPlayLobbyImpl,iface);
870 FIXME(":stub %p %08lx %08lx %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
871 lpdwDataSize );
872 return DPERR_OUTOFMEMORY;
873}
874
875static HRESULT WINAPI IDirectPlayLobby2WImpl_ReceiveLobbyMessage
876( LPDIRECTPLAYLOBBY2 iface,
877 DWORD dwFlags,
878 DWORD dwAppID,
879 LPDWORD lpdwMessageFlags,
880 LPVOID lpData,
881 LPDWORD lpdwDataSize )
882{
883 ICOM_THIS(IDirectPlayLobby2Impl,iface);
884 return IDirectPlayLobbyW_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBY)This, dwFlags, dwAppID,
885 lpdwMessageFlags, lpData, lpdwDataSize );
886}
887
888/********************************************************************
889 *
890 * Starts an application and passes to it all the information to
891 * connect to a session.
892 *
893 */
894static HRESULT WINAPI IDirectPlayLobbyAImpl_RunApplication
895( LPDIRECTPLAYLOBBYA iface,
896 DWORD dwFlags,
897 LPDWORD lpdwAppID,
898 LPDPLCONNECTION lpConn,
899 HANDLE hReceiveEvent )
900{
901 FIXME(":stub\n");
902 return DPERR_OUTOFMEMORY;
903}
904
905static HRESULT WINAPI IDirectPlayLobby2AImpl_RunApplication
906( LPDIRECTPLAYLOBBY2A iface,
907 DWORD dwFlags,
908 LPDWORD lpdwAppID,
909 LPDPLCONNECTION lpConn,
910 HANDLE hReceiveEvent )
911{
912 ICOM_THIS(IDirectPlayLobby2Impl,iface);
913 return IDirectPlayLobbyAImpl_RunApplication( (LPDIRECTPLAYLOBBYA)This, dwFlags,
914 lpdwAppID, lpConn, hReceiveEvent );
915}
916
917static HRESULT WINAPI IDirectPlayLobbyW_RunApplication
918( LPDIRECTPLAYLOBBY iface,
919 DWORD dwFlags,
920 LPDWORD lpdwAppID,
921 LPDPLCONNECTION lpConn,
922 HANDLE hReceiveEvent )
923{
924 FIXME(":stub\n");
925 return DPERR_OUTOFMEMORY;
926}
927
928static HRESULT WINAPI IDirectPlayLobby2WImpl_RunApplication
929( LPDIRECTPLAYLOBBY2 iface,
930 DWORD dwFlags,
931 LPDWORD lpdwAppID,
932 LPDPLCONNECTION lpConn,
933 HANDLE hReceiveEvent )
934{
935 ICOM_THIS(IDirectPlayLobby2Impl,iface);
936 return IDirectPlayLobbyW_RunApplication( (LPDIRECTPLAYLOBBY)This, dwFlags,
937 lpdwAppID, lpConn, hReceiveEvent );
938}
939
940
941/********************************************************************
942 *
943 * Sends a message between the application and the lobby client.
944 * All messages are queued until received.
945 *
946 */
947static HRESULT WINAPI IDirectPlayLobbyAImpl_SendLobbyMessage
948( LPDIRECTPLAYLOBBYA iface,
949 DWORD dwFlags,
950 DWORD dwAppID,
951 LPVOID lpData,
952 DWORD dwDataSize )
953{
954 FIXME(":stub\n");
955 return DPERR_OUTOFMEMORY;
956}
957
958static HRESULT WINAPI IDirectPlayLobby2AImpl_SendLobbyMessage
959( LPDIRECTPLAYLOBBY2A iface,
960 DWORD dwFlags,
961 DWORD dwAppID,
962 LPVOID lpData,
963 DWORD dwDataSize )
964{
965 ICOM_THIS(IDirectPlayLobby2Impl,iface);
966 return IDirectPlayLobbyAImpl_SendLobbyMessage( (LPDIRECTPLAYLOBBYA)This, dwFlags,
967 dwAppID, lpData, dwDataSize );
968}
969
970
971static HRESULT WINAPI IDirectPlayLobbyW_SendLobbyMessage
972( LPDIRECTPLAYLOBBY iface,
973 DWORD dwFlags,
974 DWORD dwAppID,
975 LPVOID lpData,
976 DWORD dwDataSize )
977{
978 FIXME(":stub\n");
979 return DPERR_OUTOFMEMORY;
980}
981
982static HRESULT WINAPI IDirectPlayLobby2WImpl_SendLobbyMessage
983( LPDIRECTPLAYLOBBY2 iface,
984 DWORD dwFlags,
985 DWORD dwAppID,
986 LPVOID lpData,
987 DWORD dwDataSize )
988{
989 ICOM_THIS(IDirectPlayLobby2Impl,iface);
990 return IDirectPlayLobbyW_SendLobbyMessage( (LPDIRECTPLAYLOBBY)This, dwFlags,
991 dwAppID, lpData, dwDataSize );
992}
993
994/********************************************************************
995 *
996 * Modifies the DPLCONNECTION structure to contain all information
997 * needed to start and connect an application.
998 *
999 */
1000static HRESULT WINAPI IDirectPlayLobbyW_SetConnectionSettings
1001( LPDIRECTPLAYLOBBY iface,
1002 DWORD dwFlags,
1003 DWORD dwAppID,
1004 LPDPLCONNECTION lpConn )
1005{
1006 ICOM_THIS(IDirectPlayLobbyImpl,iface);
1007 TRACE(": This=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p\n",
1008 This, dwFlags, dwAppID, lpConn );
1009
1010 /* Paramater check */
1011 if( dwFlags || !This || !lpConn )
1012 {
1013 ERR("invalid parameters.\n");
1014 return DPERR_INVALIDPARAMS;
1015 }
1016
1017 /* See if there is a connection associated with this request.
1018 * dwAppID == 0 indicates that this request isn't associated with a connection.
1019 */
1020 if( dwAppID )
1021 {
1022 FIXME(": Connection dwAppID=%08lx given. Not implemented yet.\n",
1023 dwAppID );
1024
1025 /* Need to add a check for this application Id...*/
1026 return DPERR_NOTLOBBIED;
1027 }
1028
1029 if( lpConn->dwSize != sizeof(DPLCONNECTION) )
1030 {
1031 ERR(": old/new DPLCONNECTION type? Size=%08lx vs. expected=%ul bytes\n",
1032 lpConn->dwSize, sizeof( DPLCONNECTION ) );
1033 return DPERR_INVALIDPARAMS;
1034 }
1035
1036 /* Need to investigate the lpConn->lpSessionDesc to figure out
1037 * what type of session we need to join/create.
1038 */
1039 if( (!lpConn->lpSessionDesc ) ||
1040 ( lpConn->lpSessionDesc->dwSize != sizeof( DPSESSIONDESC2 ) )
1041 )
1042 {
1043 ERR("DPSESSIONDESC passed in? Size=%08lx vs. expected=%ul bytes\n",
1044 lpConn->lpSessionDesc->dwSize, sizeof( DPSESSIONDESC2 ) );
1045 return DPERR_INVALIDPARAMS;
1046 }
1047
1048 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
1049 This->dwConnFlags = lpConn->dwFlags;
1050
1051 /* Copy LPDPSESSIONDESC2 struct - this is required */
1052 memcpy( &(This->sessionDesc), lpConn->lpSessionDesc, sizeof( *(lpConn->lpSessionDesc) ) );
1053
1054 if( lpConn->lpSessionDesc->sess.lpszSessionName )
1055 This->sessionDesc.sess.lpszSessionName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpSessionDesc->sess.lpszSessionName );
1056 else
1057 This->sessionDesc.sess.lpszSessionName = NULL;
1058
1059 if( lpConn->lpSessionDesc->pass.lpszPassword )
1060 This->sessionDesc.pass.lpszPassword = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpSessionDesc->pass.lpszPassword );
1061 else
1062 This->sessionDesc.pass.lpszPassword = NULL;
1063
1064 /* I don't know what to use the reserved for ... */
1065 This->sessionDesc.dwReserved1 = This->sessionDesc.dwReserved2 = 0;
1066
1067 /* Copy DPNAME struct - seems to be optional - check for existance first */
1068 if( lpConn->lpPlayerName )
1069 {
1070 memcpy( &(This->playerName), lpConn->lpPlayerName, sizeof( *lpConn->lpPlayerName ) );
1071
1072 if( lpConn->lpPlayerName->psn.lpszShortName )
1073 This->playerName.psn.lpszShortName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpPlayerName->psn.lpszShortName );
1074
1075 if( lpConn->lpPlayerName->pln.lpszLongName )
1076 This->playerName.pln.lpszLongName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpPlayerName->pln.lpszLongName );
1077
1078 }
1079
1080 memcpy( &(This->guidSP), &(lpConn->guidSP), sizeof( lpConn->guidSP ) );
1081
1082 This->lpAddress = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->dwAddressSize );
1083 memcpy( This->lpAddress, lpConn->lpAddress, lpConn->dwAddressSize );
1084
1085 This->dwAddressSize = lpConn->dwAddressSize;
1086
1087 return DP_OK;
1088}
1089
1090static HRESULT WINAPI IDirectPlayLobby2WImpl_SetConnectionSettings
1091( LPDIRECTPLAYLOBBY2 iface,
1092 DWORD dwFlags,
1093 DWORD dwAppID,
1094 LPDPLCONNECTION lpConn )
1095{
1096 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1097 return IDirectPlayLobbyW_SetConnectionSettings( (LPDIRECTPLAYLOBBY)This,
1098 dwFlags, dwAppID, lpConn );
1099}
1100
1101static HRESULT WINAPI IDirectPlayLobbyAImpl_SetConnectionSettings
1102( LPDIRECTPLAYLOBBYA iface,
1103 DWORD dwFlags,
1104 DWORD dwAppID,
1105 LPDPLCONNECTION lpConn )
1106{
1107 ICOM_THIS(IDirectPlayLobbyImpl,iface);
1108 FIXME(": This=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p: stub\n",
1109 This, dwFlags, dwAppID, lpConn );
1110 return DPERR_OUTOFMEMORY;
1111}
1112
1113static HRESULT WINAPI IDirectPlayLobby2AImpl_SetConnectionSettings
1114( LPDIRECTPLAYLOBBY2A iface,
1115 DWORD dwFlags,
1116 DWORD dwAppID,
1117 LPDPLCONNECTION lpConn )
1118{
1119 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1120 return IDirectPlayLobbyAImpl_SetConnectionSettings( (LPDIRECTPLAYLOBBYA)This,
1121 dwFlags, dwAppID, lpConn );
1122}
1123
1124/********************************************************************
1125 *
1126 * Registers an event that will be set when a lobby message is received.
1127 *
1128 */
1129static HRESULT WINAPI IDirectPlayLobbyAImpl_SetLobbyMessageEvent
1130( LPDIRECTPLAYLOBBYA iface,
1131 DWORD dwFlags,
1132 DWORD dwAppID,
1133 HANDLE hReceiveEvent )
1134{
1135 FIXME(":stub\n");
1136 return DPERR_OUTOFMEMORY;
1137}
1138
1139static HRESULT WINAPI IDirectPlayLobby2AImpl_SetLobbyMessageEvent
1140( LPDIRECTPLAYLOBBY2A iface,
1141 DWORD dwFlags,
1142 DWORD dwAppID,
1143 HANDLE hReceiveEvent )
1144{
1145 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1146 return IDirectPlayLobbyAImpl_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBYA)This, dwFlags,
1147 dwAppID, hReceiveEvent );
1148}
1149
1150static HRESULT WINAPI IDirectPlayLobbyW_SetLobbyMessageEvent
1151( LPDIRECTPLAYLOBBY iface,
1152 DWORD dwFlags,
1153 DWORD dwAppID,
1154 HANDLE hReceiveEvent )
1155{
1156 FIXME(":stub\n");
1157 return DPERR_OUTOFMEMORY;
1158}
1159
1160static HRESULT WINAPI IDirectPlayLobby2WImpl_SetLobbyMessageEvent
1161( LPDIRECTPLAYLOBBY2 iface,
1162 DWORD dwFlags,
1163 DWORD dwAppID,
1164 HANDLE hReceiveEvent )
1165{
1166 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1167 return IDirectPlayLobbyW_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBY)This, dwFlags,
1168 dwAppID, hReceiveEvent );
1169}
1170
1171
1172/********************************************************************
1173 *
1174 * Registers an event that will be set when a lobby message is received.
1175 *
1176 */
1177static HRESULT WINAPI IDirectPlayLobby2WImpl_CreateCompoundAddress
1178( LPDIRECTPLAYLOBBY2 iface,
1179 LPCDPCOMPOUNDADDRESSELEMENT lpElements,
1180 DWORD dwElementCount,
1181 LPVOID lpAddress,
1182 LPDWORD lpdwAddressSize )
1183{
1184 FIXME(":stub\n");
1185 return DPERR_OUTOFMEMORY;
1186}
1187
1188static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateCompoundAddress
1189( LPDIRECTPLAYLOBBY2A iface,
1190 LPCDPCOMPOUNDADDRESSELEMENT lpElements,
1191 DWORD dwElementCount,
1192 LPVOID lpAddress,
1193 LPDWORD lpdwAddressSize )
1194{
1195 FIXME(":stub\n");
1196 return DPERR_OUTOFMEMORY;
1197}
1198
1199
1200/* Note: Hack so we can reuse the old functions without compiler warnings */
1201#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
1202# define XCAST(fun) (typeof(directPlayLobbyAVT.fn##fun))
1203#else
1204# define XCAST(fun) (void*)
1205#endif
1206
1207/* Direct Play Lobby 1 (ascii) Virtual Table for methods */
1208/* All lobby 1 methods are exactly the same except QueryInterface */
1209struct ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyAVT =
1210{
1211 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1212 IDirectPlayLobbyAImpl_QueryInterface,
1213 XCAST(AddRef)IDirectPlayLobby2AImpl_AddRef,
1214 XCAST(Release)IDirectPlayLobby2AImpl_Release,
1215 XCAST(Connect)IDirectPlayLobby2AImpl_Connect,
1216 XCAST(CreateAddress)IDirectPlayLobby2AImpl_CreateAddress,
1217 XCAST(EnumAddress)IDirectPlayLobby2AImpl_EnumAddress,
1218 XCAST(EnumAddressTypes)IDirectPlayLobby2AImpl_EnumAddressTypes,
1219 XCAST(EnumLocalApplications)IDirectPlayLobby2AImpl_EnumLocalApplications,
1220 XCAST(GetConnectionSettings)IDirectPlayLobby2AImpl_GetConnectionSettings,
1221 XCAST(ReceiveLobbyMessage)IDirectPlayLobby2AImpl_ReceiveLobbyMessage,
1222 XCAST(RunApplication)IDirectPlayLobby2AImpl_RunApplication,
1223 XCAST(SendLobbyMessage)IDirectPlayLobby2AImpl_SendLobbyMessage,
1224 XCAST(SetConnectionSettings)IDirectPlayLobby2AImpl_SetConnectionSettings,
1225 XCAST(SetLobbyMessageEvent)IDirectPlayLobby2AImpl_SetLobbyMessageEvent
1226};
1227#undef XCAST
1228
1229
1230/* Note: Hack so we can reuse the old functions without compiler warnings */
1231#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
1232# define XCAST(fun) (typeof(directPlayLobbyWVT.fn##fun))
1233#else
1234# define XCAST(fun) (void*)
1235#endif
1236
1237/* Direct Play Lobby 1 (unicode) Virtual Table for methods */
1238ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyWVT =
1239{
1240 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1241 IDirectPlayLobbyW_QueryInterface,
1242 XCAST(AddRef)IDirectPlayLobby2WImpl_AddRef,
1243 XCAST(Release)IDirectPlayLobby2WImpl_Release,
1244 XCAST(Connect)IDirectPlayLobby2WImpl_Connect,
1245 XCAST(CreateAddress)IDirectPlayLobby2WImpl_CreateAddress,
1246 XCAST(EnumAddress)IDirectPlayLobby2WImpl_EnumAddress,
1247 XCAST(EnumAddressTypes)IDirectPlayLobby2WImpl_EnumAddressTypes,
1248 XCAST(EnumLocalApplications)IDirectPlayLobby2WImpl_EnumLocalApplications,
1249 XCAST(GetConnectionSettings)IDirectPlayLobby2WImpl_GetConnectionSettings,
1250 XCAST(ReceiveLobbyMessage)IDirectPlayLobby2WImpl_ReceiveLobbyMessage,
1251 XCAST(RunApplication)IDirectPlayLobby2WImpl_RunApplication,
1252 XCAST(SendLobbyMessage)IDirectPlayLobby2WImpl_SendLobbyMessage,
1253 XCAST(SetConnectionSettings)IDirectPlayLobby2WImpl_SetConnectionSettings,
1254 XCAST(SetLobbyMessageEvent)IDirectPlayLobby2WImpl_SetLobbyMessageEvent
1255};
1256#undef XCAST
1257
1258
1259/* Direct Play Lobby 2 (ascii) Virtual Table for methods */
1260ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2AVT =
1261{
1262 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1263 IDirectPlayLobby2AImpl_QueryInterface,
1264 IDirectPlayLobby2AImpl_AddRef,
1265 IDirectPlayLobby2AImpl_Release,
1266 IDirectPlayLobby2AImpl_Connect,
1267 IDirectPlayLobby2AImpl_CreateAddress,
1268 IDirectPlayLobby2AImpl_EnumAddress,
1269 IDirectPlayLobby2AImpl_EnumAddressTypes,
1270 IDirectPlayLobby2AImpl_EnumLocalApplications,
1271 IDirectPlayLobby2AImpl_GetConnectionSettings,
1272 IDirectPlayLobby2AImpl_ReceiveLobbyMessage,
1273 IDirectPlayLobby2AImpl_RunApplication,
1274 IDirectPlayLobby2AImpl_SendLobbyMessage,
1275 IDirectPlayLobby2AImpl_SetConnectionSettings,
1276 IDirectPlayLobby2AImpl_SetLobbyMessageEvent,
1277 IDirectPlayLobby2AImpl_CreateCompoundAddress
1278};
1279
1280/* Direct Play Lobby 2 (unicode) Virtual Table for methods */
1281ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2WVT =
1282{
1283 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1284 IDirectPlayLobby2WImpl_QueryInterface,
1285 IDirectPlayLobby2WImpl_AddRef,
1286 IDirectPlayLobby2WImpl_Release,
1287 IDirectPlayLobby2WImpl_Connect,
1288 IDirectPlayLobby2WImpl_CreateAddress,
1289 IDirectPlayLobby2WImpl_EnumAddress,
1290 IDirectPlayLobby2WImpl_EnumAddressTypes,
1291 IDirectPlayLobby2WImpl_EnumLocalApplications,
1292 IDirectPlayLobby2WImpl_GetConnectionSettings,
1293 IDirectPlayLobby2WImpl_ReceiveLobbyMessage,
1294 IDirectPlayLobby2WImpl_RunApplication,
1295 IDirectPlayLobby2WImpl_SendLobbyMessage,
1296 IDirectPlayLobby2WImpl_SetConnectionSettings,
1297 IDirectPlayLobby2WImpl_SetLobbyMessageEvent,
1298 IDirectPlayLobby2WImpl_CreateCompoundAddress
1299};
1300
1301/***************************************************************************
1302 * DirectPlayLobbyCreateA (DPLAYX.4)
1303 *
1304 */
1305HRESULT WINAPI DirectPlayLobbyCreateA( LPGUID lpGUIDDSP,
1306 LPDIRECTPLAYLOBBYA *lplpDPL,
1307 IUnknown *lpUnk,
1308 LPVOID lpData,
1309 DWORD dwDataSize )
1310{
1311 IDirectPlayLobbyAImpl** ilplpDPL=(IDirectPlayLobbyAImpl**)lplpDPL;
1312 TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1313 lpGUIDDSP,ilplpDPL,lpUnk,lpData,dwDataSize);
1314
1315 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1316 * equal 0. These fields are mostly for future expansion.
1317 */
1318 if ( lpGUIDDSP || lpUnk || lpData || dwDataSize )
1319 {
1320 *ilplpDPL = NULL;
1321 return DPERR_INVALIDPARAMS;
1322 }
1323
1324 /* Yes...really we should be returning a lobby 1 object */
1325 *ilplpDPL = (IDirectPlayLobbyAImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1326 sizeof( IDirectPlayLobbyAImpl ) );
1327
1328 if( ! (*ilplpDPL) )
1329 {
1330 return DPERR_OUTOFMEMORY;
1331 }
1332
1333 (*ilplpDPL)->lpvtbl = &directPlayLobbyAVT;
1334 (*ilplpDPL)->ref = 1;
1335
1336 /* All fields were nulled out by the allocation */
1337
1338 return DP_OK;
1339}
1340
1341/***************************************************************************
1342 * DirectPlayLobbyCreateW (DPLAYX.5)
1343 *
1344 */
1345HRESULT WINAPI DirectPlayLobbyCreateW( LPGUID lpGUIDDSP,
1346 LPDIRECTPLAYLOBBY *lplpDPL,
1347 IUnknown *lpUnk,
1348 LPVOID lpData,
1349 DWORD dwDataSize )
1350{
1351 IDirectPlayLobbyImpl** ilplpDPL=(IDirectPlayLobbyImpl**)lplpDPL;
1352 TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1353 lpGUIDDSP,ilplpDPL,lpUnk,lpData,dwDataSize);
1354
1355 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1356 * equal 0. These fields are mostly for future expansion.
1357 */
1358 if ( lpGUIDDSP || lpUnk || lpData || dwDataSize )
1359 {
1360 *ilplpDPL = NULL;
1361 ERR("Bad parameters!\n" );
1362 return DPERR_INVALIDPARAMS;
1363 }
1364
1365 /* Yes...really we should bre returning a lobby 1 object */
1366 *ilplpDPL = (IDirectPlayLobbyImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1367 sizeof( IDirectPlayLobbyImpl ) );
1368
1369 if( !*ilplpDPL)
1370 {
1371 return DPERR_OUTOFMEMORY;
1372 }
1373
1374 (*ilplpDPL)->lpvtbl = &directPlayLobbyWVT;
1375 (*ilplpDPL)->ref = 1;
1376
1377 /* All fields were nulled out by the allocation */
1378
1379 return DP_OK;
1380
1381}
1382
1383/***************************************************************************
1384 * DirectPlayEnumerateA (DPLAYX.2)
1385 *
1386 * The pointer to the structure lpContext will be filled with the
1387 * appropriate data for each service offered by the OS. These services are
1388 * not necessarily available on this particular machine but are defined
1389 * as simple service providers under the "Service Providers" registry key.
1390 * This structure is then passed to lpEnumCallback for each of the different
1391 * services.
1392 *
1393 * This API is useful only for applications written using DirectX3 or
1394 * worse. It is superceeded by IDirectPlay3::EnumConnections which also
1395 * gives information on the actual connections.
1396 *
1397 * defn of a service provider:
1398 * A dynamic-link library used by DirectPlay to communicate over a network.
1399 * The service provider contains all the network-specific code required
1400 * to send and receive messages. Online services and network operators can
1401 * supply service providers to use specialized hardware, protocols, communications
1402 * media, and network resources.
1403 *
1404 * TODO: Allocate string buffer space from the heap (length from reg)
1405 * Pass real device driver numbers...
1406 * Get the GUID properly...
1407 */
1408HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA lpEnumCallback,
1409 LPVOID lpContext )
1410{
1411
1412 HKEY hkResult;
1413 LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
1414 LPSTR guidDataSubKey = "Guid";
1415 LPSTR majVerDataSubKey = "dwReserved1";
1416 DWORD dwIndex, sizeOfSubKeyName=50;
1417 char subKeyName[51];
1418
1419 TRACE(": lpEnumCallback=%p lpContext=%p\n", lpEnumCallback, lpContext );
1420
1421 if( !lpEnumCallback )
1422 {
1423 return DPERR_INVALIDPARAMS;
1424 }
1425
1426 /* Need to loop over the service providers in the registry */
1427 if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey,
1428 0, KEY_ENUMERATE_SUB_KEYS, &hkResult ) != ERROR_SUCCESS )
1429 {
1430 /* Hmmm. Does this mean that there are no service providers? */
1431 ERR(": no service providers?\n");
1432 return DP_OK;
1433 }
1434
1435 /* Traverse all the service providers we have available */
1436 for( dwIndex=0;
1437 RegEnumKeyA( hkResult, dwIndex, subKeyName, sizeOfSubKeyName ) !=
1438 ERROR_NO_MORE_ITEMS;
1439 ++dwIndex )
1440 {
1441 HKEY hkServiceProvider;
1442 GUID serviceProviderGUID;
1443 DWORD returnTypeGUID, returnTypeReserved1, sizeOfReturnBuffer=50;
1444 char returnBuffer[51];
1445 DWORD majVersionNum /*, minVersionNum */;
1446 LPWSTR lpWGUIDString;
1447
1448 TRACE(" this time through: %s\n", subKeyName );
1449
1450 /* Get a handle for this particular service provider */
1451 if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_QUERY_VALUE,
1452 &hkServiceProvider ) != ERROR_SUCCESS )
1453 {
1454 ERR(": what the heck is going on?\n" );
1455 continue;
1456 }
1457
1458 /* Get the GUID, Device major number and device minor number
1459 * from the registry.
1460 */
1461 if( RegQueryValueExA( hkServiceProvider, guidDataSubKey,
1462 NULL, &returnTypeGUID, (LPBYTE)returnBuffer,
1463 &sizeOfReturnBuffer ) != ERROR_SUCCESS )
1464 {
1465 ERR(": missing GUID registry data members\n" );
1466 continue;
1467 }
1468
1469 /* FIXME: Check return types to ensure we're interpreting data right */
1470 lpWGUIDString = HEAP_strdupAtoW( GetProcessHeap(), 0, returnBuffer );
1471 CLSIDFromString( (LPCOLESTR)lpWGUIDString, &serviceProviderGUID );
1472 HeapFree( GetProcessHeap(), 0, lpWGUIDString );
1473
1474 sizeOfReturnBuffer = 50;
1475
1476 if( RegQueryValueExA( hkServiceProvider, majVerDataSubKey,
1477 NULL, &returnTypeReserved1, (LPBYTE)returnBuffer,
1478 &sizeOfReturnBuffer ) != ERROR_SUCCESS )
1479 {
1480 ERR(": missing dwReserved1 registry data members\n") ;
1481 continue;
1482 }
1483 /* FIXME: This couldn't possibly be right...*/
1484 majVersionNum = GET_DWORD( returnBuffer );
1485
1486 /* The enumeration will return FALSE if we are not to continue */
1487 if( !lpEnumCallback( &serviceProviderGUID , subKeyName,
1488 majVersionNum, (DWORD)0, lpContext ) )
1489 {
1490 WARN("lpEnumCallback returning FALSE\n" );
1491 break;
1492 }
1493 }
1494
1495 return DP_OK;
1496
1497}
1498
1499/***************************************************************************
1500 * DirectPlayEnumerateW (DPLAYX.3)
1501 *
1502 */
1503HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW lpEnumCallback, LPVOID lpContext )
1504{
1505
1506 FIXME(":stub\n");
1507
1508 return DPERR_OUTOFMEMORY;
1509
1510}
1511
1512/***************************************************************************
1513 * DirectPlayCreate (DPLAYX.1) (DPLAY.1)
1514 *
1515 */
1516HRESULT WINAPI DirectPlayCreate
1517( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk)
1518{
1519
1520 TRACE("lpGUID=%p lplpDP=%p pUnk=%p\n", lpGUID,lplpDP,pUnk);
1521
1522 if( pUnk != NULL )
1523 {
1524 /* Hmmm...wonder what this means! */
1525 ERR("What does a NULL here mean?\n" );
1526 return DPERR_OUTOFMEMORY;
1527 }
1528
1529 if( IsEqualGUID( &IID_IDirectPlay2A, lpGUID ) )
1530 {
1531 IDirectPlay2AImpl** ilplpDP=(IDirectPlay2AImpl**)lplpDP;
1532 *ilplpDP = (IDirectPlay2AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1533 sizeof( **ilplpDP ) );
1534
1535 if( !*ilplpDP )
1536 {
1537 return DPERR_OUTOFMEMORY;
1538 }
1539
1540 (*ilplpDP)->lpvtbl = &directPlay2AVT;
1541 (*ilplpDP)->ref = 1;
1542
1543 return DP_OK;
1544 }
1545 else if( IsEqualGUID( &IID_IDirectPlay2, lpGUID ) )
1546 {
1547 IDirectPlay2Impl** ilplpDP=(IDirectPlay2Impl**)lplpDP;
1548 *ilplpDP = (IDirectPlay2Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1549 sizeof( **ilplpDP ) );
1550
1551 if( !*ilplpDP )
1552 {
1553 return DPERR_OUTOFMEMORY;
1554 }
1555
1556 (*ilplpDP)->lpvtbl = &directPlay2WVT;
1557 (*ilplpDP)->ref = 1;
1558
1559 return DP_OK;
1560 }
1561
1562 /* Unknown interface type */
1563 return DPERR_NOINTERFACE;
1564
1565}
1566
1567/* Direct Play helper methods */
1568
1569/* Get a new interface. To be used by QueryInterface. */
1570static HRESULT directPlay_QueryInterface
1571 ( REFIID riid, LPVOID* ppvObj )
1572{
1573
1574 if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
1575 {
1576 IDirectPlay2Impl* lpDP = (IDirectPlay2Impl*)*ppvObj;
1577
1578 lpDP = (IDirectPlay2Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1579 sizeof( *lpDP ) );
1580
1581 if( !lpDP )
1582 {
1583 return DPERR_OUTOFMEMORY;
1584 }
1585
1586 lpDP->lpvtbl = &directPlay2WVT;
1587 lpDP->ref = 1;
1588
1589 return S_OK;
1590 }
1591 else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
1592 {
1593 IDirectPlay2AImpl* lpDP = (IDirectPlay2AImpl*)*ppvObj;
1594
1595 lpDP = (IDirectPlay2AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1596 sizeof( *lpDP ) );
1597
1598 if( !lpDP )
1599 {
1600 return DPERR_OUTOFMEMORY;
1601 }
1602
1603 lpDP->lpvtbl = &directPlay2AVT;
1604 lpDP->ref = 1;
1605
1606 return S_OK;
1607 }
1608 else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
1609 {
1610 IDirectPlay3Impl* lpDP = (IDirectPlay3Impl*)*ppvObj;
1611
1612 lpDP = (IDirectPlay3Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1613 sizeof( *lpDP ) );
1614
1615 if( !lpDP )
1616 {
1617 return DPERR_OUTOFMEMORY;
1618 }
1619
1620 lpDP->lpvtbl = &directPlay3WVT;
1621 lpDP->ref = 1;
1622
1623 return S_OK;
1624 }
1625 else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
1626 {
1627 IDirectPlay3AImpl* lpDP = (IDirectPlay3AImpl*)*ppvObj;
1628
1629 lpDP = (IDirectPlay3AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1630 sizeof( *lpDP ) );
1631
1632 if( !lpDP )
1633 {
1634 return DPERR_OUTOFMEMORY;
1635 }
1636
1637 lpDP->lpvtbl = &directPlay3AVT;
1638 lpDP->ref = 1;
1639
1640 return S_OK;
1641
1642 }
1643
1644 *ppvObj = NULL;
1645 return E_NOINTERFACE;
1646}
1647
1648
1649/* Direct Play methods */
1650static HRESULT WINAPI DirectPlay2W_QueryInterface
1651 ( LPDIRECTPLAY2 iface, REFIID riid, LPVOID* ppvObj )
1652{
1653 ICOM_THIS(IDirectPlay2Impl,iface);
1654 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
1655
1656 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1657 IsEqualGUID( &IID_IDirectPlay2, riid )
1658 )
1659 {
1660 IDirectPlay2_AddRef( iface );
1661 *ppvObj = This;
1662 return S_OK;
1663 }
1664 return directPlay_QueryInterface( riid, ppvObj );
1665}
1666
1667static HRESULT WINAPI DirectPlay2A_QueryInterface
1668 ( LPDIRECTPLAY2A iface, REFIID riid, LPVOID* ppvObj )
1669{
1670 ICOM_THIS(IDirectPlay2Impl,iface);
1671 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
1672
1673 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1674 IsEqualGUID( &IID_IDirectPlay2A, riid )
1675 )
1676 {
1677 IDirectPlay2_AddRef( iface );
1678 *ppvObj = This;
1679 return S_OK;
1680 }
1681
1682 return directPlay_QueryInterface( riid, ppvObj );
1683}
1684
1685static HRESULT WINAPI DirectPlay3WImpl_QueryInterface
1686 ( LPDIRECTPLAY3 iface, REFIID riid, LPVOID* ppvObj )
1687{
1688 ICOM_THIS(IDirectPlay3Impl,iface);
1689 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
1690
1691 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1692 IsEqualGUID( &IID_IDirectPlay3, riid )
1693 )
1694 {
1695 IDirectPlay3_AddRef( iface );
1696 *ppvObj = This;
1697 return S_OK;
1698 }
1699
1700 return directPlay_QueryInterface( riid, ppvObj );
1701}
1702
1703static HRESULT WINAPI DirectPlay3A_QueryInterface
1704 ( LPDIRECTPLAY3A iface, REFIID riid, LPVOID* ppvObj )
1705{
1706 ICOM_THIS(IDirectPlay3Impl,iface);
1707 TRACE("(%p)->(%p,%p)\n", This, riid, ppvObj );
1708
1709 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1710 IsEqualGUID( &IID_IDirectPlay3A, riid )
1711 )
1712 {
1713 IDirectPlay3_AddRef( iface );
1714 *ppvObj = This;
1715 return S_OK;
1716 }
1717
1718 return directPlay_QueryInterface( riid, ppvObj );
1719}
1720
1721
1722/* Shared between all dplay types */
1723static ULONG WINAPI DirectPlay3WImpl_AddRef
1724 ( LPDIRECTPLAY3 iface )
1725{
1726 ICOM_THIS(IDirectPlay3Impl,iface);
1727 ++(This->ref);
1728 TRACE("ref count now %lu\n", This->ref );
1729 return (This->ref);
1730}
1731
1732static ULONG WINAPI DirectPlay3WImpl_Release
1733( LPDIRECTPLAY3 iface )
1734{
1735 ICOM_THIS(IDirectPlay3Impl,iface);
1736 TRACE("ref count decremeneted from %lu\n", This->ref );
1737
1738 This->ref--;
1739
1740 /* Deallocate if this is the last reference to the object */
1741 if( !(This->ref) )
1742 {
1743 FIXME("memory leak\n" );
1744 /* Implement memory deallocation */
1745
1746 HeapFree( GetProcessHeap(), 0, This );
1747
1748 return 0;
1749 }
1750
1751 return This->ref;
1752}
1753
1754static ULONG WINAPI DirectPlay3A_Release
1755( LPDIRECTPLAY3A iface )
1756{
1757 ICOM_THIS(IDirectPlay3Impl,iface);
1758 TRACE("ref count decremeneted from %lu\n", This->ref );
1759
1760 This->ref--;
1761
1762 /* Deallocate if this is the last reference to the object */
1763 if( !(This->ref) )
1764 {
1765 FIXME("memory leak\n" );
1766 /* Implement memory deallocation */
1767
1768 HeapFree( GetProcessHeap(), 0, This );
1769
1770 return 0;
1771 }
1772
1773 return This->ref;
1774}
1775
1776HRESULT WINAPI DirectPlay3A_AddPlayerToGroup
1777 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
1778{
1779 ICOM_THIS(IDirectPlay3Impl,iface);
1780 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1781 return DP_OK;
1782}
1783
1784HRESULT WINAPI DirectPlay3WImpl_AddPlayerToGroup
1785 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
1786{
1787 ICOM_THIS(IDirectPlay3Impl,iface);
1788 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1789 return DP_OK;
1790}
1791
1792
1793HRESULT WINAPI DirectPlay3A_Close
1794 ( LPDIRECTPLAY3A iface )
1795{
1796 ICOM_THIS(IDirectPlay3Impl,iface);
1797 FIXME("(%p)->(): stub", This );
1798 return DP_OK;
1799}
1800
1801HRESULT WINAPI DirectPlay3WImpl_Close
1802 ( LPDIRECTPLAY3 iface )
1803{
1804 ICOM_THIS(IDirectPlay3Impl,iface);
1805 FIXME("(%p)->(): stub", This );
1806 return DP_OK;
1807}
1808
1809HRESULT WINAPI DirectPlay3A_CreateGroup
1810 ( LPDIRECTPLAY3A iface, LPDPID a, LPDPNAME b, LPVOID c, DWORD d, DWORD e )
1811{
1812 ICOM_THIS(IDirectPlay3Impl,iface);
1813 FIXME("(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e );
1814 return DP_OK;
1815}
1816
1817HRESULT WINAPI DirectPlay3WImpl_CreateGroup
1818 ( LPDIRECTPLAY3 iface, LPDPID a, LPDPNAME b, LPVOID c, DWORD d, DWORD e )
1819{
1820 ICOM_THIS(IDirectPlay3Impl,iface);
1821 FIXME("(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e );
1822 return DP_OK;
1823}
1824
1825HRESULT WINAPI DirectPlay3A_CreatePlayer
1826 ( LPDIRECTPLAY3A iface, LPDPID a, LPDPNAME b, HANDLE c, LPVOID d, DWORD e, DWORD f )
1827{
1828 ICOM_THIS(IDirectPlay3Impl,iface);
1829 FIXME("(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
1830 return DP_OK;
1831}
1832
1833HRESULT WINAPI DirectPlay3WImpl_CreatePlayer
1834 ( LPDIRECTPLAY3 iface, LPDPID a, LPDPNAME b, HANDLE c, LPVOID d, DWORD e, DWORD f )
1835{
1836 ICOM_THIS(IDirectPlay3Impl,iface);
1837 FIXME("(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
1838 return DP_OK;
1839}
1840
1841HRESULT WINAPI DirectPlay3A_DeletePlayerFromGroup
1842 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
1843{
1844 ICOM_THIS(IDirectPlay3Impl,iface);
1845 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1846 return DP_OK;
1847}
1848
1849HRESULT WINAPI DirectPlay3WImpl_DeletePlayerFromGroup
1850 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
1851{
1852 ICOM_THIS(IDirectPlay3Impl,iface);
1853 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1854 return DP_OK;
1855}
1856
1857HRESULT WINAPI DirectPlay3A_DestroyGroup
1858 ( LPDIRECTPLAY3A iface, DPID a )
1859{
1860 ICOM_THIS(IDirectPlay3Impl,iface);
1861 FIXME("(%p)->(0x%08lx): stub", This, a );
1862 return DP_OK;
1863}
1864
1865HRESULT WINAPI DirectPlay3WImpl_DestroyGroup
1866 ( LPDIRECTPLAY3 iface, DPID a )
1867{
1868 ICOM_THIS(IDirectPlay3Impl,iface);
1869 FIXME("(%p)->(0x%08lx): stub", This, a );
1870 return DP_OK;
1871}
1872
1873HRESULT WINAPI DirectPlay3A_DestroyPlayer
1874 ( LPDIRECTPLAY3A iface, DPID a )
1875{
1876 ICOM_THIS(IDirectPlay3Impl,iface);
1877 FIXME("(%p)->(0x%08lx): stub", This, a );
1878 return DP_OK;
1879}
1880
1881HRESULT WINAPI DirectPlay3WImpl_DestroyPlayer
1882 ( LPDIRECTPLAY3 iface, DPID a )
1883{
1884 ICOM_THIS(IDirectPlay3Impl,iface);
1885 FIXME("(%p)->(0x%08lx): stub", This, a );
1886 return DP_OK;
1887}
1888
1889HRESULT WINAPI DirectPlay3A_EnumGroupPlayers
1890 ( LPDIRECTPLAY3A iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c,
1891 LPVOID d, DWORD e )
1892{
1893 ICOM_THIS(IDirectPlay3Impl,iface);
1894 FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1895 return DP_OK;
1896}
1897
1898HRESULT WINAPI DirectPlay3WImpl_EnumGroupPlayers
1899 ( LPDIRECTPLAY3 iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c,
1900 LPVOID d, DWORD e )
1901{
1902 ICOM_THIS(IDirectPlay3Impl,iface);
1903 FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1904 return DP_OK;
1905}
1906
1907HRESULT WINAPI DirectPlay3A_EnumGroups
1908 ( LPDIRECTPLAY3A iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1909{
1910 ICOM_THIS(IDirectPlay3Impl,iface);
1911 FIXME("(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1912 return DP_OK;
1913}
1914
1915HRESULT WINAPI DirectPlay3WImpl_EnumGroups
1916 ( LPDIRECTPLAY3 iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1917{
1918 ICOM_THIS(IDirectPlay3Impl,iface);
1919 FIXME("(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1920 return DP_OK;
1921}
1922
1923HRESULT WINAPI DirectPlay3A_EnumPlayers
1924 ( LPDIRECTPLAY3A iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1925{
1926 ICOM_THIS(IDirectPlay3Impl,iface);
1927 FIXME("(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1928 return DP_OK;
1929}
1930
1931HRESULT WINAPI DirectPlay3WImpl_EnumPlayers
1932 ( LPDIRECTPLAY3 iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1933{
1934 ICOM_THIS(IDirectPlay3Impl,iface);
1935 FIXME("(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1936 return DP_OK;
1937}
1938
1939HRESULT WINAPI DirectPlay3A_EnumSessions
1940 ( LPDIRECTPLAY3A iface, LPDPSESSIONDESC2 a, DWORD b, LPDPENUMSESSIONSCALLBACK2 c,
1941 LPVOID d, DWORD e )
1942{
1943 ICOM_THIS(IDirectPlay3Impl,iface);
1944 FIXME("(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1945 return DP_OK;
1946}
1947
1948HRESULT WINAPI DirectPlay3WImpl_EnumSessions
1949 ( LPDIRECTPLAY3 iface, LPDPSESSIONDESC2 a, DWORD b, LPDPENUMSESSIONSCALLBACK2 c,
1950 LPVOID d, DWORD e )
1951{
1952 ICOM_THIS(IDirectPlay3Impl,iface);
1953 FIXME("(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1954 return DP_OK;
1955}
1956
1957HRESULT WINAPI DirectPlay3A_GetCaps
1958 ( LPDIRECTPLAY3A iface, LPDPCAPS a, DWORD b )
1959{
1960 ICOM_THIS(IDirectPlay3Impl,iface);
1961 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
1962 return DP_OK;
1963}
1964
1965HRESULT WINAPI DirectPlay3WImpl_GetCaps
1966 ( LPDIRECTPLAY3 iface, LPDPCAPS a, DWORD b )
1967{
1968 ICOM_THIS(IDirectPlay3Impl,iface);
1969 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
1970 return DP_OK;
1971}
1972
1973HRESULT WINAPI DirectPlay3A_GetGroupData
1974 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
1975{
1976 ICOM_THIS(IDirectPlay3Impl,iface);
1977 FIXME("(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
1978 return DP_OK;
1979}
1980
1981HRESULT WINAPI DirectPlay3WImpl_GetGroupData
1982 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
1983{
1984 ICOM_THIS(IDirectPlay3Impl,iface);
1985 FIXME("(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
1986 return DP_OK;
1987}
1988
1989HRESULT WINAPI DirectPlay3A_GetGroupName
1990 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, LPDWORD c )
1991{
1992 ICOM_THIS(IDirectPlay3Impl,iface);
1993 FIXME("(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
1994 return DP_OK;
1995}
1996
1997HRESULT WINAPI DirectPlay3WImpl_GetGroupName
1998 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
1999{
2000 ICOM_THIS(IDirectPlay3Impl,iface);
2001 FIXME("(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2002 return DP_OK;
2003}
2004
2005HRESULT WINAPI DirectPlay3A_GetMessageCount
2006 ( LPDIRECTPLAY3A iface, DPID a, LPDWORD b )
2007{
2008 ICOM_THIS(IDirectPlay3Impl,iface);
2009 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2010 return DP_OK;
2011}
2012
2013HRESULT WINAPI DirectPlay3WImpl_GetMessageCount
2014 ( LPDIRECTPLAY3 iface, DPID a, LPDWORD b )
2015{
2016 ICOM_THIS(IDirectPlay3Impl,iface);
2017 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2018 return DP_OK;
2019}
2020
2021HRESULT WINAPI DirectPlay3A_GetPlayerAddress
2022 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, LPDWORD c )
2023{
2024 ICOM_THIS(IDirectPlay3Impl,iface);
2025 FIXME("(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2026 return DP_OK;
2027}
2028
2029HRESULT WINAPI DirectPlay3WImpl_GetPlayerAddress
2030 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
2031{
2032 ICOM_THIS(IDirectPlay3Impl,iface);
2033 FIXME("(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2034 return DP_OK;
2035}
2036
2037HRESULT WINAPI DirectPlay3A_GetPlayerCaps
2038 ( LPDIRECTPLAY3A iface, DPID a, LPDPCAPS b, DWORD c )
2039{
2040 ICOM_THIS(IDirectPlay3Impl,iface);
2041 FIXME("(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2042 return DP_OK;
2043}
2044
2045HRESULT WINAPI DirectPlay3WImpl_GetPlayerCaps
2046 ( LPDIRECTPLAY3 iface, DPID a, LPDPCAPS b, DWORD c )
2047{
2048 ICOM_THIS(IDirectPlay3Impl,iface);
2049 FIXME("(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2050 return DP_OK;
2051}
2052
2053HRESULT WINAPI DirectPlay3A_GetPlayerData
2054 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
2055{
2056 ICOM_THIS(IDirectPlay3Impl,iface);
2057 FIXME("(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
2058 return DP_OK;
2059}
2060
2061HRESULT WINAPI DirectPlay3WImpl_GetPlayerData
2062 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
2063{
2064 ICOM_THIS(IDirectPlay3Impl,iface);
2065 FIXME("(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
2066 return DP_OK;
2067}
2068
2069HRESULT WINAPI DirectPlay3A_GetPlayerName
2070 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
2071{
2072 ICOM_THIS(IDirectPlay3Impl,iface);
2073 FIXME("(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2074 return DP_OK;
2075}
2076
2077HRESULT WINAPI DirectPlay3WImpl_GetPlayerName
2078 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
2079{
2080 ICOM_THIS(IDirectPlay3Impl,iface);
2081 FIXME("(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2082 return DP_OK;
2083}
2084
2085HRESULT WINAPI DirectPlay3A_GetSessionDesc
2086 ( LPDIRECTPLAY3A iface, LPVOID a, LPDWORD b )
2087{
2088 ICOM_THIS(IDirectPlay3Impl,iface);
2089 FIXME("(%p)->(%p,%p): stub", This, a, b );
2090 return DP_OK;
2091}
2092
2093HRESULT WINAPI DirectPlay3WImpl_GetSessionDesc
2094 ( LPDIRECTPLAY3 iface, LPVOID a, LPDWORD b )
2095{
2096 ICOM_THIS(IDirectPlay3Impl,iface);
2097 FIXME("(%p)->(%p,%p): stub", This, a, b );
2098 return DP_OK;
2099}
2100
2101HRESULT WINAPI DirectPlay3A_Initialize
2102 ( LPDIRECTPLAY3A iface, LPGUID a )
2103{
2104 ICOM_THIS(IDirectPlay3Impl,iface);
2105 FIXME("(%p)->(%p): stub", This, a );
2106 return DP_OK;
2107}
2108
2109HRESULT WINAPI DirectPlay3WImpl_Initialize
2110 ( LPDIRECTPLAY3 iface, LPGUID a )
2111{
2112 ICOM_THIS(IDirectPlay3Impl,iface);
2113 FIXME("(%p)->(%p): stub", This, a );
2114 return DP_OK;
2115}
2116
2117
2118HRESULT WINAPI DirectPlay3A_Open
2119 ( LPDIRECTPLAY3A iface, LPDPSESSIONDESC2 a, DWORD b )
2120{
2121 ICOM_THIS(IDirectPlay3Impl,iface);
2122 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
2123 return DP_OK;
2124}
2125
2126HRESULT WINAPI DirectPlay3WImpl_Open
2127 ( LPDIRECTPLAY3 iface, LPDPSESSIONDESC2 a, DWORD b )
2128{
2129 ICOM_THIS(IDirectPlay3Impl,iface);
2130 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
2131 return DP_OK;
2132}
2133
2134HRESULT WINAPI DirectPlay3A_Receive
2135 ( LPDIRECTPLAY3A iface, LPDPID a, LPDPID b, DWORD c, LPVOID d, LPDWORD e )
2136{
2137 ICOM_THIS(IDirectPlay3Impl,iface);
2138 FIXME("(%p)->(%p,%p,0x%08lx,%p,%p): stub", This, a, b, c, d, e );
2139 return DP_OK;
2140}
2141
2142HRESULT WINAPI DirectPlay3WImpl_Receive
2143 ( LPDIRECTPLAY3 iface, LPDPID a, LPDPID b, DWORD c, LPVOID d, LPDWORD e )
2144{
2145 ICOM_THIS(IDirectPlay3Impl,iface);
2146 FIXME("(%p)->(%p,%p,0x%08lx,%p,%p): stub", This, a, b, c, d, e );
2147 return DP_OK;
2148}
2149
2150HRESULT WINAPI DirectPlay3A_Send
2151 ( LPDIRECTPLAY3A iface, DPID a, DPID b, DWORD c, LPVOID d, DWORD e )
2152{
2153 ICOM_THIS(IDirectPlay3Impl,iface);
2154 FIXME("(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", This, a, b, c, d, e );
2155 return DP_OK;
2156}
2157
2158HRESULT WINAPI DirectPlay3WImpl_Send
2159 ( LPDIRECTPLAY3 iface, DPID a, DPID b, DWORD c, LPVOID d, DWORD e )
2160{
2161 ICOM_THIS(IDirectPlay3Impl,iface);
2162 FIXME("(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", This, a, b, c, d, e );
2163 return DP_OK;
2164}
2165
2166HRESULT WINAPI DirectPlay3A_SetGroupData
2167 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, DWORD c, DWORD d )
2168{
2169 ICOM_THIS(IDirectPlay3Impl,iface);
2170 FIXME("(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2171 return DP_OK;
2172}
2173
2174HRESULT WINAPI DirectPlay3WImpl_SetGroupData
2175 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, DWORD c, DWORD d )
2176{
2177 ICOM_THIS(IDirectPlay3Impl,iface);
2178 FIXME("(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2179 return DP_OK;
2180}
2181
2182HRESULT WINAPI DirectPlay3A_SetGroupName
2183 ( LPDIRECTPLAY3A iface, DPID a, LPDPNAME b, DWORD c )
2184{
2185 ICOM_THIS(IDirectPlay3Impl,iface);
2186 FIXME("(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2187 return DP_OK;
2188}
2189
2190HRESULT WINAPI DirectPlay3WImpl_SetGroupName
2191 ( LPDIRECTPLAY3 iface, DPID a, LPDPNAME b, DWORD c )
2192{
2193 ICOM_THIS(IDirectPlay3Impl,iface);
2194 FIXME("(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2195 return DP_OK;
2196}
2197
2198HRESULT WINAPI DirectPlay3A_SetPlayerData
2199 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, DWORD c, DWORD d )
2200{
2201 ICOM_THIS(IDirectPlay3Impl,iface);
2202 FIXME("(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2203 return DP_OK;
2204}
2205
2206HRESULT WINAPI DirectPlay3WImpl_SetPlayerData
2207 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, DWORD c, DWORD d )
2208{
2209 ICOM_THIS(IDirectPlay3Impl,iface);
2210 FIXME("(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2211 return DP_OK;
2212}
2213
2214HRESULT WINAPI DirectPlay3A_SetPlayerName
2215 ( LPDIRECTPLAY3A iface, DPID a, LPDPNAME b, DWORD c )
2216{
2217 ICOM_THIS(IDirectPlay3Impl,iface);
2218 FIXME("(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2219 return DP_OK;
2220}
2221
2222HRESULT WINAPI DirectPlay3WImpl_SetPlayerName
2223 ( LPDIRECTPLAY3 iface, DPID a, LPDPNAME b, DWORD c )
2224{
2225 ICOM_THIS(IDirectPlay3Impl,iface);
2226 FIXME("(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2227 return DP_OK;
2228}
2229
2230HRESULT WINAPI DirectPlay3A_SetSessionDesc
2231 ( LPDIRECTPLAY3A iface, LPDPSESSIONDESC2 a, DWORD b )
2232{
2233 ICOM_THIS(IDirectPlay3Impl,iface);
2234 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
2235 return DP_OK;
2236}
2237
2238HRESULT WINAPI DirectPlay3WImpl_SetSessionDesc
2239 ( LPDIRECTPLAY3 iface, LPDPSESSIONDESC2 a, DWORD b )
2240{
2241 ICOM_THIS(IDirectPlay3Impl,iface);
2242 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
2243 return DP_OK;
2244}
2245
2246HRESULT WINAPI DirectPlay3A_AddGroupToGroup
2247 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
2248{
2249 ICOM_THIS(IDirectPlay3Impl,iface);
2250 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2251 return DP_OK;
2252}
2253
2254HRESULT WINAPI DirectPlay3WImpl_AddGroupToGroup
2255 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
2256{
2257 ICOM_THIS(IDirectPlay3Impl,iface);
2258 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2259 return DP_OK;
2260}
2261
2262HRESULT WINAPI DirectPlay3A_CreateGroupInGroup
2263 ( LPDIRECTPLAY3A iface, DPID a, LPDPID b, LPDPNAME c, LPVOID d, DWORD e, DWORD f )
2264{
2265 ICOM_THIS(IDirectPlay3Impl,iface);
2266 FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
2267 return DP_OK;
2268}
2269
2270HRESULT WINAPI DirectPlay3WImpl_CreateGroupInGroup
2271 ( LPDIRECTPLAY3 iface, DPID a, LPDPID b, LPDPNAME c, LPVOID d, DWORD e, DWORD f )
2272{
2273 ICOM_THIS(IDirectPlay3Impl,iface);
2274 FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
2275 return DP_OK;
2276}
2277
2278HRESULT WINAPI DirectPlay3A_DeleteGroupFromGroup
2279 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
2280{
2281 ICOM_THIS(IDirectPlay3Impl,iface);
2282 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2283 return DP_OK;
2284}
2285
2286HRESULT WINAPI DirectPlay3WImpl_DeleteGroupFromGroup
2287 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
2288{
2289 ICOM_THIS(IDirectPlay3Impl,iface);
2290 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2291 return DP_OK;
2292}
2293
2294HRESULT WINAPI DirectPlay3A_EnumConnections
2295 ( LPDIRECTPLAY3A iface, LPCGUID a, LPDPENUMCONNECTIONSCALLBACK b, LPVOID c, DWORD d )
2296{
2297 ICOM_THIS(IDirectPlay3Impl,iface);
2298 FIXME("(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
2299 return DP_OK;
2300}
2301
2302HRESULT WINAPI DirectPlay3WImpl_EnumConnections
2303 ( LPDIRECTPLAY3 iface, LPCGUID a, LPDPENUMCONNECTIONSCALLBACK b, LPVOID c, DWORD d )
2304{
2305 ICOM_THIS(IDirectPlay3Impl,iface);
2306 FIXME("(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
2307 return DP_OK;
2308}
2309
2310HRESULT WINAPI DirectPlay3A_EnumGroupsInGroup
2311 ( LPDIRECTPLAY3A iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c, LPVOID d, DWORD e )
2312{
2313 ICOM_THIS(IDirectPlay3Impl,iface);
2314 FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
2315 return DP_OK;
2316}
2317
2318HRESULT WINAPI DirectPlay3WImpl_EnumGroupsInGroup
2319 ( LPDIRECTPLAY3 iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c, LPVOID d, DWORD e )
2320{
2321 ICOM_THIS(IDirectPlay3Impl,iface);
2322 FIXME("(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
2323 return DP_OK;
2324}
2325
2326HRESULT WINAPI DirectPlay3A_GetGroupConnectionSettings
2327 ( LPDIRECTPLAY3A iface, DWORD a, DPID b, LPVOID c, LPDWORD d )
2328{
2329 ICOM_THIS(IDirectPlay3Impl,iface);
2330 FIXME("(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2331 return DP_OK;
2332}
2333
2334HRESULT WINAPI DirectPlay3WImpl_GetGroupConnectionSettings
2335 ( LPDIRECTPLAY3 iface, DWORD a, DPID b, LPVOID c, LPDWORD d )
2336{
2337 ICOM_THIS(IDirectPlay3Impl,iface);
2338 FIXME("(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2339 return DP_OK;
2340}
2341
2342HRESULT WINAPI DirectPlay3A_InitializeConnection
2343 ( LPDIRECTPLAY3A iface, LPVOID a, DWORD b )
2344{
2345 ICOM_THIS(IDirectPlay3Impl,iface);
2346 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
2347 return DP_OK;
2348}
2349
2350HRESULT WINAPI DirectPlay3WImpl_InitializeConnection
2351 ( LPDIRECTPLAY3 iface, LPVOID a, DWORD b )
2352{
2353 ICOM_THIS(IDirectPlay3Impl,iface);
2354 FIXME("(%p)->(%p,0x%08lx): stub", This, a, b );
2355 return DP_OK;
2356}
2357
2358HRESULT WINAPI DirectPlay3A_SecureOpen
2359 ( LPDIRECTPLAY3A iface, LPCDPSESSIONDESC2 a, DWORD b, LPCDPSECURITYDESC c, LPCDPCREDENTIALS d )
2360{
2361 ICOM_THIS(IDirectPlay3Impl,iface);
2362 FIXME("(%p)->(%p,0x%08lx,%p,%p): stub", This, a, b, c, d );
2363 return DP_OK;
2364}
2365
2366HRESULT WINAPI DirectPlay3WImpl_SecureOpen
2367 ( LPDIRECTPLAY3 iface, LPCDPSESSIONDESC2 a, DWORD b, LPCDPSECURITYDESC c, LPCDPCREDENTIALS d )
2368{
2369 ICOM_THIS(IDirectPlay3Impl,iface);
2370 FIXME("(%p)->(%p,0x%08lx,%p,%p): stub", This, a, b, c, d );
2371 return DP_OK;
2372}
2373
2374HRESULT WINAPI DirectPlay3A_SendChatMessage
2375 ( LPDIRECTPLAY3A iface, DPID a, DPID b, DWORD c, LPDPCHAT d )
2376{
2377 ICOM_THIS(IDirectPlay3Impl,iface);
2378 FIXME("(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", This, a, b, c, d );
2379 return DP_OK;
2380}
2381
2382HRESULT WINAPI DirectPlay3WImpl_SendChatMessage
2383 ( LPDIRECTPLAY3 iface, DPID a, DPID b, DWORD c, LPDPCHAT d )
2384{
2385 ICOM_THIS(IDirectPlay3Impl,iface);
2386 FIXME("(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", This, a, b, c, d );
2387 return DP_OK;
2388}
2389
2390HRESULT WINAPI DirectPlay3A_SetGroupConnectionSettings
2391 ( LPDIRECTPLAY3A iface, DWORD a, DPID b, LPDPLCONNECTION c )
2392{
2393 ICOM_THIS(IDirectPlay3Impl,iface);
2394 FIXME("(%p)->(0x%08lx,0x%08lx,%p): stub", This, a, b, c );
2395 return DP_OK;
2396}
2397
2398HRESULT WINAPI DirectPlay3WImpl_SetGroupConnectionSettings
2399 ( LPDIRECTPLAY3 iface, DWORD a, DPID b, LPDPLCONNECTION c )
2400{
2401 ICOM_THIS(IDirectPlay3Impl,iface);
2402 FIXME("(%p)->(0x%08lx,0x%08lx,%p): stub", This, a, b, c );
2403 return DP_OK;
2404}
2405
2406HRESULT WINAPI DirectPlay3A_StartSession
2407 ( LPDIRECTPLAY3A iface, DWORD a, DPID b )
2408{
2409 ICOM_THIS(IDirectPlay3Impl,iface);
2410 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2411 return DP_OK;
2412}
2413
2414HRESULT WINAPI DirectPlay3WImpl_StartSession
2415 ( LPDIRECTPLAY3 iface, DWORD a, DPID b )
2416{
2417 ICOM_THIS(IDirectPlay3Impl,iface);
2418 FIXME("(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2419 return DP_OK;
2420}
2421
2422HRESULT WINAPI DirectPlay3A_GetGroupFlags
2423 ( LPDIRECTPLAY3A iface, DPID a, LPDWORD b )
2424{
2425 ICOM_THIS(IDirectPlay3Impl,iface);
2426 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2427 return DP_OK;
2428}
2429
2430HRESULT WINAPI DirectPlay3WImpl_GetGroupFlags
2431 ( LPDIRECTPLAY3 iface, DPID a, LPDWORD b )
2432{
2433 ICOM_THIS(IDirectPlay3Impl,iface);
2434 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2435 return DP_OK;
2436}
2437
2438HRESULT WINAPI DirectPlay3A_GetGroupParent
2439 ( LPDIRECTPLAY3A iface, DPID a, LPDPID b )
2440{
2441 ICOM_THIS(IDirectPlay3Impl,iface);
2442 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2443 return DP_OK;
2444}
2445
2446HRESULT WINAPI DirectPlay3WImpl_GetGroupParent
2447 ( LPDIRECTPLAY3 iface, DPID a, LPDPID b )
2448{
2449 ICOM_THIS(IDirectPlay3Impl,iface);
2450 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2451 return DP_OK;
2452}
2453
2454HRESULT WINAPI DirectPlay3A_GetPlayerAccount
2455 ( LPDIRECTPLAY3A iface, DPID a, DWORD b, LPVOID c, LPDWORD d )
2456{
2457 ICOM_THIS(IDirectPlay3Impl,iface);
2458 FIXME("(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2459 return DP_OK;
2460}
2461
2462HRESULT WINAPI DirectPlay3WImpl_GetPlayerAccount
2463 ( LPDIRECTPLAY3 iface, DPID a, DWORD b, LPVOID c, LPDWORD d )
2464{
2465 ICOM_THIS(IDirectPlay3Impl,iface);
2466 FIXME("(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2467 return DP_OK;
2468}
2469
2470HRESULT WINAPI DirectPlay3A_GetPlayerFlags
2471 ( LPDIRECTPLAY3A iface, DPID a, LPDWORD b )
2472{
2473 ICOM_THIS(IDirectPlay3Impl,iface);
2474 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2475 return DP_OK;
2476}
2477
2478HRESULT WINAPI DirectPlay3WImpl_GetPlayerFlags
2479 ( LPDIRECTPLAY3 iface, DPID a, LPDWORD b )
2480{
2481 ICOM_THIS(IDirectPlay3Impl,iface);
2482 FIXME("(%p)->(0x%08lx,%p): stub", This, a, b );
2483 return DP_OK;
2484}
2485
2486
2487/* Note: Hack so we can reuse the old functions without compiler warnings */
2488#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
2489# define XCAST(fun) (typeof(directPlay2WVT.fn##fun))
2490#else
2491# define XCAST(fun) (void*)
2492#endif
2493
2494ICOM_VTABLE(IDirectPlay2) directPlay2WVT =
2495{
2496 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2497 DirectPlay2W_QueryInterface,
2498 XCAST(AddRef)DirectPlay3WImpl_AddRef,
2499 XCAST(Release)DirectPlay3WImpl_Release,
2500 XCAST(AddPlayerToGroup)DirectPlay3WImpl_AddPlayerToGroup,
2501 XCAST(Close)DirectPlay3WImpl_Close,
2502 XCAST(CreateGroup)DirectPlay3WImpl_CreateGroup,
2503 XCAST(CreatePlayer)DirectPlay3WImpl_CreatePlayer,
2504 XCAST(DeletePlayerFromGroup)DirectPlay3WImpl_DeletePlayerFromGroup,
2505 XCAST(DestroyGroup)DirectPlay3WImpl_DestroyGroup,
2506 XCAST(DestroyPlayer)DirectPlay3WImpl_DestroyPlayer,
2507 XCAST(EnumGroupPlayers)DirectPlay3WImpl_EnumGroupPlayers,
2508 XCAST(EnumGroups)DirectPlay3WImpl_EnumGroups,
2509 XCAST(EnumPlayers)DirectPlay3WImpl_EnumPlayers,
2510 XCAST(EnumSessions)DirectPlay3WImpl_EnumSessions,
2511 XCAST(GetCaps)DirectPlay3WImpl_GetCaps,
2512 XCAST(GetGroupData)DirectPlay3WImpl_GetGroupData,
2513 XCAST(GetGroupName)DirectPlay3WImpl_GetGroupName,
2514 XCAST(GetMessageCount)DirectPlay3WImpl_GetMessageCount,
2515 XCAST(GetPlayerAddress)DirectPlay3WImpl_GetPlayerAddress,
2516 XCAST(GetPlayerCaps)DirectPlay3WImpl_GetPlayerCaps,
2517 XCAST(GetPlayerData)DirectPlay3WImpl_GetPlayerData,
2518 XCAST(GetPlayerName)DirectPlay3WImpl_GetPlayerName,
2519 XCAST(GetSessionDesc)DirectPlay3WImpl_GetSessionDesc,
2520 XCAST(Initialize)DirectPlay3WImpl_Initialize,
2521 XCAST(Open)DirectPlay3WImpl_Open,
2522 XCAST(Receive)DirectPlay3WImpl_Receive,
2523 XCAST(Send)DirectPlay3WImpl_Send,
2524 XCAST(SetGroupData)DirectPlay3WImpl_SetGroupData,
2525 XCAST(SetGroupName)DirectPlay3WImpl_SetGroupName,
2526 XCAST(SetPlayerData)DirectPlay3WImpl_SetPlayerData,
2527 XCAST(SetPlayerName)DirectPlay3WImpl_SetPlayerName,
2528 XCAST(SetSessionDesc)DirectPlay3WImpl_SetSessionDesc
2529};
2530#undef XCAST
2531
2532
2533/* Note: Hack so we can reuse the old functions without compiler warnings */
2534#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
2535# define XCAST(fun) (typeof(directPlay2AVT.fn##fun))
2536#else
2537# define XCAST(fun) (void*)
2538#endif
2539
2540ICOM_VTABLE(IDirectPlay2) directPlay2AVT =
2541{
2542 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2543 DirectPlay2A_QueryInterface,
2544 XCAST(AddRef)DirectPlay3WImpl_AddRef,
2545 XCAST(Release)DirectPlay3A_Release,
2546 XCAST(AddPlayerToGroup)DirectPlay3A_AddPlayerToGroup,
2547 XCAST(Close)DirectPlay3A_Close,
2548 XCAST(CreateGroup)DirectPlay3A_CreateGroup,
2549 XCAST(CreatePlayer)DirectPlay3A_CreatePlayer,
2550 XCAST(DeletePlayerFromGroup)DirectPlay3A_DeletePlayerFromGroup,
2551 XCAST(DestroyGroup)DirectPlay3A_DestroyGroup,
2552 XCAST(DestroyPlayer)DirectPlay3A_DestroyPlayer,
2553 XCAST(EnumGroupPlayers)DirectPlay3A_EnumGroupPlayers,
2554 XCAST(EnumGroups)DirectPlay3A_EnumGroups,
2555 XCAST(EnumPlayers)DirectPlay3A_EnumPlayers,
2556 XCAST(EnumSessions)DirectPlay3A_EnumSessions,
2557 XCAST(GetCaps)DirectPlay3A_GetCaps,
2558 XCAST(GetGroupData)DirectPlay3A_GetGroupData,
2559 XCAST(GetGroupName)DirectPlay3A_GetGroupName,
2560 XCAST(GetMessageCount)DirectPlay3A_GetMessageCount,
2561 XCAST(GetPlayerAddress)DirectPlay3A_GetPlayerAddress,
2562 XCAST(GetPlayerCaps)DirectPlay3A_GetPlayerCaps,
2563 XCAST(GetPlayerData)DirectPlay3A_GetPlayerData,
2564 XCAST(GetPlayerName)DirectPlay3A_GetPlayerName,
2565 XCAST(GetSessionDesc)DirectPlay3A_GetSessionDesc,
2566 XCAST(Initialize)DirectPlay3A_Initialize,
2567 XCAST(Open)DirectPlay3A_Open,
2568 XCAST(Receive)DirectPlay3A_Receive,
2569 XCAST(Send)DirectPlay3A_Send,
2570 XCAST(SetGroupData)DirectPlay3A_SetGroupData,
2571 XCAST(SetGroupName)DirectPlay3A_SetGroupName,
2572 XCAST(SetPlayerData)DirectPlay3A_SetPlayerData,
2573 XCAST(SetPlayerName)DirectPlay3A_SetPlayerName,
2574 XCAST(SetSessionDesc)DirectPlay3A_SetSessionDesc
2575};
2576#undef XCAST
2577
2578
2579ICOM_VTABLE(IDirectPlay3) directPlay3AVT =
2580{
2581 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2582 DirectPlay3A_QueryInterface,
2583 DirectPlay3WImpl_AddRef,
2584 DirectPlay3A_Release,
2585 DirectPlay3A_AddPlayerToGroup,
2586 DirectPlay3A_Close,
2587 DirectPlay3A_CreateGroup,
2588 DirectPlay3A_CreatePlayer,
2589 DirectPlay3A_DeletePlayerFromGroup,
2590 DirectPlay3A_DestroyGroup,
2591 DirectPlay3A_DestroyPlayer,
2592 DirectPlay3A_EnumGroupPlayers,
2593 DirectPlay3A_EnumGroups,
2594 DirectPlay3A_EnumPlayers,
2595 DirectPlay3A_EnumSessions,
2596 DirectPlay3A_GetCaps,
2597 DirectPlay3A_GetGroupData,
2598 DirectPlay3A_GetGroupName,
2599 DirectPlay3A_GetMessageCount,
2600 DirectPlay3A_GetPlayerAddress,
2601 DirectPlay3A_GetPlayerCaps,
2602 DirectPlay3A_GetPlayerData,
2603 DirectPlay3A_GetPlayerName,
2604 DirectPlay3A_GetSessionDesc,
2605 DirectPlay3A_Initialize,
2606 DirectPlay3A_Open,
2607 DirectPlay3A_Receive,
2608 DirectPlay3A_Send,
2609 DirectPlay3A_SetGroupData,
2610 DirectPlay3A_SetGroupName,
2611 DirectPlay3A_SetPlayerData,
2612 DirectPlay3A_SetPlayerName,
2613 DirectPlay3A_SetSessionDesc,
2614
2615 DirectPlay3A_AddGroupToGroup,
2616 DirectPlay3A_CreateGroupInGroup,
2617 DirectPlay3A_DeleteGroupFromGroup,
2618 DirectPlay3A_EnumConnections,
2619 DirectPlay3A_EnumGroupsInGroup,
2620 DirectPlay3A_GetGroupConnectionSettings,
2621 DirectPlay3A_InitializeConnection,
2622 DirectPlay3A_SecureOpen,
2623 DirectPlay3A_SendChatMessage,
2624 DirectPlay3A_SetGroupConnectionSettings,
2625 DirectPlay3A_StartSession,
2626 DirectPlay3A_GetGroupFlags,
2627 DirectPlay3A_GetGroupParent,
2628 DirectPlay3A_GetPlayerAccount,
2629 DirectPlay3A_GetPlayerFlags
2630};
2631
2632ICOM_VTABLE(IDirectPlay3) directPlay3WVT =
2633{
2634 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2635 DirectPlay3WImpl_QueryInterface,
2636 DirectPlay3WImpl_AddRef,
2637 DirectPlay3WImpl_Release,
2638 DirectPlay3WImpl_AddPlayerToGroup,
2639 DirectPlay3WImpl_Close,
2640 DirectPlay3WImpl_CreateGroup,
2641 DirectPlay3WImpl_CreatePlayer,
2642 DirectPlay3WImpl_DeletePlayerFromGroup,
2643 DirectPlay3WImpl_DestroyGroup,
2644 DirectPlay3WImpl_DestroyPlayer,
2645 DirectPlay3WImpl_EnumGroupPlayers,
2646 DirectPlay3WImpl_EnumGroups,
2647 DirectPlay3WImpl_EnumPlayers,
2648 DirectPlay3WImpl_EnumSessions,
2649 DirectPlay3WImpl_GetCaps,
2650 DirectPlay3WImpl_GetGroupData,
2651 DirectPlay3WImpl_GetGroupName,
2652 DirectPlay3WImpl_GetMessageCount,
2653 DirectPlay3WImpl_GetPlayerAddress,
2654 DirectPlay3WImpl_GetPlayerCaps,
2655 DirectPlay3WImpl_GetPlayerData,
2656 DirectPlay3WImpl_GetPlayerName,
2657 DirectPlay3WImpl_GetSessionDesc,
2658 DirectPlay3WImpl_Initialize,
2659 DirectPlay3WImpl_Open,
2660 DirectPlay3WImpl_Receive,
2661 DirectPlay3WImpl_Send,
2662 DirectPlay3WImpl_SetGroupData,
2663 DirectPlay3WImpl_SetGroupName,
2664 DirectPlay3WImpl_SetPlayerData,
2665 DirectPlay3WImpl_SetPlayerName,
2666 DirectPlay3WImpl_SetSessionDesc,
2667
2668 DirectPlay3WImpl_AddGroupToGroup,
2669 DirectPlay3WImpl_CreateGroupInGroup,
2670 DirectPlay3WImpl_DeleteGroupFromGroup,
2671 DirectPlay3WImpl_EnumConnections,
2672 DirectPlay3WImpl_EnumGroupsInGroup,
2673 DirectPlay3WImpl_GetGroupConnectionSettings,
2674 DirectPlay3WImpl_InitializeConnection,
2675 DirectPlay3WImpl_SecureOpen,
2676 DirectPlay3WImpl_SendChatMessage,
2677 DirectPlay3WImpl_SetGroupConnectionSettings,
2678 DirectPlay3WImpl_StartSession,
2679 DirectPlay3WImpl_GetGroupFlags,
2680 DirectPlay3WImpl_GetGroupParent,
2681 DirectPlay3WImpl_GetPlayerAccount,
2682 DirectPlay3WImpl_GetPlayerFlags
2683};
Note: See TracBrowser for help on using the repository browser.