1 /* Direct Play 3 and Direct Play Lobby 2 Implementation
3 * Copyright 1998,1999 - Peter Hunnisett
5 * <presently under construction - contact hunnise@nortelnetworks.com>
15 struct IDirectPlayLobby
{
16 LPDIRECTPLAYLOBBY_VTABLE lpVtbl
;
19 DPSESSIONDESC2 sessionDesc
;
26 struct IDirectPlayLobby2
{
27 LPDIRECTPLAYLOBBY2_VTABLE lpVtbl
;
30 DPSESSIONDESC2 lpSessionDesc
;
38 /* Forward declarations of virtual tables */
39 static DIRECTPLAYLOBBY_VTABLE directPlayLobbyAVT
;
40 static DIRECTPLAYLOBBY_VTABLE directPlayLobbyWVT
;
41 static DIRECTPLAYLOBBY2_VTABLE directPlayLobby2AVT
;
42 static DIRECTPLAYLOBBY2_VTABLE directPlayLobby2WVT
;
45 static DIRECTPLAY2_VTABLE directPlay2WVT
;
46 static DIRECTPLAY2_VTABLE directPlay2AVT
;
47 static DIRECTPLAY3_VTABLE directPlay3WVT
;
48 static DIRECTPLAY3_VTABLE directPlay3AVT
;
54 LPDIRECTPLAY2_VTABLE lpVtbl
;
59 LPDIRECTPLAY3_VTABLE lpVtbl
;
63 /* Routine called when starting up the server thread */
64 DWORD
DPLobby_Spawn_Server( LPVOID startData
)
66 DPSESSIONDESC2
* lpSession
= (DPSESSIONDESC2
*) startData
;
67 DWORD sessionDwFlags
= lpSession
->dwFlags
;
69 TRACE( dplay
, "spawing thread for lpConn=%p dwFlags=%08lx\n", lpSession
, sessionDwFlags
);
70 FIXME( dplay
, "thread needs something to do\n" );
75 /* Check out the connection flags to determine what to do. Ensure we have
76 no leftover bits in this structure */
77 if( sessionDwFlags
& DPSESSION_CLIENTSERVER
)
79 /* This indicates that the application which is requesting the creation
80 * of this session is going to be the server (application/player)
82 if( sessionDwFlags
& DPSESSION_SECURESERVER
)
84 sessionDwFlags
&= ~DPSESSION_SECURESERVER
;
86 sessionDwFlags
&= ~DPSESSION_CLIENTSERVER
;
89 if( sessionDwFlags
& DPSESSION_JOINDISABLED
)
91 sessionDwFlags
&= ~DPSESSION_JOINDISABLED
;
94 if( sessionDwFlags
& DPSESSION_KEEPALIVE
)
96 sessionDwFlags
&= ~DPSESSION_KEEPALIVE
;
99 if( sessionDwFlags
& DPSESSION_MIGRATEHOST
)
101 sessionDwFlags
&= ~DPSESSION_MIGRATEHOST
;
104 if( sessionDwFlags
& DPSESSION_MULTICASTSERVER
)
106 sessionDwFlags
&= ~DPSESSION_MULTICASTSERVER
;
109 if( sessionDwFlags
& DPSESSION_NEWPLAYERSDISABLED
)
111 sessionDwFlags
&= ~DPSESSION_NEWPLAYERSDISABLED
;
114 if( sessionDwFlags
& DPSESSION_NODATAMESSAGES
)
116 sessionDwFlags
&= ~DPSESSION_NODATAMESSAGES
;
119 if( sessionDwFlags
& DPSESSION_NOMESSAGEID
)
121 sessionDwFlags
&= ~DPSESSION_NOMESSAGEID
;
124 if( sessionDwFlags
& DPSESSION_PASSWORDREQUIRED
)
126 sessionDwFlags
&= ~DPSESSION_PASSWORDREQUIRED
;
136 /*********************************************************
138 * Direct Play and Direct Play Lobby Interface Implementation
140 *********************************************************/
142 /* The COM interface for upversioning an interface
143 * We've been given a GUID (riid) and we need to replace the present
144 * interface with that of the requested interface.
146 * Snip from some Microsoft document:
147 * There are four requirements for implementations of QueryInterface (In these
148 * cases, "must succeed" means "must succeed barring catastrophic failure."):
150 * * The set of interfaces accessible on an object through
151 * IUnknown::QueryInterface must be static, not dynamic. This means that
152 * if a call to QueryInterface for a pointer to a specified interface
153 * succeeds the first time, it must succeed again, and if it fails the
154 * first time, it must fail on all subsequent queries.
155 * * It must be symmetric ~W if a client holds a pointer to an interface on
156 * an object, and queries for that interface, the call must succeed.
157 * * It must be reflexive ~W if a client holding a pointer to one interface
158 * queries successfully for another, a query through the obtained pointer
159 * for the first interface must succeed.
160 * * It must be transitive ~W if a client holding a pointer to one interface
161 * queries successfully for a second, and through that pointer queries
162 * successfully for a third interface, a query for the first interface
163 * through the pointer for the third interface must succeed.
165 * As you can see, this interface doesn't qualify but will most likely
166 * be good enough for the time being.
169 /* Helper function for DirectPlayLobby QueryInterface */
170 static HRESULT directPlayLobby_QueryInterface
171 ( REFIID riid
, LPVOID
* ppvObj
)
174 if( IsEqualGUID( &IID_IDirectPlayLobby
, riid
) )
176 LPDIRECTPLAYLOBBY lpDpL
= (LPDIRECTPLAYLOBBY
)(*ppvObj
);
178 lpDpL
= (LPDIRECTPLAYLOBBY
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
183 return E_NOINTERFACE
;
186 lpDpL
->lpVtbl
= &directPlayLobbyWVT
;
191 else if( IsEqualGUID( &IID_IDirectPlayLobbyA
, riid
) )
193 LPDIRECTPLAYLOBBYA lpDpL
= (LPDIRECTPLAYLOBBYA
)(*ppvObj
);
195 lpDpL
= (LPDIRECTPLAYLOBBYA
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
200 return E_NOINTERFACE
;
203 lpDpL
->lpVtbl
= &directPlayLobbyAVT
;
208 else if( IsEqualGUID( &IID_IDirectPlayLobby2
, riid
) )
210 LPDIRECTPLAYLOBBY2 lpDpL
= (LPDIRECTPLAYLOBBY2
)(*ppvObj
);
212 lpDpL
= (LPDIRECTPLAYLOBBY2
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
217 return E_NOINTERFACE
;
220 lpDpL
->lpVtbl
= &directPlayLobby2WVT
;
225 else if( IsEqualGUID( &IID_IDirectPlayLobby2A
, riid
) )
227 LPDIRECTPLAYLOBBY2A lpDpL
= (LPDIRECTPLAYLOBBY2A
)(*ppvObj
);
229 lpDpL
= (LPDIRECTPLAYLOBBY2
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
234 return E_NOINTERFACE
;
237 lpDpL
->lpVtbl
= &directPlayLobby2AVT
;
243 /* Unknown interface */
245 return E_NOINTERFACE
;
247 static HRESULT WINAPI IDirectPlayLobbyA_QueryInterface
248 ( LPDIRECTPLAYLOBBYA
this,
252 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
254 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
255 IsEqualGUID( &IID_IDirectPlayLobbyA
, riid
)
258 this->lpVtbl
->fnAddRef( this );
263 return directPlayLobby_QueryInterface( riid
, ppvObj
);
267 static HRESULT WINAPI IDirectPlayLobbyW_QueryInterface
268 ( LPDIRECTPLAYLOBBY
this,
272 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
274 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
275 IsEqualGUID( &IID_IDirectPlayLobby
, riid
)
278 this->lpVtbl
->fnAddRef( this );
283 return directPlayLobby_QueryInterface( riid
, ppvObj
);
287 static HRESULT WINAPI IDirectPlayLobby2A_QueryInterface
288 ( LPDIRECTPLAYLOBBY2A
this,
292 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
294 /* Compare riids. We know this object is a direct play lobby 2A object.
295 If we are asking about the same type of interface we're fine.
297 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
298 IsEqualGUID( &IID_IDirectPlayLobby2A
, riid
)
301 this->lpVtbl
->fnAddRef( this );
305 return directPlayLobby_QueryInterface( riid
, ppvObj
);
308 static HRESULT WINAPI IDirectPlayLobby2W_QueryInterface
309 ( LPDIRECTPLAYLOBBY2
this,
314 /* Compare riids. We know this object is a direct play lobby 2 object.
315 If we are asking about the same type of interface we're fine.
317 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
318 IsEqualGUID( &IID_IDirectPlayLobby2
, riid
)
321 this->lpVtbl
->fnAddRef( this );
326 return directPlayLobby_QueryInterface( riid
, ppvObj
);
331 * Simple procedure. Just increment the reference count to this
332 * structure and return the new reference count.
334 static ULONG WINAPI IDirectPlayLobby2A_AddRef
335 ( LPDIRECTPLAYLOBBY2A
this )
338 TRACE( dplay
,"ref count now %lu\n", this->ref
);
342 static ULONG WINAPI IDirectPlayLobby2W_AddRef
343 ( LPDIRECTPLAYLOBBY2
this )
345 return IDirectPlayLobby2A_AddRef( (LPDIRECTPLAYLOBBY2
) this );
350 * Simple COM procedure. Decrease the reference count to this object.
351 * If the object no longer has any reference counts, free up the associated
354 static ULONG WINAPI IDirectPlayLobby2A_Release
355 ( LPDIRECTPLAYLOBBY2A
this )
357 TRACE( dplay
, "ref count decremeneted from %lu\n", this->ref
);
361 /* Deallocate if this is the last reference to the object */
364 FIXME( dplay
, "memory leak\n" );
365 /* Implement memory deallocation */
367 HeapFree( GetProcessHeap(), 0, this );
375 static ULONG WINAPI IDirectPlayLobby2W_Release
376 ( LPDIRECTPLAYLOBBY2
this )
378 return IDirectPlayLobby2A_Release( (LPDIRECTPLAYLOBBY2A
) this );
382 /********************************************************************
384 * Connects an application to the session specified by the DPLCONNECTION
385 * structure currently stored with the DirectPlayLobby object.
387 * Returns a IDirectPlay interface.
390 static HRESULT WINAPI IDirectPlayLobby2A_Connect
391 ( LPDIRECTPLAYLOBBY2A
this,
393 LPDIRECTPLAY2
* lplpDP
,
396 FIXME( dplay
, ": dwFlags=%08lx %p %p stub\n", dwFlags
, lplpDP
, pUnk
);
397 return DPERR_OUTOFMEMORY
;
400 static HRESULT WINAPI IDirectPlayLobby2W_Connect
401 ( LPDIRECTPLAYLOBBY2
this,
403 LPDIRECTPLAY2
* lplpDP
,
406 LPDIRECTPLAY2
* directPlay2W
;
409 FIXME( dplay
, "(%p)->(%08lx,%p,%p): stub\n", this, dwFlags
, lplpDP
, pUnk
);
413 return DPERR_INVALIDPARAMS
;
416 if( ( createRC
= DirectPlayCreate( (LPGUID
)&IID_IDirectPlayLobby2
, lplpDP
, pUnk
) ) != DP_OK
)
418 ERR( dplay
, "error creating Direct Play 2W interface. Return Code = %ld.\n", createRC
);
422 /* This should invoke IDirectPlay3::InitializeConnection IDirectPlay3::Open */
423 directPlay2W
= lplpDP
;
429 /* All the stuff below this is WRONG! */
430 if( this->lpSession
->dwFlags
== DPLCONNECTION_CREATESESSION
)
434 /* Spawn a thread to deal with all of this and to handle the incomming requests */
435 threadIdSink
= CreateThread( NULL
, 0, &DPLobby_Spawn_Server
,
436 (LPVOID
)this->lpSession
->lpConn
->lpSessionDesc
, 0, &threadIdSink
);
439 else if ( this->lpSession
->dwFlags
== DPLCONNECTION_JOINSESSION
)
441 /* Let's search for a matching session */
442 FIXME( dplay
, "joining session not yet supported.\n");
443 return DPERR_OUTOFMEMORY
;
445 else /* Unknown type of connection request */
447 ERR( dplay
, ": Unknown connection request lpConn->dwFlags=%08lx\n",
450 return DPERR_OUTOFMEMORY
;
453 /* This does the work of the following methods...
454 IDirectPlay3::InitializeConnection,
455 IDirectPlay3::EnumSessions,
466 /********************************************************************
468 * Creates a DirectPlay Address, given a service provider-specific network
470 * Returns an address contains the globally unique identifier
471 * (GUID) of the service provider and data that the service provider can
472 * interpret as a network address.
475 static HRESULT WINAPI IDirectPlayLobby2A_CreateAddress
476 ( LPDIRECTPLAYLOBBY2A
this,
478 REFGUID guidDataType
,
482 LPDWORD lpdwAddressSize
)
484 FIXME( dplay
, ":stub\n");
485 return DPERR_OUTOFMEMORY
;
488 static HRESULT WINAPI IDirectPlayLobby2W_CreateAddress
489 ( LPDIRECTPLAYLOBBY2
this,
491 REFGUID guidDataType
,
495 LPDWORD lpdwAddressSize
)
497 FIXME( dplay
, ":stub\n");
498 return DPERR_OUTOFMEMORY
;
502 /********************************************************************
504 * Parses out chunks from the DirectPlay Address buffer by calling the
505 * given callback function, with lpContext, for each of the chunks.
508 static HRESULT WINAPI IDirectPlayLobby2A_EnumAddress
509 ( LPDIRECTPLAYLOBBY2A
this,
510 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback
,
515 FIXME( dplay
, ":stub\n");
516 return DPERR_OUTOFMEMORY
;
519 static HRESULT WINAPI IDirectPlayLobby2W_EnumAddress
520 ( LPDIRECTPLAYLOBBY2
this,
521 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback
,
526 FIXME( dplay
, ":stub\n");
527 return DPERR_OUTOFMEMORY
;
530 /********************************************************************
532 * Enumerates all the address types that a given service provider needs to
533 * build the DirectPlay Address.
536 static HRESULT WINAPI IDirectPlayLobbyA_EnumAddressTypes
537 ( LPDIRECTPLAYLOBBYA
this,
538 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback
,
543 FIXME( dplay
, ":stub\n");
544 return DPERR_OUTOFMEMORY
;
547 static HRESULT WINAPI IDirectPlayLobby2A_EnumAddressTypes
548 ( LPDIRECTPLAYLOBBY2A
this,
549 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback
,
554 return IDirectPlayLobbyA_EnumAddressTypes( (LPDIRECTPLAYLOBBYA
)this, lpEnumAddressTypeCallback
,
555 guidSP
, lpContext
, dwFlags
);
558 static HRESULT WINAPI IDirectPlayLobby2W_EnumAddressTypes
559 ( LPDIRECTPLAYLOBBY2
this,
560 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback
,
565 FIXME( dplay
, ":stub\n");
566 return DPERR_OUTOFMEMORY
;
569 /********************************************************************
571 * Enumerates what applications are registered with DirectPlay by
572 * invoking the callback function with lpContext.
575 static HRESULT WINAPI IDirectPlayLobbyW_EnumLocalApplications
576 ( LPDIRECTPLAYLOBBY
this,
577 LPDPLENUMLOCALAPPLICATIONSCALLBACK a
,
581 FIXME( dplay
, ":stub\n");
582 return DPERR_OUTOFMEMORY
;
585 static HRESULT WINAPI IDirectPlayLobby2W_EnumLocalApplications
586 ( LPDIRECTPLAYLOBBY2
this,
587 LPDPLENUMLOCALAPPLICATIONSCALLBACK a
,
591 return IDirectPlayLobbyW_EnumLocalApplications( (LPDIRECTPLAYLOBBY
)this, a
,
592 lpContext
, dwFlags
);
595 static HRESULT WINAPI IDirectPlayLobbyA_EnumLocalApplications
596 ( LPDIRECTPLAYLOBBYA
this,
597 LPDPLENUMLOCALAPPLICATIONSCALLBACK a
,
601 FIXME( dplay
, ":stub\n");
602 return DPERR_OUTOFMEMORY
;
605 static HRESULT WINAPI IDirectPlayLobby2A_EnumLocalApplications
606 ( LPDIRECTPLAYLOBBY2A
this,
607 LPDPLENUMLOCALAPPLICATIONSCALLBACK a
,
611 return IDirectPlayLobbyA_EnumLocalApplications( (LPDIRECTPLAYLOBBYA
)this, a
,
612 lpContext
, dwFlags
);
616 /********************************************************************
618 * Retrieves the DPLCONNECTION structure that contains all the information
619 * needed to start and connect an application. This was generated using
620 * either the RunApplication or SetConnectionSettings methods.
622 * NOTES: If lpData is NULL then just return lpdwDataSize. This allows
623 * the data structure to be allocated by our caller which can then
624 * call this procedure/method again with a valid data pointer.
626 static HRESULT WINAPI IDirectPlayLobbyA_GetConnectionSettings
627 ( LPDIRECTPLAYLOBBYA
this,
630 LPDWORD lpdwDataSize
)
632 LPDPLCONNECTION lpDplConnection
;
634 FIXME( dplay
, ": semi stub (%p)->(0x%08lx,%p,%p)\n", this, dwAppID
, lpData
, lpdwDataSize
);
636 /* Application is requesting us to give the required size */
639 /* Let's check the size of the buffer that the application has allocated */
640 if( *lpdwDataSize
>= sizeof( DPLCONNECTION
) )
646 *lpdwDataSize
= sizeof( DPLCONNECTION
);
647 return DPERR_BUFFERTOOSMALL
;
651 /* Fill in the fields - let them just use the ptrs */
652 lpDplConnection
= (LPDPLCONNECTION
)lpData
;
654 /* Make sure we were given the right size */
655 if( lpDplConnection
->dwSize
< sizeof( DPLCONNECTION
) )
657 ERR( dplay
, "bad passed size 0x%08lx.\n", lpDplConnection
->dwSize
);
658 return DPERR_INVALIDPARAMS
;
661 /* Copy everything we've got into here */
662 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
663 lpDplConnection
->dwFlags
= this->dwConnFlags
;
665 /* Copy LPDPSESSIONDESC2 struct */
666 lpDplConnection
->lpSessionDesc
= HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof( this->sessionDesc
) );
667 memcpy( lpDplConnection
->lpSessionDesc
, &(this->sessionDesc
), sizeof( this->sessionDesc
) );
669 if( this->sessionDesc
.sess
.lpszSessionName
)
671 lpDplConnection
->lpSessionDesc
->sess
.lpszSessionName
=
672 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, this->sessionDesc
.sess
.lpszSessionName
);
675 if( this->sessionDesc
.pass
.lpszPassword
)
677 lpDplConnection
->lpSessionDesc
->pass
.lpszPassword
=
678 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, this->sessionDesc
.pass
.lpszPassword
);
681 /* I don't know what to use the reserved for. We'll set it to 0 just for fun */
682 this->sessionDesc
.dwReserved1
= this->sessionDesc
.dwReserved2
= 0;
684 /* Copy DPNAME struct - seems to be optional - check for existance first */
685 lpDplConnection
->lpPlayerName
= HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof( this->playerName
) );
686 memcpy( lpDplConnection
->lpPlayerName
, &(this->playerName
), sizeof( this->playerName
) );
688 if( this->playerName
.psn
.lpszShortName
)
690 lpDplConnection
->lpPlayerName
->psn
.lpszShortName
=
691 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, this->playerName
.psn
.lpszShortName
);
694 if( this->playerName
.pln
.lpszLongName
)
696 lpDplConnection
->lpPlayerName
->pln
.lpszLongName
=
697 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, this->playerName
.pln
.lpszLongName
);
702 memcpy( &(lpDplConnection
->guidSP
), &(this->guidSP
), sizeof( this->guidSP
) );
704 lpDplConnection
->lpAddress
= HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
, this->dwAddressSize
);
705 memcpy( lpDplConnection
->lpAddress
, this->lpAddress
, this->dwAddressSize
);
707 lpDplConnection
->dwAddressSize
= this->dwAddressSize
;
712 static HRESULT WINAPI IDirectPlayLobby2A_GetConnectionSettings
713 ( LPDIRECTPLAYLOBBY2A
this,
716 LPDWORD lpdwDataSize
)
718 return IDirectPlayLobbyA_GetConnectionSettings( (LPDIRECTPLAYLOBBYA
)this,
719 dwAppID
, lpData
, lpdwDataSize
);
722 static HRESULT WINAPI IDirectPlayLobbyW_GetConnectionSettings
723 ( LPDIRECTPLAYLOBBY
this,
726 LPDWORD lpdwDataSize
)
728 FIXME( dplay
, ":semi stub %p %08lx %p %p \n", this, dwAppID
, lpData
, lpdwDataSize
);
730 /* Application is requesting us to give the required size */
733 /* Let's check the size of the buffer that the application has allocated */
734 if( *lpdwDataSize
>= sizeof( DPLCONNECTION
) )
740 *lpdwDataSize
= sizeof( DPLCONNECTION
);
741 return DPERR_BUFFERTOOSMALL
;
745 /* Fill in the fields - let them just use the ptrs */
746 FIXME( dplay
, "stub\n" );
751 static HRESULT WINAPI IDirectPlayLobby2W_GetConnectionSettings
752 ( LPDIRECTPLAYLOBBY2
this,
755 LPDWORD lpdwDataSize
)
757 return IDirectPlayLobbyW_GetConnectionSettings( (LPDIRECTPLAYLOBBY
)this,
758 dwAppID
, lpData
, lpdwDataSize
);
761 /********************************************************************
763 * Retrieves the message sent between a lobby client and a DirectPlay
764 * application. All messages are queued until received.
767 static HRESULT WINAPI IDirectPlayLobbyA_ReceiveLobbyMessage
768 ( LPDIRECTPLAYLOBBYA
this,
771 LPDWORD lpdwMessageFlags
,
773 LPDWORD lpdwDataSize
)
775 FIXME( dplay
, ":stub %p %08lx %08lx %p %p %p\n", this, dwFlags
, dwAppID
, lpdwMessageFlags
, lpData
,
777 return DPERR_OUTOFMEMORY
;
780 static HRESULT WINAPI IDirectPlayLobby2A_ReceiveLobbyMessage
781 ( LPDIRECTPLAYLOBBY2A
this,
784 LPDWORD lpdwMessageFlags
,
786 LPDWORD lpdwDataSize
)
788 return IDirectPlayLobbyA_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBYA
)this, dwFlags
, dwAppID
,
789 lpdwMessageFlags
, lpData
, lpdwDataSize
);
793 static HRESULT WINAPI IDirectPlayLobbyW_ReceiveLobbyMessage
794 ( LPDIRECTPLAYLOBBY
this,
797 LPDWORD lpdwMessageFlags
,
799 LPDWORD lpdwDataSize
)
801 FIXME( dplay
, ":stub %p %08lx %08lx %p %p %p\n", this, dwFlags
, dwAppID
, lpdwMessageFlags
, lpData
,
803 return DPERR_OUTOFMEMORY
;
806 static HRESULT WINAPI IDirectPlayLobby2W_ReceiveLobbyMessage
807 ( LPDIRECTPLAYLOBBY2
this,
810 LPDWORD lpdwMessageFlags
,
812 LPDWORD lpdwDataSize
)
814 return IDirectPlayLobbyW_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBY
)this, dwFlags
, dwAppID
,
815 lpdwMessageFlags
, lpData
, lpdwDataSize
);
818 /********************************************************************
820 * Starts an application and passes to it all the information to
821 * connect to a session.
824 static HRESULT WINAPI IDirectPlayLobbyA_RunApplication
825 ( LPDIRECTPLAYLOBBYA
this,
828 LPDPLCONNECTION lpConn
,
829 HANDLE hReceiveEvent
)
831 FIXME( dplay
, ":stub\n");
832 return DPERR_OUTOFMEMORY
;
835 static HRESULT WINAPI IDirectPlayLobby2A_RunApplication
836 ( LPDIRECTPLAYLOBBY2A
this,
839 LPDPLCONNECTION lpConn
,
840 HANDLE hReceiveEvent
)
842 return IDirectPlayLobbyA_RunApplication( (LPDIRECTPLAYLOBBYA
)this, dwFlags
,
843 lpdwAppID
, lpConn
, hReceiveEvent
);
846 static HRESULT WINAPI IDirectPlayLobbyW_RunApplication
847 ( LPDIRECTPLAYLOBBY
this,
850 LPDPLCONNECTION lpConn
,
851 HANDLE hReceiveEvent
)
853 FIXME( dplay
, ":stub\n");
854 return DPERR_OUTOFMEMORY
;
857 static HRESULT WINAPI IDirectPlayLobby2W_RunApplication
858 ( LPDIRECTPLAYLOBBY2
this,
861 LPDPLCONNECTION lpConn
,
862 HANDLE hReceiveEvent
)
864 return IDirectPlayLobbyW_RunApplication( (LPDIRECTPLAYLOBBY
)this, dwFlags
,
865 lpdwAppID
, lpConn
, hReceiveEvent
);
869 /********************************************************************
871 * Sends a message between the application and the lobby client.
872 * All messages are queued until received.
875 static HRESULT WINAPI IDirectPlayLobbyA_SendLobbyMessage
876 ( LPDIRECTPLAYLOBBYA
this,
882 FIXME( dplay
, ":stub\n");
883 return DPERR_OUTOFMEMORY
;
886 static HRESULT WINAPI IDirectPlayLobby2A_SendLobbyMessage
887 ( LPDIRECTPLAYLOBBY2A
this,
893 return IDirectPlayLobbyA_SendLobbyMessage( (LPDIRECTPLAYLOBBYA
)this, dwFlags
,
894 dwAppID
, lpData
, dwDataSize
);
898 static HRESULT WINAPI IDirectPlayLobbyW_SendLobbyMessage
899 ( LPDIRECTPLAYLOBBY
this,
905 FIXME( dplay
, ":stub\n");
906 return DPERR_OUTOFMEMORY
;
909 static HRESULT WINAPI IDirectPlayLobby2W_SendLobbyMessage
910 ( LPDIRECTPLAYLOBBY2
this,
916 return IDirectPlayLobbyW_SendLobbyMessage( (LPDIRECTPLAYLOBBY
)this, dwFlags
,
917 dwAppID
, lpData
, dwDataSize
);
920 /********************************************************************
922 * Modifies the DPLCONNECTION structure to contain all information
923 * needed to start and connect an application.
926 static HRESULT WINAPI IDirectPlayLobbyW_SetConnectionSettings
927 ( LPDIRECTPLAYLOBBY
this,
930 LPDPLCONNECTION lpConn
)
932 TRACE( dplay
, ": this=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p\n",
933 this, dwFlags
, dwAppID
, lpConn
);
935 /* Paramater check */
936 if( dwFlags
|| !this || !lpConn
)
938 ERR( dplay
, "invalid parameters.\n");
939 return DPERR_INVALIDPARAMS
;
942 /* See if there is a connection associated with this request.
943 * dwAppID == 0 indicates that this request isn't associated with a connection.
947 FIXME( dplay
, ": Connection dwAppID=%08lx given. Not implemented yet.\n",
950 /* Need to add a check for this application Id...*/
951 return DPERR_NOTLOBBIED
;
954 if( lpConn
->dwSize
!= sizeof(DPLCONNECTION
) )
956 ERR( dplay
, ": old/new DPLCONNECTION type? Size=%08lx vs. expected=%ul bytes\n",
957 lpConn
->dwSize
, sizeof( DPLCONNECTION
) );
958 return DPERR_INVALIDPARAMS
;
961 /* Need to investigate the lpConn->lpSessionDesc to figure out
962 * what type of session we need to join/create.
964 if( (!lpConn
->lpSessionDesc
) ||
965 ( lpConn
->lpSessionDesc
->dwSize
!= sizeof( DPSESSIONDESC2
) )
968 ERR( dplay
, "DPSESSIONDESC passed in? Size=%08lx vs. expected=%ul bytes\n",
969 lpConn
->lpSessionDesc
->dwSize
, sizeof( DPSESSIONDESC2
) );
970 return DPERR_INVALIDPARAMS
;
973 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
974 this->dwConnFlags
= lpConn
->dwFlags
;
976 /* Copy LPDPSESSIONDESC2 struct - this is required */
977 memcpy( &(this->sessionDesc
), lpConn
->lpSessionDesc
, sizeof( *(lpConn
->lpSessionDesc
) ) );
979 if( lpConn
->lpSessionDesc
->sess
.lpszSessionName
)
980 this->sessionDesc
.sess
.lpszSessionName
= HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, lpConn
->lpSessionDesc
->sess
.lpszSessionName
);
982 this->sessionDesc
.sess
.lpszSessionName
= NULL
;
984 if( lpConn
->lpSessionDesc
->pass
.lpszPassword
)
985 this->sessionDesc
.pass
.lpszPassword
= HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, lpConn
->lpSessionDesc
->pass
.lpszPassword
);
987 this->sessionDesc
.pass
.lpszPassword
= NULL
;
989 /* I don't know what to use the reserved for ... */
990 this->sessionDesc
.dwReserved1
= this->sessionDesc
.dwReserved2
= 0;
992 /* Copy DPNAME struct - seems to be optional - check for existance first */
993 if( lpConn
->lpPlayerName
)
995 memcpy( &(this->playerName
), lpConn
->lpPlayerName
, sizeof( *lpConn
->lpPlayerName
) );
997 if( lpConn
->lpPlayerName
->psn
.lpszShortName
)
998 this->playerName
.psn
.lpszShortName
= HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, lpConn
->lpPlayerName
->psn
.lpszShortName
);
1000 if( lpConn
->lpPlayerName
->pln
.lpszLongName
)
1001 this->playerName
.pln
.lpszLongName
= HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY
, lpConn
->lpPlayerName
->pln
.lpszLongName
);
1005 memcpy( &(this->guidSP
), &(lpConn
->guidSP
), sizeof( lpConn
->guidSP
) );
1007 this->lpAddress
= HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
, lpConn
->dwAddressSize
);
1008 memcpy( this->lpAddress
, lpConn
->lpAddress
, lpConn
->dwAddressSize
);
1010 this->dwAddressSize
= lpConn
->dwAddressSize
;
1015 static HRESULT WINAPI IDirectPlayLobby2W_SetConnectionSettings
1016 ( LPDIRECTPLAYLOBBY2
this,
1019 LPDPLCONNECTION lpConn
)
1021 return IDirectPlayLobbyW_SetConnectionSettings( (LPDIRECTPLAYLOBBY
)this,
1022 dwFlags
, dwAppID
, lpConn
);
1025 static HRESULT WINAPI IDirectPlayLobbyA_SetConnectionSettings
1026 ( LPDIRECTPLAYLOBBYA
this,
1029 LPDPLCONNECTION lpConn
)
1031 FIXME( dplay
, ": this=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p: stub\n",
1032 this, dwFlags
, dwAppID
, lpConn
);
1033 return DPERR_OUTOFMEMORY
;
1036 static HRESULT WINAPI IDirectPlayLobby2A_SetConnectionSettings
1037 ( LPDIRECTPLAYLOBBY2A
this,
1040 LPDPLCONNECTION lpConn
)
1042 return IDirectPlayLobbyA_SetConnectionSettings( (LPDIRECTPLAYLOBBYA
)this,
1043 dwFlags
, dwAppID
, lpConn
);
1046 /********************************************************************
1048 * Registers an event that will be set when a lobby message is received.
1051 static HRESULT WINAPI IDirectPlayLobbyA_SetLobbyMessageEvent
1052 ( LPDIRECTPLAYLOBBYA
this,
1055 HANDLE hReceiveEvent
)
1057 FIXME( dplay
, ":stub\n");
1058 return DPERR_OUTOFMEMORY
;
1061 static HRESULT WINAPI IDirectPlayLobby2A_SetLobbyMessageEvent
1062 ( LPDIRECTPLAYLOBBY2A
this,
1065 HANDLE hReceiveEvent
)
1067 return IDirectPlayLobbyA_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBYA
)this, dwFlags
,
1068 dwAppID
, hReceiveEvent
);
1071 static HRESULT WINAPI IDirectPlayLobbyW_SetLobbyMessageEvent
1072 ( LPDIRECTPLAYLOBBY
this,
1075 HANDLE hReceiveEvent
)
1077 FIXME( dplay
, ":stub\n");
1078 return DPERR_OUTOFMEMORY
;
1081 static HRESULT WINAPI IDirectPlayLobby2W_SetLobbyMessageEvent
1082 ( LPDIRECTPLAYLOBBY2
this,
1085 HANDLE hReceiveEvent
)
1087 return IDirectPlayLobbyW_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBY
)this, dwFlags
,
1088 dwAppID
, hReceiveEvent
);
1092 /********************************************************************
1094 * Registers an event that will be set when a lobby message is received.
1097 static HRESULT WINAPI IDirectPlayLobby2W_CreateCompoundAddress
1098 ( LPDIRECTPLAYLOBBY2
this,
1099 LPCDPCOMPOUNDADDRESSELEMENT lpElements
,
1100 DWORD dwElementCount
,
1102 LPDWORD lpdwAddressSize
)
1104 FIXME( dplay
, ":stub\n");
1105 return DPERR_OUTOFMEMORY
;
1108 static HRESULT WINAPI IDirectPlayLobby2A_CreateCompoundAddress
1109 ( LPDIRECTPLAYLOBBY2A
this,
1110 LPCDPCOMPOUNDADDRESSELEMENT lpElements
,
1111 DWORD dwElementCount
,
1113 LPDWORD lpdwAddressSize
)
1115 FIXME( dplay
, ":stub\n");
1116 return DPERR_OUTOFMEMORY
;
1120 /* Direct Play Lobby 1 (ascii) Virtual Table for methods */
1121 /* All lobby 1 methods are exactly the same except QueryInterface */
1122 static struct tagLPDIRECTPLAYLOBBY_VTABLE directPlayLobbyAVT
= {
1123 IDirectPlayLobbyA_QueryInterface
,
1124 (void*)IDirectPlayLobby2A_AddRef
,
1125 (void*)IDirectPlayLobby2A_Release
,
1126 (void*)IDirectPlayLobby2A_Connect
,
1127 (void*)IDirectPlayLobby2A_CreateAddress
,
1128 (void*)IDirectPlayLobby2A_EnumAddress
,
1129 (void*)IDirectPlayLobby2A_EnumAddressTypes
,
1130 (void*)IDirectPlayLobby2A_EnumLocalApplications
,
1131 (void*)IDirectPlayLobby2A_GetConnectionSettings
,
1132 (void*)IDirectPlayLobby2A_ReceiveLobbyMessage
,
1133 (void*)IDirectPlayLobby2A_RunApplication
,
1134 (void*)IDirectPlayLobby2A_SendLobbyMessage
,
1135 (void*)IDirectPlayLobby2A_SetConnectionSettings
,
1136 (void*)IDirectPlayLobby2A_SetLobbyMessageEvent
1139 /* Direct Play Lobby 1 (unicode) Virtual Table for methods */
1140 static struct tagLPDIRECTPLAYLOBBY_VTABLE directPlayLobbyWVT
= {
1141 IDirectPlayLobbyW_QueryInterface
,
1142 (void*)IDirectPlayLobby2W_AddRef
,
1143 (void*)IDirectPlayLobby2W_Release
,
1144 (void*)IDirectPlayLobby2W_Connect
,
1145 (void*)IDirectPlayLobby2W_CreateAddress
,
1146 (void*)IDirectPlayLobby2W_EnumAddress
,
1147 (void*)IDirectPlayLobby2W_EnumAddressTypes
,
1148 (void*)IDirectPlayLobby2W_EnumLocalApplications
,
1149 (void*)IDirectPlayLobby2W_GetConnectionSettings
,
1150 (void*)IDirectPlayLobby2W_ReceiveLobbyMessage
,
1151 (void*)IDirectPlayLobby2W_RunApplication
,
1152 (void*)IDirectPlayLobby2W_SendLobbyMessage
,
1153 (void*)IDirectPlayLobby2W_SetConnectionSettings
,
1154 (void*)IDirectPlayLobby2W_SetLobbyMessageEvent
1158 /* Direct Play Lobby 2 (ascii) Virtual Table for methods */
1159 static struct tagLPDIRECTPLAYLOBBY2_VTABLE directPlayLobby2AVT
= {
1160 IDirectPlayLobby2A_QueryInterface
,
1161 IDirectPlayLobby2A_AddRef
,
1162 IDirectPlayLobby2A_Release
,
1163 IDirectPlayLobby2A_Connect
,
1164 IDirectPlayLobby2A_CreateAddress
,
1165 IDirectPlayLobby2A_EnumAddress
,
1166 IDirectPlayLobby2A_EnumAddressTypes
,
1167 IDirectPlayLobby2A_EnumLocalApplications
,
1168 IDirectPlayLobby2A_GetConnectionSettings
,
1169 IDirectPlayLobby2A_ReceiveLobbyMessage
,
1170 IDirectPlayLobby2A_RunApplication
,
1171 IDirectPlayLobby2A_SendLobbyMessage
,
1172 IDirectPlayLobby2A_SetConnectionSettings
,
1173 IDirectPlayLobby2A_SetLobbyMessageEvent
,
1174 IDirectPlayLobby2A_CreateCompoundAddress
1177 /* Direct Play Lobby 2 (unicode) Virtual Table for methods */
1178 static struct tagLPDIRECTPLAYLOBBY2_VTABLE directPlayLobby2WVT
= {
1179 IDirectPlayLobby2W_QueryInterface
,
1180 IDirectPlayLobby2W_AddRef
,
1181 IDirectPlayLobby2W_Release
,
1182 IDirectPlayLobby2W_Connect
,
1183 IDirectPlayLobby2W_CreateAddress
,
1184 IDirectPlayLobby2W_EnumAddress
,
1185 IDirectPlayLobby2W_EnumAddressTypes
,
1186 IDirectPlayLobby2W_EnumLocalApplications
,
1187 IDirectPlayLobby2W_GetConnectionSettings
,
1188 IDirectPlayLobby2W_ReceiveLobbyMessage
,
1189 IDirectPlayLobby2W_RunApplication
,
1190 IDirectPlayLobby2W_SendLobbyMessage
,
1191 IDirectPlayLobby2W_SetConnectionSettings
,
1192 IDirectPlayLobby2W_SetLobbyMessageEvent
,
1193 IDirectPlayLobby2W_CreateCompoundAddress
1196 /***************************************************************************
1197 * DirectPlayLobbyCreateA (DPLAYX.4)
1200 HRESULT WINAPI
DirectPlayLobbyCreateA( LPGUID lpGUIDDSP
,
1201 LPDIRECTPLAYLOBBYA
*lplpDPL
,
1206 TRACE(dplay
,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1207 lpGUIDDSP
,lplpDPL
,lpUnk
,lpData
,dwDataSize
);
1209 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1210 * equal 0. These fields are mostly for future expansion.
1212 if ( lpGUIDDSP
|| lpUnk
|| lpData
|| dwDataSize
)
1215 return DPERR_INVALIDPARAMS
;
1218 /* Yes...really we should be returning a lobby 1 object */
1219 *lplpDPL
= (LPDIRECTPLAYLOBBYA
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1220 sizeof( IDirectPlayLobbyA
) );
1224 return DPERR_OUTOFMEMORY
;
1227 (*lplpDPL
)->lpVtbl
= &directPlayLobbyAVT
;
1228 (*lplpDPL
)->ref
= 1;
1230 /* All fields were nulled out by the allocation */
1235 /***************************************************************************
1236 * DirectPlayLobbyCreateW (DPLAYX.5)
1239 HRESULT WINAPI
DirectPlayLobbyCreateW( LPGUID lpGUIDDSP
,
1240 LPDIRECTPLAYLOBBY
*lplpDPL
,
1245 TRACE(dplay
,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1246 lpGUIDDSP
,lplpDPL
,lpUnk
,lpData
,dwDataSize
);
1248 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1249 * equal 0. These fields are mostly for future expansion.
1251 if ( lpGUIDDSP
|| lpUnk
|| lpData
|| dwDataSize
)
1254 ERR( dplay
, "Bad parameters!\n" );
1255 return DPERR_INVALIDPARAMS
;
1258 /* Yes...really we should bre returning a lobby 1 object */
1259 *lplpDPL
= (LPDIRECTPLAYLOBBY
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1260 sizeof( IDirectPlayLobby
) );
1264 return DPERR_OUTOFMEMORY
;
1267 (*lplpDPL
)->lpVtbl
= &directPlayLobbyWVT
;
1268 (*lplpDPL
)->ref
= 1;
1270 /* All fields were nulled out by the allocation */
1276 /***************************************************************************
1277 * DirectPlayEnumerateA (DPLAYX.2)
1279 * The pointer to the structure lpContext will be filled with the
1280 * appropriate data for each service offered by the OS. These services are
1281 * not necessarily available on this particular machine but are defined
1282 * as simple service providers under the "Service Providers" registry key.
1283 * This structure is then passed to lpEnumCallback for each of the different
1286 * This API is useful only for applications written using DirectX3 or
1287 * worse. It is superceeded by IDirectPlay3::EnumConnections which also
1288 * gives information on the actual connections.
1290 * defn of a service provider:
1291 * A dynamic-link library used by DirectPlay to communicate over a network.
1292 * The service provider contains all the network-specific code required
1293 * to send and receive messages. Online services and network operators can
1294 * supply service providers to use specialized hardware, protocols, communications
1295 * media, and network resources.
1297 * TODO: Allocate string buffer space from the heap (length from reg)
1298 * Pass real device driver numbers...
1299 * Get the GUID properly...
1301 HRESULT WINAPI
DirectPlayEnumerateA( LPDPENUMDPCALLBACKA lpEnumCallback
,
1306 LPCSTR searchSubKey
= "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
1307 LPSTR guidDataSubKey
= "Guid";
1308 LPSTR majVerDataSubKey
= "dwReserved1";
1309 DWORD dwIndex
, sizeOfSubKeyName
=50;
1310 char subKeyName
[51];
1312 TRACE( dplay
, ": lpEnumCallback=%p lpContext=%p\n", lpEnumCallback
, lpContext
);
1314 if( !lpEnumCallback
|| !*lpEnumCallback
)
1316 return DPERR_INVALIDPARAMS
;
1319 /* Need to loop over the service providers in the registry */
1320 if( RegOpenKeyExA( HKEY_LOCAL_MACHINE
, searchSubKey
,
1321 0, KEY_ENUMERATE_SUB_KEYS
, &hkResult
) != ERROR_SUCCESS
)
1323 /* Hmmm. Does this mean that there are no service providers? */
1324 ERR(dplay
, ": no service providers?\n");
1328 /* Traverse all the service providers we have available */
1330 RegEnumKeyA( hkResult
, dwIndex
, subKeyName
, sizeOfSubKeyName
) !=
1331 ERROR_NO_MORE_ITEMS
;
1334 HKEY hkServiceProvider
;
1335 GUID serviceProviderGUID
;
1336 DWORD returnTypeGUID
, returnTypeReserved1
, sizeOfReturnBuffer
=50;
1337 char returnBuffer
[51];
1338 DWORD majVersionNum
/*, minVersionNum */;
1339 LPWSTR lpWGUIDString
;
1341 TRACE( dplay
, " this time through: %s\n", subKeyName
);
1343 /* Get a handle for this particular service provider */
1344 if( RegOpenKeyExA( hkResult
, subKeyName
, 0, KEY_QUERY_VALUE
,
1345 &hkServiceProvider
) != ERROR_SUCCESS
)
1347 ERR( dplay
, ": what the heck is going on?\n" );
1351 /* Get the GUID, Device major number and device minor number
1352 * from the registry.
1354 if( RegQueryValueExA( hkServiceProvider
, guidDataSubKey
,
1355 NULL
, &returnTypeGUID
, returnBuffer
,
1356 &sizeOfReturnBuffer
) != ERROR_SUCCESS
)
1358 ERR( dplay
, ": missing GUID registry data members\n" );
1362 /* FIXME: Check return types to ensure we're interpreting data right */
1363 lpWGUIDString
= HEAP_strdupAtoW( GetProcessHeap(), 0, returnBuffer
);
1364 CLSIDFromString( (LPCOLESTR
)lpWGUIDString
, &serviceProviderGUID
);
1365 HeapFree( GetProcessHeap(), 0, lpWGUIDString
);
1367 sizeOfReturnBuffer
= 50;
1369 if( RegQueryValueExA( hkServiceProvider
, majVerDataSubKey
,
1370 NULL
, &returnTypeReserved1
, returnBuffer
,
1371 &sizeOfReturnBuffer
) != ERROR_SUCCESS
)
1373 ERR( dplay
, ": missing dwReserved1 registry data members\n") ;
1376 /* FIXME: This couldn't possibly be right...*/
1377 majVersionNum
= GET_DWORD( returnBuffer
);
1379 /* The enumeration will return FALSE if we are not to continue */
1380 if( !lpEnumCallback( &serviceProviderGUID
, subKeyName
,
1381 majVersionNum
, (DWORD
)0, lpContext
) )
1383 WARN( dplay
, "lpEnumCallback returning FALSE\n" );
1392 /***************************************************************************
1393 * DirectPlayEnumerateW (DPLAYX.3)
1396 HRESULT WINAPI
DirectPlayEnumerateW( LPDPENUMDPCALLBACKW lpEnumCallback
, LPVOID lpContext
)
1399 FIXME( dplay
, ":stub\n");
1401 return DPERR_OUTOFMEMORY
;
1405 /***************************************************************************
1406 * DirectPlayCreate (DPLAYX.1) (DPLAY.1)
1409 HRESULT WINAPI DirectPlayCreate
1410 ( LPGUID lpGUID
, LPDIRECTPLAY2
*lplpDP
, IUnknown
*pUnk
)
1413 TRACE(dplay
,"lpGUID=%p lplpDP=%p pUnk=%p\n", lpGUID
,lplpDP
,pUnk
);
1417 /* Hmmm...wonder what this means! */
1418 ERR(dplay
, "What does a NULL here mean?\n" );
1419 return DPERR_OUTOFMEMORY
;
1422 if( IsEqualGUID( &IID_IDirectPlay2A
, lpGUID
) )
1424 *lplpDP
= (LPDIRECTPLAY2A
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1425 sizeof( **lplpDP
) );
1429 return DPERR_OUTOFMEMORY
;
1432 (*lplpDP
)->lpVtbl
= &directPlay2AVT
;
1437 else if( IsEqualGUID( &IID_IDirectPlay2
, lpGUID
) )
1439 *lplpDP
= (LPDIRECTPLAY2
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1440 sizeof( **lplpDP
) );
1444 return DPERR_OUTOFMEMORY
;
1447 (*lplpDP
)->lpVtbl
= &directPlay2WVT
;
1453 /* Unknown interface type */
1454 return DPERR_NOINTERFACE
;
1458 /* Direct Play helper methods */
1460 /* Get a new interface. To be used by QueryInterface. */
1461 static HRESULT directPlay_QueryInterface
1462 ( REFIID riid
, LPVOID
* ppvObj
)
1465 if( IsEqualGUID( &IID_IDirectPlay2
, riid
) )
1467 LPDIRECTPLAY2 lpDP
= (LPDIRECTPLAY2
)*ppvObj
;
1469 lpDP
= (LPDIRECTPLAY2
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1474 return DPERR_OUTOFMEMORY
;
1477 lpDP
->lpVtbl
= &directPlay2WVT
;
1482 else if( IsEqualGUID( &IID_IDirectPlay2A
, riid
) )
1484 LPDIRECTPLAY2A lpDP
= (LPDIRECTPLAY2A
)*ppvObj
;
1486 lpDP
= (LPDIRECTPLAY2A
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1491 return DPERR_OUTOFMEMORY
;
1494 lpDP
->lpVtbl
= &directPlay2AVT
;
1499 else if( IsEqualGUID( &IID_IDirectPlay3
, riid
) )
1501 LPDIRECTPLAY3 lpDP
= (LPDIRECTPLAY3
)*ppvObj
;
1503 lpDP
= (LPDIRECTPLAY3
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1508 return DPERR_OUTOFMEMORY
;
1511 lpDP
->lpVtbl
= &directPlay3WVT
;
1516 else if( IsEqualGUID( &IID_IDirectPlay3A
, riid
) )
1518 LPDIRECTPLAY3A lpDP
= (LPDIRECTPLAY3A
)*ppvObj
;
1520 lpDP
= (LPDIRECTPLAY3A
)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1525 return DPERR_OUTOFMEMORY
;
1528 lpDP
->lpVtbl
= &directPlay3AVT
;
1536 return E_NOINTERFACE
;
1540 /* Direct Play methods */
1541 static HRESULT WINAPI DirectPlay2W_QueryInterface
1542 ( LPDIRECTPLAY2
this, REFIID riid
, LPVOID
* ppvObj
)
1544 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
1546 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1547 IsEqualGUID( &IID_IDirectPlay2
, riid
)
1550 this->lpVtbl
->fnAddRef( this );
1554 return directPlay_QueryInterface( riid
, ppvObj
);
1557 static HRESULT WINAPI DirectPlay2A_QueryInterface
1558 ( LPDIRECTPLAY2A
this, REFIID riid
, LPVOID
* ppvObj
)
1560 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
1562 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1563 IsEqualGUID( &IID_IDirectPlay2A
, riid
)
1566 this->lpVtbl
->fnAddRef( this );
1571 return directPlay_QueryInterface( riid
, ppvObj
);
1574 static HRESULT WINAPI DirectPlay3W_QueryInterface
1575 ( LPDIRECTPLAY3
this, REFIID riid
, LPVOID
* ppvObj
)
1577 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
1579 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1580 IsEqualGUID( &IID_IDirectPlay3
, riid
)
1583 this->lpVtbl
->fnAddRef( this );
1588 return directPlay_QueryInterface( riid
, ppvObj
);
1591 static HRESULT WINAPI DirectPlay3A_QueryInterface
1592 ( LPDIRECTPLAY3A
this, REFIID riid
, LPVOID
* ppvObj
)
1594 TRACE( dplay
, "(%p)->(%p,%p)\n", this, riid
, ppvObj
);
1596 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1597 IsEqualGUID( &IID_IDirectPlay3A
, riid
)
1600 this->lpVtbl
->fnAddRef( this );
1605 return directPlay_QueryInterface( riid
, ppvObj
);
1609 /* Shared between all dplay types */
1610 static ULONG WINAPI DirectPlay3W_AddRef
1611 ( LPDIRECTPLAY3
this )
1614 TRACE( dplay
,"ref count now %lu\n", this->ref
);
1618 static ULONG WINAPI DirectPlay3W_Release
1619 ( LPDIRECTPLAY3
this )
1621 TRACE( dplay
, "ref count decremeneted from %lu\n", this->ref
);
1625 /* Deallocate if this is the last reference to the object */
1628 FIXME( dplay
, "memory leak\n" );
1629 /* Implement memory deallocation */
1631 HeapFree( GetProcessHeap(), 0, this );
1639 static ULONG WINAPI DirectPlay3A_Release
1640 ( LPDIRECTPLAY3A
this )
1642 TRACE( dplay
, "ref count decremeneted from %lu\n", this->ref
);
1646 /* Deallocate if this is the last reference to the object */
1649 FIXME( dplay
, "memory leak\n" );
1650 /* Implement memory deallocation */
1652 HeapFree( GetProcessHeap(), 0, this );
1660 HRESULT WINAPI DirectPlay3A_AddPlayerToGroup
1661 ( LPDIRECTPLAY3A
this, DPID a
, DPID b
)
1663 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
1667 HRESULT WINAPI DirectPlay3W_AddPlayerToGroup
1668 ( LPDIRECTPLAY3
this, DPID a
, DPID b
)
1670 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
1675 HRESULT WINAPI DirectPlay3A_Close
1676 ( LPDIRECTPLAY3A
this )
1678 FIXME( dplay
,"(%p)->(): stub", this );
1682 HRESULT WINAPI DirectPlay3W_Close
1683 ( LPDIRECTPLAY3
this )
1685 FIXME( dplay
,"(%p)->(): stub", this );
1689 HRESULT WINAPI DirectPlay3A_CreateGroup
1690 ( LPDIRECTPLAY3A
this, LPDPID a
, LPDPNAME b
, LPVOID c
, DWORD d
, DWORD e
)
1692 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1696 HRESULT WINAPI DirectPlay3W_CreateGroup
1697 ( LPDIRECTPLAY3
this, LPDPID a
, LPDPNAME b
, LPVOID c
, DWORD d
, DWORD e
)
1699 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1703 HRESULT WINAPI DirectPlay3A_CreatePlayer
1704 ( LPDIRECTPLAY3A
this, LPDPID a
, LPDPNAME b
, HANDLE c
, LPVOID d
, DWORD e
, DWORD f
)
1706 FIXME( dplay
,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
, e
, f
);
1710 HRESULT WINAPI DirectPlay3W_CreatePlayer
1711 ( LPDIRECTPLAY3
this, LPDPID a
, LPDPNAME b
, HANDLE c
, LPVOID d
, DWORD e
, DWORD f
)
1713 FIXME( dplay
,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
, e
, f
);
1717 HRESULT WINAPI DirectPlay3A_DeletePlayerFromGroup
1718 ( LPDIRECTPLAY3A
this, DPID a
, DPID b
)
1720 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
1724 HRESULT WINAPI DirectPlay3W_DeletePlayerFromGroup
1725 ( LPDIRECTPLAY3
this, DPID a
, DPID b
)
1727 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
1731 HRESULT WINAPI DirectPlay3A_DestroyGroup
1732 ( LPDIRECTPLAY3A
this, DPID a
)
1734 FIXME( dplay
,"(%p)->(0x%08lx): stub", this, a
);
1738 HRESULT WINAPI DirectPlay3W_DestroyGroup
1739 ( LPDIRECTPLAY3
this, DPID a
)
1741 FIXME( dplay
,"(%p)->(0x%08lx): stub", this, a
);
1745 HRESULT WINAPI DirectPlay3A_DestroyPlayer
1746 ( LPDIRECTPLAY3A
this, DPID a
)
1748 FIXME( dplay
,"(%p)->(0x%08lx): stub", this, a
);
1752 HRESULT WINAPI DirectPlay3W_DestroyPlayer
1753 ( LPDIRECTPLAY3
this, DPID a
)
1755 FIXME( dplay
,"(%p)->(0x%08lx): stub", this, a
);
1759 HRESULT WINAPI DirectPlay3A_EnumGroupPlayers
1760 ( LPDIRECTPLAY3A
this, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
,
1763 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1767 HRESULT WINAPI DirectPlay3W_EnumGroupPlayers
1768 ( LPDIRECTPLAY3
this, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
,
1771 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1775 HRESULT WINAPI DirectPlay3A_EnumGroups
1776 ( LPDIRECTPLAY3A
this, LPGUID a
, LPDPENUMPLAYERSCALLBACK2 b
, LPVOID c
, DWORD d
)
1778 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1782 HRESULT WINAPI DirectPlay3W_EnumGroups
1783 ( LPDIRECTPLAY3
this, LPGUID a
, LPDPENUMPLAYERSCALLBACK2 b
, LPVOID c
, DWORD d
)
1785 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1789 HRESULT WINAPI DirectPlay3A_EnumPlayers
1790 ( LPDIRECTPLAY3A
this, LPGUID a
, LPDPENUMPLAYERSCALLBACK2 b
, LPVOID c
, DWORD d
)
1792 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1796 HRESULT WINAPI DirectPlay3W_EnumPlayers
1797 ( LPDIRECTPLAY3
this, LPGUID a
, LPDPENUMPLAYERSCALLBACK2 b
, LPVOID c
, DWORD d
)
1799 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1803 HRESULT WINAPI DirectPlay3A_EnumSessions
1804 ( LPDIRECTPLAY3A
this, LPDPSESSIONDESC2 a
, DWORD b
, LPDPENUMSESSIONSCALLBACK2 c
,
1807 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1811 HRESULT WINAPI DirectPlay3W_EnumSessions
1812 ( LPDIRECTPLAY3
this, LPDPSESSIONDESC2 a
, DWORD b
, LPDPENUMSESSIONSCALLBACK2 c
,
1815 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1819 HRESULT WINAPI DirectPlay3A_GetCaps
1820 ( LPDIRECTPLAY3A
this, LPDPCAPS a
, DWORD b
)
1822 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
1826 HRESULT WINAPI DirectPlay3W_GetCaps
1827 ( LPDIRECTPLAY3
this, LPDPCAPS a
, DWORD b
)
1829 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
1833 HRESULT WINAPI DirectPlay3A_GetGroupData
1834 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
, DWORD d
)
1836 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1840 HRESULT WINAPI DirectPlay3W_GetGroupData
1841 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
, DWORD d
)
1843 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1847 HRESULT WINAPI DirectPlay3A_GetGroupName
1848 ( LPDIRECTPLAY3A
this, DPID a
, LPVOID b
, LPDWORD c
)
1850 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", this, a
, b
, c
);
1854 HRESULT WINAPI DirectPlay3W_GetGroupName
1855 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
)
1857 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", this, a
, b
, c
);
1861 HRESULT WINAPI DirectPlay3A_GetMessageCount
1862 ( LPDIRECTPLAY3A
this, DPID a
, LPDWORD b
)
1864 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
1868 HRESULT WINAPI DirectPlay3W_GetMessageCount
1869 ( LPDIRECTPLAY3
this, DPID a
, LPDWORD b
)
1871 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
1875 HRESULT WINAPI DirectPlay3A_GetPlayerAddress
1876 ( LPDIRECTPLAY3A
this, DPID a
, LPVOID b
, LPDWORD c
)
1878 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", this, a
, b
, c
);
1882 HRESULT WINAPI DirectPlay3W_GetPlayerAddress
1883 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
)
1885 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", this, a
, b
, c
);
1889 HRESULT WINAPI DirectPlay3A_GetPlayerCaps
1890 ( LPDIRECTPLAY3A
this, DPID a
, LPDPCAPS b
, DWORD c
)
1892 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
);
1896 HRESULT WINAPI DirectPlay3W_GetPlayerCaps
1897 ( LPDIRECTPLAY3
this, DPID a
, LPDPCAPS b
, DWORD c
)
1899 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
);
1903 HRESULT WINAPI DirectPlay3A_GetPlayerData
1904 ( LPDIRECTPLAY3A
this, DPID a
, LPVOID b
, LPDWORD c
, DWORD d
)
1906 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1910 HRESULT WINAPI DirectPlay3W_GetPlayerData
1911 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
, DWORD d
)
1913 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
1917 HRESULT WINAPI DirectPlay3A_GetPlayerName
1918 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
)
1920 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", this, a
, b
, c
);
1924 HRESULT WINAPI DirectPlay3W_GetPlayerName
1925 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, LPDWORD c
)
1927 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", this, a
, b
, c
);
1931 HRESULT WINAPI DirectPlay3A_GetSessionDesc
1932 ( LPDIRECTPLAY3A
this, LPVOID a
, LPDWORD b
)
1934 FIXME( dplay
,"(%p)->(%p,%p): stub", this, a
, b
);
1938 HRESULT WINAPI DirectPlay3W_GetSessionDesc
1939 ( LPDIRECTPLAY3
this, LPVOID a
, LPDWORD b
)
1941 FIXME( dplay
,"(%p)->(%p,%p): stub", this, a
, b
);
1945 HRESULT WINAPI DirectPlay3A_Initialize
1946 ( LPDIRECTPLAY3A
this, LPGUID a
)
1948 FIXME( dplay
,"(%p)->(%p): stub", this, a
);
1952 HRESULT WINAPI DirectPlay3W_Initialize
1953 ( LPDIRECTPLAY3
this, LPGUID a
)
1955 FIXME( dplay
,"(%p)->(%p): stub", this, a
);
1960 HRESULT WINAPI DirectPlay3A_Open
1961 ( LPDIRECTPLAY3A
this, LPDPSESSIONDESC2 a
, DWORD b
)
1963 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
1967 HRESULT WINAPI DirectPlay3W_Open
1968 ( LPDIRECTPLAY3
this, LPDPSESSIONDESC2 a
, DWORD b
)
1970 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
1974 HRESULT WINAPI DirectPlay3A_Receive
1975 ( LPDIRECTPLAY3A
this, LPDPID a
, LPDPID b
, DWORD c
, LPVOID d
, LPDWORD e
)
1977 FIXME( dplay
,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
, e
);
1981 HRESULT WINAPI DirectPlay3W_Receive
1982 ( LPDIRECTPLAY3
this, LPDPID a
, LPDPID b
, DWORD c
, LPVOID d
, LPDWORD e
)
1984 FIXME( dplay
,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
, e
);
1988 HRESULT WINAPI DirectPlay3A_Send
1989 ( LPDIRECTPLAY3A
this, DPID a
, DPID b
, DWORD c
, LPVOID d
, DWORD e
)
1991 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
1995 HRESULT WINAPI DirectPlay3W_Send
1996 ( LPDIRECTPLAY3
this, DPID a
, DPID b
, DWORD c
, LPVOID d
, DWORD e
)
1998 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
2002 HRESULT WINAPI DirectPlay3A_SetGroupData
2003 ( LPDIRECTPLAY3A
this, DPID a
, LPVOID b
, DWORD c
, DWORD d
)
2005 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
);
2009 HRESULT WINAPI DirectPlay3W_SetGroupData
2010 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, DWORD c
, DWORD d
)
2012 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
);
2016 HRESULT WINAPI DirectPlay3A_SetGroupName
2017 ( LPDIRECTPLAY3A
this, DPID a
, LPDPNAME b
, DWORD c
)
2019 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
);
2023 HRESULT WINAPI DirectPlay3W_SetGroupName
2024 ( LPDIRECTPLAY3
this, DPID a
, LPDPNAME b
, DWORD c
)
2026 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
);
2030 HRESULT WINAPI DirectPlay3A_SetPlayerData
2031 ( LPDIRECTPLAY3A
this, DPID a
, LPVOID b
, DWORD c
, DWORD d
)
2033 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
);
2037 HRESULT WINAPI DirectPlay3W_SetPlayerData
2038 ( LPDIRECTPLAY3
this, DPID a
, LPVOID b
, DWORD c
, DWORD d
)
2040 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
);
2044 HRESULT WINAPI DirectPlay3A_SetPlayerName
2045 ( LPDIRECTPLAY3A
this, DPID a
, LPDPNAME b
, DWORD c
)
2047 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
);
2051 HRESULT WINAPI DirectPlay3W_SetPlayerName
2052 ( LPDIRECTPLAY3
this, DPID a
, LPDPNAME b
, DWORD c
)
2054 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a
, b
, c
);
2058 HRESULT WINAPI DirectPlay3A_SetSessionDesc
2059 ( LPDIRECTPLAY3A
this, LPDPSESSIONDESC2 a
, DWORD b
)
2061 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
2065 HRESULT WINAPI DirectPlay3W_SetSessionDesc
2066 ( LPDIRECTPLAY3
this, LPDPSESSIONDESC2 a
, DWORD b
)
2068 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
2072 HRESULT WINAPI DirectPlay3A_AddGroupToGroup
2073 ( LPDIRECTPLAY3A
this, DPID a
, DPID b
)
2075 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
2079 HRESULT WINAPI DirectPlay3W_AddGroupToGroup
2080 ( LPDIRECTPLAY3
this, DPID a
, DPID b
)
2082 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
2086 HRESULT WINAPI DirectPlay3A_CreateGroupInGroup
2087 ( LPDIRECTPLAY3A
this, DPID a
, LPDPID b
, LPDPNAME c
, LPVOID d
, DWORD e
, DWORD f
)
2089 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
, e
, f
);
2093 HRESULT WINAPI DirectPlay3W_CreateGroupInGroup
2094 ( LPDIRECTPLAY3
this, DPID a
, LPDPID b
, LPDPNAME c
, LPVOID d
, DWORD e
, DWORD f
)
2096 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", this, a
, b
, c
, d
, e
, f
);
2100 HRESULT WINAPI DirectPlay3A_DeleteGroupFromGroup
2101 ( LPDIRECTPLAY3A
this, DPID a
, DPID b
)
2103 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
2107 HRESULT WINAPI DirectPlay3W_DeleteGroupFromGroup
2108 ( LPDIRECTPLAY3
this, DPID a
, DPID b
)
2110 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
2114 HRESULT WINAPI DirectPlay3A_EnumConnections
2115 ( LPDIRECTPLAY3A
this, LPCGUID a
, LPDPENUMCONNECTIONSCALLBACK b
, LPVOID c
, DWORD d
)
2117 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
2121 HRESULT WINAPI DirectPlay3W_EnumConnections
2122 ( LPDIRECTPLAY3
this, LPCGUID a
, LPDPENUMCONNECTIONSCALLBACK b
, LPVOID c
, DWORD d
)
2124 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
);
2128 HRESULT WINAPI DirectPlay3A_EnumGroupsInGroup
2129 ( LPDIRECTPLAY3A
this, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
, LPVOID d
, DWORD e
)
2131 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
2135 HRESULT WINAPI DirectPlay3W_EnumGroupsInGroup
2136 ( LPDIRECTPLAY3
this, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
, LPVOID d
, DWORD e
)
2138 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a
, b
, c
, d
, e
);
2142 HRESULT WINAPI DirectPlay3A_GetGroupConnectionSettings
2143 ( LPDIRECTPLAY3A
this, DWORD a
, DPID b
, LPVOID c
, LPDWORD d
)
2145 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
);
2149 HRESULT WINAPI DirectPlay3W_GetGroupConnectionSettings
2150 ( LPDIRECTPLAY3
this, DWORD a
, DPID b
, LPVOID c
, LPDWORD d
)
2152 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
);
2156 HRESULT WINAPI DirectPlay3A_InitializeConnection
2157 ( LPDIRECTPLAY3A
this, LPVOID a
, DWORD b
)
2159 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
2163 HRESULT WINAPI DirectPlay3W_InitializeConnection
2164 ( LPDIRECTPLAY3
this, LPVOID a
, DWORD b
)
2166 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", this, a
, b
);
2170 HRESULT WINAPI DirectPlay3A_SecureOpen
2171 ( LPDIRECTPLAY3A
this, LPCDPSESSIONDESC2 a
, DWORD b
, LPCDPSECURITYDESC c
, LPCDPCREDENTIALS d
)
2173 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
);
2177 HRESULT WINAPI DirectPlay3W_SecureOpen
2178 ( LPDIRECTPLAY3
this, LPCDPSESSIONDESC2 a
, DWORD b
, LPCDPSECURITYDESC c
, LPCDPCREDENTIALS d
)
2180 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
);
2184 HRESULT WINAPI DirectPlay3A_SendChatMessage
2185 ( LPDIRECTPLAY3A
this, DPID a
, DPID b
, DWORD c
, LPDPCHAT d
)
2187 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", this, a
, b
, c
, d
);
2191 HRESULT WINAPI DirectPlay3W_SendChatMessage
2192 ( LPDIRECTPLAY3
this, DPID a
, DPID b
, DWORD c
, LPDPCHAT d
)
2194 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", this, a
, b
, c
, d
);
2198 HRESULT WINAPI DirectPlay3A_SetGroupConnectionSettings
2199 ( LPDIRECTPLAY3A
this, DWORD a
, DPID b
, LPDPLCONNECTION c
)
2201 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p): stub", this, a
, b
, c
);
2205 HRESULT WINAPI DirectPlay3W_SetGroupConnectionSettings
2206 ( LPDIRECTPLAY3
this, DWORD a
, DPID b
, LPDPLCONNECTION c
)
2208 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p): stub", this, a
, b
, c
);
2212 HRESULT WINAPI DirectPlay3A_StartSession
2213 ( LPDIRECTPLAY3A
this, DWORD a
, DPID b
)
2215 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
2219 HRESULT WINAPI DirectPlay3W_StartSession
2220 ( LPDIRECTPLAY3
this, DWORD a
, DPID b
)
2222 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", this, a
, b
);
2226 HRESULT WINAPI DirectPlay3A_GetGroupFlags
2227 ( LPDIRECTPLAY3A
this, DPID a
, LPDWORD b
)
2229 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
2233 HRESULT WINAPI DirectPlay3W_GetGroupFlags
2234 ( LPDIRECTPLAY3
this, DPID a
, LPDWORD b
)
2236 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
2240 HRESULT WINAPI DirectPlay3A_GetGroupParent
2241 ( LPDIRECTPLAY3A
this, DPID a
, LPDPID b
)
2243 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
2247 HRESULT WINAPI DirectPlay3W_GetGroupParent
2248 ( LPDIRECTPLAY3
this, DPID a
, LPDPID b
)
2250 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
2254 HRESULT WINAPI DirectPlay3A_GetPlayerAccount
2255 ( LPDIRECTPLAY3A
this, DPID a
, DWORD b
, LPVOID c
, LPDWORD d
)
2257 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
);
2261 HRESULT WINAPI DirectPlay3W_GetPlayerAccount
2262 ( LPDIRECTPLAY3
this, DPID a
, DWORD b
, LPVOID c
, LPDWORD d
)
2264 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a
, b
, c
, d
);
2268 HRESULT WINAPI DirectPlay3A_GetPlayerFlags
2269 ( LPDIRECTPLAY3A
this, DPID a
, LPDWORD b
)
2271 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
2275 HRESULT WINAPI DirectPlay3W_GetPlayerFlags
2276 ( LPDIRECTPLAY3
this, DPID a
, LPDWORD b
)
2278 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", this, a
, b
);
2282 static struct tagLPDIRECTPLAY2_VTABLE directPlay2WVT
= {
2283 DirectPlay2W_QueryInterface
,
2284 (void*)DirectPlay3W_AddRef
,
2285 (void*)DirectPlay3W_Release
,
2286 (void*)DirectPlay3W_AddPlayerToGroup
,
2287 (void*)DirectPlay3W_Close
,
2288 (void*)DirectPlay3W_CreateGroup
,
2289 (void*)DirectPlay3W_CreatePlayer
,
2290 (void*)DirectPlay3W_DeletePlayerFromGroup
,
2291 (void*)DirectPlay3W_DestroyGroup
,
2292 (void*)DirectPlay3W_DestroyPlayer
,
2293 (void*)DirectPlay3W_EnumGroupPlayers
,
2294 (void*)DirectPlay3W_EnumGroups
,
2295 (void*)DirectPlay3W_EnumPlayers
,
2296 (void*)DirectPlay3W_EnumSessions
,
2297 (void*)DirectPlay3W_GetCaps
,
2298 (void*)DirectPlay3W_GetGroupData
,
2299 (void*)DirectPlay3W_GetGroupName
,
2300 (void*)DirectPlay3W_GetMessageCount
,
2301 (void*)DirectPlay3W_GetPlayerAddress
,
2302 (void*)DirectPlay3W_GetPlayerCaps
,
2303 (void*)DirectPlay3W_GetPlayerData
,
2304 (void*)DirectPlay3W_GetPlayerName
,
2305 (void*)DirectPlay3W_GetSessionDesc
,
2306 (void*)DirectPlay3W_Initialize
,
2307 (void*)DirectPlay3W_Open
,
2308 (void*)DirectPlay3W_Receive
,
2309 (void*)DirectPlay3W_Send
,
2310 (void*)DirectPlay3W_SetGroupData
,
2311 (void*)DirectPlay3W_SetGroupName
,
2312 (void*)DirectPlay3W_SetPlayerData
,
2313 (void*)DirectPlay3W_SetPlayerName
,
2314 (void*)DirectPlay3W_SetSessionDesc
2317 static struct tagLPDIRECTPLAY2_VTABLE directPlay2AVT
= {
2318 DirectPlay2A_QueryInterface
,
2319 (void*)DirectPlay3W_AddRef
,
2320 (void*)DirectPlay3A_Release
,
2321 (void*)DirectPlay3A_AddPlayerToGroup
,
2322 (void*)DirectPlay3A_Close
,
2323 (void*)DirectPlay3A_CreateGroup
,
2324 (void*)DirectPlay3A_CreatePlayer
,
2325 (void*)DirectPlay3A_DeletePlayerFromGroup
,
2326 (void*)DirectPlay3A_DestroyGroup
,
2327 (void*)DirectPlay3A_DestroyPlayer
,
2328 (void*)DirectPlay3A_EnumGroupPlayers
,
2329 (void*)DirectPlay3A_EnumGroups
,
2330 (void*)DirectPlay3A_EnumPlayers
,
2331 (void*)DirectPlay3A_EnumSessions
,
2332 (void*)DirectPlay3A_GetCaps
,
2333 (void*)DirectPlay3A_GetGroupData
,
2334 (void*)DirectPlay3A_GetGroupName
,
2335 (void*)DirectPlay3A_GetMessageCount
,
2336 (void*)DirectPlay3A_GetPlayerAddress
,
2337 (void*)DirectPlay3A_GetPlayerCaps
,
2338 (void*)DirectPlay3A_GetPlayerData
,
2339 (void*)DirectPlay3A_GetPlayerName
,
2340 (void*)DirectPlay3A_GetSessionDesc
,
2341 (void*)DirectPlay3A_Initialize
,
2342 (void*)DirectPlay3A_Open
,
2343 (void*)DirectPlay3A_Receive
,
2344 (void*)DirectPlay3A_Send
,
2345 (void*)DirectPlay3A_SetGroupData
,
2346 (void*)DirectPlay3A_SetGroupName
,
2347 (void*)DirectPlay3A_SetPlayerData
,
2348 (void*)DirectPlay3A_SetPlayerName
,
2349 (void*)DirectPlay3A_SetSessionDesc
2352 static struct tagLPDIRECTPLAY3_VTABLE directPlay3AVT
= {
2353 DirectPlay3A_QueryInterface
,
2354 (void*)DirectPlay3W_AddRef
,
2355 DirectPlay3A_Release
,
2356 DirectPlay3A_AddPlayerToGroup
,
2358 DirectPlay3A_CreateGroup
,
2359 DirectPlay3A_CreatePlayer
,
2360 DirectPlay3A_DeletePlayerFromGroup
,
2361 DirectPlay3A_DestroyGroup
,
2362 DirectPlay3A_DestroyPlayer
,
2363 DirectPlay3A_EnumGroupPlayers
,
2364 DirectPlay3A_EnumGroups
,
2365 DirectPlay3A_EnumPlayers
,
2366 DirectPlay3A_EnumSessions
,
2367 DirectPlay3A_GetCaps
,
2368 DirectPlay3A_GetGroupData
,
2369 DirectPlay3A_GetGroupName
,
2370 DirectPlay3A_GetMessageCount
,
2371 DirectPlay3A_GetPlayerAddress
,
2372 DirectPlay3A_GetPlayerCaps
,
2373 DirectPlay3A_GetPlayerData
,
2374 DirectPlay3A_GetPlayerName
,
2375 DirectPlay3A_GetSessionDesc
,
2376 DirectPlay3A_Initialize
,
2378 DirectPlay3A_Receive
,
2380 DirectPlay3A_SetGroupData
,
2381 DirectPlay3A_SetGroupName
,
2382 DirectPlay3A_SetPlayerData
,
2383 DirectPlay3A_SetPlayerName
,
2384 DirectPlay3A_SetSessionDesc
,
2386 DirectPlay3A_AddGroupToGroup
,
2387 DirectPlay3A_CreateGroupInGroup
,
2388 DirectPlay3A_DeleteGroupFromGroup
,
2389 DirectPlay3A_EnumConnections
,
2390 DirectPlay3A_EnumGroupsInGroup
,
2391 DirectPlay3A_GetGroupConnectionSettings
,
2392 DirectPlay3A_InitializeConnection
,
2393 DirectPlay3A_SecureOpen
,
2394 DirectPlay3A_SendChatMessage
,
2395 DirectPlay3A_SetGroupConnectionSettings
,
2396 DirectPlay3A_StartSession
,
2397 DirectPlay3A_GetGroupFlags
,
2398 DirectPlay3A_GetGroupParent
,
2399 DirectPlay3A_GetPlayerAccount
,
2400 DirectPlay3A_GetPlayerFlags
2403 static struct tagLPDIRECTPLAY3_VTABLE directPlay3WVT
= {
2404 DirectPlay3W_QueryInterface
,
2405 DirectPlay3W_AddRef
,
2406 DirectPlay3W_Release
,
2407 DirectPlay3W_AddPlayerToGroup
,
2409 DirectPlay3W_CreateGroup
,
2410 DirectPlay3W_CreatePlayer
,
2411 DirectPlay3W_DeletePlayerFromGroup
,
2412 DirectPlay3W_DestroyGroup
,
2413 DirectPlay3W_DestroyPlayer
,
2414 DirectPlay3W_EnumGroupPlayers
,
2415 DirectPlay3W_EnumGroups
,
2416 DirectPlay3W_EnumPlayers
,
2417 DirectPlay3W_EnumSessions
,
2418 DirectPlay3W_GetCaps
,
2419 DirectPlay3W_GetGroupData
,
2420 DirectPlay3W_GetGroupName
,
2421 DirectPlay3W_GetMessageCount
,
2422 DirectPlay3W_GetPlayerAddress
,
2423 DirectPlay3W_GetPlayerCaps
,
2424 DirectPlay3W_GetPlayerData
,
2425 DirectPlay3W_GetPlayerName
,
2426 DirectPlay3W_GetSessionDesc
,
2427 DirectPlay3W_Initialize
,
2429 DirectPlay3W_Receive
,
2431 DirectPlay3W_SetGroupData
,
2432 DirectPlay3W_SetGroupName
,
2433 DirectPlay3W_SetPlayerData
,
2434 DirectPlay3W_SetPlayerName
,
2435 DirectPlay3W_SetSessionDesc
,
2437 DirectPlay3W_AddGroupToGroup
,
2438 DirectPlay3W_CreateGroupInGroup
,
2439 DirectPlay3W_DeleteGroupFromGroup
,
2440 DirectPlay3W_EnumConnections
,
2441 DirectPlay3W_EnumGroupsInGroup
,
2442 DirectPlay3W_GetGroupConnectionSettings
,
2443 DirectPlay3W_InitializeConnection
,
2444 DirectPlay3W_SecureOpen
,
2445 DirectPlay3W_SendChatMessage
,
2446 DirectPlay3W_SetGroupConnectionSettings
,
2447 DirectPlay3W_StartSession
,
2448 DirectPlay3W_GetGroupFlags
,
2449 DirectPlay3W_GetGroupParent
,
2450 DirectPlay3W_GetPlayerAccount
,
2451 DirectPlay3W_GetPlayerFlags