1 /* Direct Play 3 and Direct Play Lobby 2 Implementation
3 * Copyright 1998,1999 - Peter Hunnisett
5 * <presently under construction - contact hunnise@nortelnetworks.com>
17 struct IDirectPlayLobby {
18 LPDIRECTPLAYLOBBY_VTABLE lpVtbl;
21 DPSESSIONDESC2 sessionDesc;
28 struct IDirectPlayLobby2 {
29 LPDIRECTPLAYLOBBY2_VTABLE lpVtbl;
32 DPSESSIONDESC2 lpSessionDesc;
40 /* Forward declarations of virtual tables */
41 static DIRECTPLAYLOBBY_VTABLE directPlayLobbyAVT;
42 static DIRECTPLAYLOBBY_VTABLE directPlayLobbyWVT;
43 static DIRECTPLAYLOBBY2_VTABLE directPlayLobby2AVT;
44 static DIRECTPLAYLOBBY2_VTABLE directPlayLobby2WVT;
47 static DIRECTPLAY2_VTABLE directPlay2WVT;
48 static DIRECTPLAY2_VTABLE directPlay2AVT;
49 static DIRECTPLAY3_VTABLE directPlay3WVT;
50 static DIRECTPLAY3_VTABLE directPlay3AVT;
56 LPDIRECTPLAY2_VTABLE lpVtbl;
61 LPDIRECTPLAY3_VTABLE lpVtbl;
65 /* Routine called when starting up the server thread */
66 DWORD DPLobby_Spawn_Server( LPVOID startData )
68 DPSESSIONDESC2* lpSession = (DPSESSIONDESC2*) startData;
69 DWORD sessionDwFlags = lpSession->dwFlags;
71 TRACE( dplay, "spawing thread for lpConn=%p dwFlags=%08lx\n", lpSession, sessionDwFlags );
72 FIXME( dplay, "thread needs something to do\n" );
77 /* Check out the connection flags to determine what to do. Ensure we have
78 no leftover bits in this structure */
79 if( sessionDwFlags & DPSESSION_CLIENTSERVER )
81 /* This indicates that the application which is requesting the creation
82 * of this session is going to be the server (application/player)
84 if( sessionDwFlags & DPSESSION_SECURESERVER )
86 sessionDwFlags &= ~DPSESSION_SECURESERVER;
88 sessionDwFlags &= ~DPSESSION_CLIENTSERVER;
91 if( sessionDwFlags & DPSESSION_JOINDISABLED )
93 sessionDwFlags &= ~DPSESSION_JOINDISABLED;
96 if( sessionDwFlags & DPSESSION_KEEPALIVE )
98 sessionDwFlags &= ~DPSESSION_KEEPALIVE;
101 if( sessionDwFlags & DPSESSION_MIGRATEHOST )
103 sessionDwFlags &= ~DPSESSION_MIGRATEHOST;
106 if( sessionDwFlags & DPSESSION_MULTICASTSERVER )
108 sessionDwFlags &= ~DPSESSION_MULTICASTSERVER;
111 if( sessionDwFlags & DPSESSION_NEWPLAYERSDISABLED )
113 sessionDwFlags &= ~DPSESSION_NEWPLAYERSDISABLED;
116 if( sessionDwFlags & DPSESSION_NODATAMESSAGES )
118 sessionDwFlags &= ~DPSESSION_NODATAMESSAGES;
121 if( sessionDwFlags & DPSESSION_NOMESSAGEID )
123 sessionDwFlags &= ~DPSESSION_NOMESSAGEID;
126 if( sessionDwFlags & DPSESSION_PASSWORDREQUIRED )
128 sessionDwFlags &= ~DPSESSION_PASSWORDREQUIRED;
138 /*********************************************************
140 * Direct Play and Direct Play Lobby Interface Implementation
142 *********************************************************/
144 /* The COM interface for upversioning an interface
145 * We've been given a GUID (riid) and we need to replace the present
146 * interface with that of the requested interface.
148 * Snip from some Microsoft document:
149 * There are four requirements for implementations of QueryInterface (In these
150 * cases, "must succeed" means "must succeed barring catastrophic failure."):
152 * * The set of interfaces accessible on an object through
153 * IUnknown::QueryInterface must be static, not dynamic. This means that
154 * if a call to QueryInterface for a pointer to a specified interface
155 * succeeds the first time, it must succeed again, and if it fails the
156 * first time, it must fail on all subsequent queries.
157 * * It must be symmetric ~W if a client holds a pointer to an interface on
158 * an object, and queries for that interface, the call must succeed.
159 * * It must be reflexive ~W if a client holding a pointer to one interface
160 * queries successfully for another, a query through the obtained pointer
161 * for the first interface must succeed.
162 * * It must be transitive ~W if a client holding a pointer to one interface
163 * queries successfully for a second, and through that pointer queries
164 * successfully for a third interface, a query for the first interface
165 * through the pointer for the third interface must succeed.
167 * As you can see, this interface doesn't qualify but will most likely
168 * be good enough for the time being.
171 /* Helper function for DirectPlayLobby QueryInterface */
172 static HRESULT directPlayLobby_QueryInterface
173 ( REFIID riid, LPVOID* ppvObj )
176 if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
178 LPDIRECTPLAYLOBBY lpDpL = (LPDIRECTPLAYLOBBY)(*ppvObj);
180 lpDpL = (LPDIRECTPLAYLOBBY)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
185 return E_NOINTERFACE;
188 lpDpL->lpVtbl = &directPlayLobbyWVT;
193 else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
195 LPDIRECTPLAYLOBBYA lpDpL = (LPDIRECTPLAYLOBBYA)(*ppvObj);
197 lpDpL = (LPDIRECTPLAYLOBBYA)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
202 return E_NOINTERFACE;
205 lpDpL->lpVtbl = &directPlayLobbyAVT;
210 else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
212 LPDIRECTPLAYLOBBY2 lpDpL = (LPDIRECTPLAYLOBBY2)(*ppvObj);
214 lpDpL = (LPDIRECTPLAYLOBBY2)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
219 return E_NOINTERFACE;
222 lpDpL->lpVtbl = &directPlayLobby2WVT;
227 else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
229 LPDIRECTPLAYLOBBY2A lpDpL = (LPDIRECTPLAYLOBBY2A)(*ppvObj);
231 lpDpL = (LPDIRECTPLAYLOBBY2)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
236 return E_NOINTERFACE;
239 lpDpL->lpVtbl = &directPlayLobby2AVT;
245 /* Unknown interface */
247 return E_NOINTERFACE;
249 static HRESULT WINAPI IDirectPlayLobbyA_QueryInterface
250 ( LPDIRECTPLAYLOBBYA this,
254 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
256 if( IsEqualGUID( &IID_IUnknown, riid ) ||
257 IsEqualGUID( &IID_IDirectPlayLobbyA, riid )
260 this->lpVtbl->fnAddRef( this );
265 return directPlayLobby_QueryInterface( riid, ppvObj );
269 static HRESULT WINAPI IDirectPlayLobbyW_QueryInterface
270 ( LPDIRECTPLAYLOBBY this,
274 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
276 if( IsEqualGUID( &IID_IUnknown, riid ) ||
277 IsEqualGUID( &IID_IDirectPlayLobby, riid )
280 this->lpVtbl->fnAddRef( this );
285 return directPlayLobby_QueryInterface( riid, ppvObj );
289 static HRESULT WINAPI IDirectPlayLobby2A_QueryInterface
290 ( LPDIRECTPLAYLOBBY2A this,
294 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
296 /* Compare riids. We know this object is a direct play lobby 2A object.
297 If we are asking about the same type of interface we're fine.
299 if( IsEqualGUID( &IID_IUnknown, riid ) ||
300 IsEqualGUID( &IID_IDirectPlayLobby2A, riid )
303 this->lpVtbl->fnAddRef( this );
307 return directPlayLobby_QueryInterface( riid, ppvObj );
310 static HRESULT WINAPI IDirectPlayLobby2W_QueryInterface
311 ( LPDIRECTPLAYLOBBY2 this,
316 /* Compare riids. We know this object is a direct play lobby 2 object.
317 If we are asking about the same type of interface we're fine.
319 if( IsEqualGUID( &IID_IUnknown, riid ) ||
320 IsEqualGUID( &IID_IDirectPlayLobby2, riid )
323 this->lpVtbl->fnAddRef( this );
328 return directPlayLobby_QueryInterface( riid, ppvObj );
333 * Simple procedure. Just increment the reference count to this
334 * structure and return the new reference count.
336 static ULONG WINAPI IDirectPlayLobby2A_AddRef
337 ( LPDIRECTPLAYLOBBY2A this )
340 TRACE( dplay,"ref count now %lu\n", this->ref );
344 static ULONG WINAPI IDirectPlayLobby2W_AddRef
345 ( LPDIRECTPLAYLOBBY2 this )
347 return IDirectPlayLobby2A_AddRef( (LPDIRECTPLAYLOBBY2) this );
352 * Simple COM procedure. Decrease the reference count to this object.
353 * If the object no longer has any reference counts, free up the associated
356 static ULONG WINAPI IDirectPlayLobby2A_Release
357 ( LPDIRECTPLAYLOBBY2A this )
359 TRACE( dplay, "ref count decremeneted from %lu\n", this->ref );
363 /* Deallocate if this is the last reference to the object */
366 FIXME( dplay, "memory leak\n" );
367 /* Implement memory deallocation */
369 HeapFree( GetProcessHeap(), 0, this );
377 static ULONG WINAPI IDirectPlayLobby2W_Release
378 ( LPDIRECTPLAYLOBBY2 this )
380 return IDirectPlayLobby2A_Release( (LPDIRECTPLAYLOBBY2A) this );
384 /********************************************************************
386 * Connects an application to the session specified by the DPLCONNECTION
387 * structure currently stored with the DirectPlayLobby object.
389 * Returns a IDirectPlay interface.
392 static HRESULT WINAPI IDirectPlayLobby2A_Connect
393 ( LPDIRECTPLAYLOBBY2A this,
395 LPDIRECTPLAY2* lplpDP,
398 FIXME( dplay, ": dwFlags=%08lx %p %p stub\n", dwFlags, lplpDP, pUnk );
399 return DPERR_OUTOFMEMORY;
402 static HRESULT WINAPI IDirectPlayLobby2W_Connect
403 ( LPDIRECTPLAYLOBBY2 this,
405 LPDIRECTPLAY2* lplpDP,
408 LPDIRECTPLAY2* directPlay2W;
411 FIXME( dplay, "(%p)->(%08lx,%p,%p): stub\n", this, dwFlags, lplpDP, pUnk );
415 return DPERR_INVALIDPARAMS;
418 if( ( createRC = DirectPlayCreate( (LPGUID)&IID_IDirectPlayLobby2, lplpDP, pUnk ) ) != DP_OK )
420 ERR( dplay, "error creating Direct Play 2W interface. Return Code = %ld.\n", createRC );
424 /* This should invoke IDirectPlay3::InitializeConnection IDirectPlay3::Open */
425 directPlay2W = lplpDP;
431 /* All the stuff below this is WRONG! */
432 if( this->lpSession->dwFlags == DPLCONNECTION_CREATESESSION )
436 /* Spawn a thread to deal with all of this and to handle the incomming requests */
437 threadIdSink = CreateThread( NULL, 0, &DPLobby_Spawn_Server,
438 (LPVOID)this->lpSession->lpConn->lpSessionDesc, 0, &threadIdSink );
441 else if ( this->lpSession->dwFlags == DPLCONNECTION_JOINSESSION )
443 /* Let's search for a matching session */
444 FIXME( dplay, "joining session not yet supported.\n");
445 return DPERR_OUTOFMEMORY;
447 else /* Unknown type of connection request */
449 ERR( dplay, ": Unknown connection request lpConn->dwFlags=%08lx\n",
452 return DPERR_OUTOFMEMORY;
455 /* This does the work of the following methods...
456 IDirectPlay3::InitializeConnection,
457 IDirectPlay3::EnumSessions,
468 /********************************************************************
470 * Creates a DirectPlay Address, given a service provider-specific network
472 * Returns an address contains the globally unique identifier
473 * (GUID) of the service provider and data that the service provider can
474 * interpret as a network address.
477 static HRESULT WINAPI IDirectPlayLobby2A_CreateAddress
478 ( LPDIRECTPLAYLOBBY2A this,
480 REFGUID guidDataType,
484 LPDWORD lpdwAddressSize )
486 FIXME( dplay, ":stub\n");
487 return DPERR_OUTOFMEMORY;
490 static HRESULT WINAPI IDirectPlayLobby2W_CreateAddress
491 ( LPDIRECTPLAYLOBBY2 this,
493 REFGUID guidDataType,
497 LPDWORD lpdwAddressSize )
499 FIXME( dplay, ":stub\n");
500 return DPERR_OUTOFMEMORY;
504 /********************************************************************
506 * Parses out chunks from the DirectPlay Address buffer by calling the
507 * given callback function, with lpContext, for each of the chunks.
510 static HRESULT WINAPI IDirectPlayLobby2A_EnumAddress
511 ( LPDIRECTPLAYLOBBY2A this,
512 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
517 FIXME( dplay, ":stub\n");
518 return DPERR_OUTOFMEMORY;
521 static HRESULT WINAPI IDirectPlayLobby2W_EnumAddress
522 ( LPDIRECTPLAYLOBBY2 this,
523 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
528 FIXME( dplay, ":stub\n");
529 return DPERR_OUTOFMEMORY;
532 /********************************************************************
534 * Enumerates all the address types that a given service provider needs to
535 * build the DirectPlay Address.
538 static HRESULT WINAPI IDirectPlayLobbyA_EnumAddressTypes
539 ( LPDIRECTPLAYLOBBYA this,
540 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
545 FIXME( dplay, ":stub\n");
546 return DPERR_OUTOFMEMORY;
549 static HRESULT WINAPI IDirectPlayLobby2A_EnumAddressTypes
550 ( LPDIRECTPLAYLOBBY2A this,
551 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
556 return IDirectPlayLobbyA_EnumAddressTypes( (LPDIRECTPLAYLOBBYA)this, lpEnumAddressTypeCallback,
557 guidSP, lpContext, dwFlags );
560 static HRESULT WINAPI IDirectPlayLobby2W_EnumAddressTypes
561 ( LPDIRECTPLAYLOBBY2 this,
562 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
567 FIXME( dplay, ":stub\n");
568 return DPERR_OUTOFMEMORY;
571 /********************************************************************
573 * Enumerates what applications are registered with DirectPlay by
574 * invoking the callback function with lpContext.
577 static HRESULT WINAPI IDirectPlayLobbyW_EnumLocalApplications
578 ( LPDIRECTPLAYLOBBY this,
579 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
583 FIXME( dplay, ":stub\n");
584 return DPERR_OUTOFMEMORY;
587 static HRESULT WINAPI IDirectPlayLobby2W_EnumLocalApplications
588 ( LPDIRECTPLAYLOBBY2 this,
589 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
593 return IDirectPlayLobbyW_EnumLocalApplications( (LPDIRECTPLAYLOBBY)this, a,
594 lpContext, dwFlags );
597 static HRESULT WINAPI IDirectPlayLobbyA_EnumLocalApplications
598 ( LPDIRECTPLAYLOBBYA this,
599 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
603 FIXME( dplay, ":stub\n");
604 return DPERR_OUTOFMEMORY;
607 static HRESULT WINAPI IDirectPlayLobby2A_EnumLocalApplications
608 ( LPDIRECTPLAYLOBBY2A this,
609 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
613 return IDirectPlayLobbyA_EnumLocalApplications( (LPDIRECTPLAYLOBBYA)this, a,
614 lpContext, dwFlags );
618 /********************************************************************
620 * Retrieves the DPLCONNECTION structure that contains all the information
621 * needed to start and connect an application. This was generated using
622 * either the RunApplication or SetConnectionSettings methods.
624 * NOTES: If lpData is NULL then just return lpdwDataSize. This allows
625 * the data structure to be allocated by our caller which can then
626 * call this procedure/method again with a valid data pointer.
628 static HRESULT WINAPI IDirectPlayLobbyA_GetConnectionSettings
629 ( LPDIRECTPLAYLOBBYA this,
632 LPDWORD lpdwDataSize )
634 LPDPLCONNECTION lpDplConnection;
636 FIXME( dplay, ": semi stub (%p)->(0x%08lx,%p,%p)\n", this, dwAppID, lpData, lpdwDataSize );
638 /* Application is requesting us to give the required size */
641 /* Let's check the size of the buffer that the application has allocated */
642 if( *lpdwDataSize >= sizeof( DPLCONNECTION ) )
648 *lpdwDataSize = sizeof( DPLCONNECTION );
649 return DPERR_BUFFERTOOSMALL;
653 /* Fill in the fields - let them just use the ptrs */
654 lpDplConnection = (LPDPLCONNECTION)lpData;
656 /* Make sure we were given the right size */
657 if( lpDplConnection->dwSize < sizeof( DPLCONNECTION ) )
659 ERR( dplay, "bad passed size 0x%08lx.\n", lpDplConnection->dwSize );
660 return DPERR_INVALIDPARAMS;
663 /* Copy everything we've got into here */
664 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
665 lpDplConnection->dwFlags = this->dwConnFlags;
667 /* Copy LPDPSESSIONDESC2 struct */
668 lpDplConnection->lpSessionDesc = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( this->sessionDesc ) );
669 memcpy( lpDplConnection->lpSessionDesc, &(this->sessionDesc), sizeof( this->sessionDesc ) );
671 if( this->sessionDesc.sess.lpszSessionName )
673 lpDplConnection->lpSessionDesc->sess.lpszSessionName =
674 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, this->sessionDesc.sess.lpszSessionName );
677 if( this->sessionDesc.pass.lpszPassword )
679 lpDplConnection->lpSessionDesc->pass.lpszPassword =
680 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, this->sessionDesc.pass.lpszPassword );
683 /* I don't know what to use the reserved for. We'll set it to 0 just for fun */
684 this->sessionDesc.dwReserved1 = this->sessionDesc.dwReserved2 = 0;
686 /* Copy DPNAME struct - seems to be optional - check for existance first */
687 lpDplConnection->lpPlayerName = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( this->playerName ) );
688 memcpy( lpDplConnection->lpPlayerName, &(this->playerName), sizeof( this->playerName ) );
690 if( this->playerName.psn.lpszShortName )
692 lpDplConnection->lpPlayerName->psn.lpszShortName =
693 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, this->playerName.psn.lpszShortName );
696 if( this->playerName.pln.lpszLongName )
698 lpDplConnection->lpPlayerName->pln.lpszLongName =
699 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, this->playerName.pln.lpszLongName );
704 memcpy( &(lpDplConnection->guidSP), &(this->guidSP), sizeof( this->guidSP ) );
706 lpDplConnection->lpAddress = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, this->dwAddressSize );
707 memcpy( lpDplConnection->lpAddress, this->lpAddress, this->dwAddressSize );
709 lpDplConnection->dwAddressSize = this->dwAddressSize;
714 static HRESULT WINAPI IDirectPlayLobby2A_GetConnectionSettings
715 ( LPDIRECTPLAYLOBBY2A this,
718 LPDWORD lpdwDataSize )
720 return IDirectPlayLobbyA_GetConnectionSettings( (LPDIRECTPLAYLOBBYA)this,
721 dwAppID, lpData, lpdwDataSize );
724 static HRESULT WINAPI IDirectPlayLobbyW_GetConnectionSettings
725 ( LPDIRECTPLAYLOBBY this,
728 LPDWORD lpdwDataSize )
730 FIXME( dplay, ":semi stub %p %08lx %p %p \n", this, dwAppID, lpData, lpdwDataSize );
732 /* Application is requesting us to give the required size */
735 /* Let's check the size of the buffer that the application has allocated */
736 if( *lpdwDataSize >= sizeof( DPLCONNECTION ) )
742 *lpdwDataSize = sizeof( DPLCONNECTION );
743 return DPERR_BUFFERTOOSMALL;
747 /* Fill in the fields - let them just use the ptrs */
748 FIXME( dplay, "stub\n" );
753 static HRESULT WINAPI IDirectPlayLobby2W_GetConnectionSettings
754 ( LPDIRECTPLAYLOBBY2 this,
757 LPDWORD lpdwDataSize )
759 return IDirectPlayLobbyW_GetConnectionSettings( (LPDIRECTPLAYLOBBY)this,
760 dwAppID, lpData, lpdwDataSize );
763 /********************************************************************
765 * Retrieves the message sent between a lobby client and a DirectPlay
766 * application. All messages are queued until received.
769 static HRESULT WINAPI IDirectPlayLobbyA_ReceiveLobbyMessage
770 ( LPDIRECTPLAYLOBBYA this,
773 LPDWORD lpdwMessageFlags,
775 LPDWORD lpdwDataSize )
777 FIXME( dplay, ":stub %p %08lx %08lx %p %p %p\n", this, dwFlags, dwAppID, lpdwMessageFlags, lpData,
779 return DPERR_OUTOFMEMORY;
782 static HRESULT WINAPI IDirectPlayLobby2A_ReceiveLobbyMessage
783 ( LPDIRECTPLAYLOBBY2A this,
786 LPDWORD lpdwMessageFlags,
788 LPDWORD lpdwDataSize )
790 return IDirectPlayLobbyA_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBYA)this, dwFlags, dwAppID,
791 lpdwMessageFlags, lpData, lpdwDataSize );
795 static HRESULT WINAPI IDirectPlayLobbyW_ReceiveLobbyMessage
796 ( LPDIRECTPLAYLOBBY this,
799 LPDWORD lpdwMessageFlags,
801 LPDWORD lpdwDataSize )
803 FIXME( dplay, ":stub %p %08lx %08lx %p %p %p\n", this, dwFlags, dwAppID, lpdwMessageFlags, lpData,
805 return DPERR_OUTOFMEMORY;
808 static HRESULT WINAPI IDirectPlayLobby2W_ReceiveLobbyMessage
809 ( LPDIRECTPLAYLOBBY2 this,
812 LPDWORD lpdwMessageFlags,
814 LPDWORD lpdwDataSize )
816 return IDirectPlayLobbyW_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBY)this, dwFlags, dwAppID,
817 lpdwMessageFlags, lpData, lpdwDataSize );
820 /********************************************************************
822 * Starts an application and passes to it all the information to
823 * connect to a session.
826 static HRESULT WINAPI IDirectPlayLobbyA_RunApplication
827 ( LPDIRECTPLAYLOBBYA this,
830 LPDPLCONNECTION lpConn,
831 HANDLE32 hReceiveEvent )
833 FIXME( dplay, ":stub\n");
834 return DPERR_OUTOFMEMORY;
837 static HRESULT WINAPI IDirectPlayLobby2A_RunApplication
838 ( LPDIRECTPLAYLOBBY2A this,
841 LPDPLCONNECTION lpConn,
842 HANDLE32 hReceiveEvent )
844 return IDirectPlayLobbyA_RunApplication( (LPDIRECTPLAYLOBBYA)this, dwFlags,
845 lpdwAppID, lpConn, hReceiveEvent );
848 static HRESULT WINAPI IDirectPlayLobbyW_RunApplication
849 ( LPDIRECTPLAYLOBBY this,
852 LPDPLCONNECTION lpConn,
853 HANDLE32 hReceiveEvent )
855 FIXME( dplay, ":stub\n");
856 return DPERR_OUTOFMEMORY;
859 static HRESULT WINAPI IDirectPlayLobby2W_RunApplication
860 ( LPDIRECTPLAYLOBBY2 this,
863 LPDPLCONNECTION lpConn,
864 HANDLE32 hReceiveEvent )
866 return IDirectPlayLobbyW_RunApplication( (LPDIRECTPLAYLOBBY)this, dwFlags,
867 lpdwAppID, lpConn, hReceiveEvent );
871 /********************************************************************
873 * Sends a message between the application and the lobby client.
874 * All messages are queued until received.
877 static HRESULT WINAPI IDirectPlayLobbyA_SendLobbyMessage
878 ( LPDIRECTPLAYLOBBYA this,
884 FIXME( dplay, ":stub\n");
885 return DPERR_OUTOFMEMORY;
888 static HRESULT WINAPI IDirectPlayLobby2A_SendLobbyMessage
889 ( LPDIRECTPLAYLOBBY2A this,
895 return IDirectPlayLobbyA_SendLobbyMessage( (LPDIRECTPLAYLOBBYA)this, dwFlags,
896 dwAppID, lpData, dwDataSize );
900 static HRESULT WINAPI IDirectPlayLobbyW_SendLobbyMessage
901 ( LPDIRECTPLAYLOBBY this,
907 FIXME( dplay, ":stub\n");
908 return DPERR_OUTOFMEMORY;
911 static HRESULT WINAPI IDirectPlayLobby2W_SendLobbyMessage
912 ( LPDIRECTPLAYLOBBY2 this,
918 return IDirectPlayLobbyW_SendLobbyMessage( (LPDIRECTPLAYLOBBY)this, dwFlags,
919 dwAppID, lpData, dwDataSize );
922 /********************************************************************
924 * Modifies the DPLCONNECTION structure to contain all information
925 * needed to start and connect an application.
928 static HRESULT WINAPI IDirectPlayLobbyW_SetConnectionSettings
929 ( LPDIRECTPLAYLOBBY this,
932 LPDPLCONNECTION lpConn )
934 TRACE( dplay, ": this=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p\n",
935 this, dwFlags, dwAppID, lpConn );
937 /* Paramater check */
938 if( dwFlags || !this || !lpConn )
940 ERR( dplay, "invalid parameters.\n");
941 return DPERR_INVALIDPARAMS;
944 /* See if there is a connection associated with this request.
945 * dwAppID == 0 indicates that this request isn't associated with a connection.
949 FIXME( dplay, ": Connection dwAppID=%08lx given. Not implemented yet.\n",
952 /* Need to add a check for this application Id...*/
953 return DPERR_NOTLOBBIED;
956 if( lpConn->dwSize != sizeof(DPLCONNECTION) )
958 ERR( dplay, ": old/new DPLCONNECTION type? Size=%08lx vs. expected=%ul bytes\n",
959 lpConn->dwSize, sizeof( DPLCONNECTION ) );
960 return DPERR_INVALIDPARAMS;
963 /* Need to investigate the lpConn->lpSessionDesc to figure out
964 * what type of session we need to join/create.
966 if( (!lpConn->lpSessionDesc ) ||
967 ( lpConn->lpSessionDesc->dwSize != sizeof( DPSESSIONDESC2 ) )
970 ERR( dplay, "DPSESSIONDESC passed in? Size=%08lx vs. expected=%ul bytes\n",
971 lpConn->lpSessionDesc->dwSize, sizeof( DPSESSIONDESC2 ) );
972 return DPERR_INVALIDPARAMS;
975 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
976 this->dwConnFlags = lpConn->dwFlags;
978 /* Copy LPDPSESSIONDESC2 struct - this is required */
979 memcpy( &(this->sessionDesc), lpConn->lpSessionDesc, sizeof( *(lpConn->lpSessionDesc) ) );
981 if( lpConn->lpSessionDesc->sess.lpszSessionName )
982 this->sessionDesc.sess.lpszSessionName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpSessionDesc->sess.lpszSessionName );
984 this->sessionDesc.sess.lpszSessionName = NULL;
986 if( lpConn->lpSessionDesc->pass.lpszPassword )
987 this->sessionDesc.pass.lpszPassword = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpSessionDesc->pass.lpszPassword );
989 this->sessionDesc.pass.lpszPassword = NULL;
991 /* I don't know what to use the reserved for ... */
992 this->sessionDesc.dwReserved1 = this->sessionDesc.dwReserved2 = 0;
994 /* Copy DPNAME struct - seems to be optional - check for existance first */
995 if( lpConn->lpPlayerName )
997 memcpy( &(this->playerName), lpConn->lpPlayerName, sizeof( *lpConn->lpPlayerName ) );
999 if( lpConn->lpPlayerName->psn.lpszShortName )
1000 this->playerName.psn.lpszShortName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpPlayerName->psn.lpszShortName );
1002 if( lpConn->lpPlayerName->pln.lpszLongName )
1003 this->playerName.pln.lpszLongName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpPlayerName->pln.lpszLongName );
1007 memcpy( &(this->guidSP), &(lpConn->guidSP), sizeof( lpConn->guidSP ) );
1009 this->lpAddress = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->dwAddressSize );
1010 memcpy( this->lpAddress, lpConn->lpAddress, lpConn->dwAddressSize );
1012 this->dwAddressSize = lpConn->dwAddressSize;
1017 static HRESULT WINAPI IDirectPlayLobby2W_SetConnectionSettings
1018 ( LPDIRECTPLAYLOBBY2 this,
1021 LPDPLCONNECTION lpConn )
1023 return IDirectPlayLobbyW_SetConnectionSettings( (LPDIRECTPLAYLOBBY)this,
1024 dwFlags, dwAppID, lpConn );
1027 static HRESULT WINAPI IDirectPlayLobbyA_SetConnectionSettings
1028 ( LPDIRECTPLAYLOBBYA this,
1031 LPDPLCONNECTION lpConn )
1033 FIXME( dplay, ": this=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p: stub\n",
1034 this, dwFlags, dwAppID, lpConn );
1035 return DPERR_OUTOFMEMORY;
1038 static HRESULT WINAPI IDirectPlayLobby2A_SetConnectionSettings
1039 ( LPDIRECTPLAYLOBBY2A this,
1042 LPDPLCONNECTION lpConn )
1044 return IDirectPlayLobbyA_SetConnectionSettings( (LPDIRECTPLAYLOBBYA)this,
1045 dwFlags, dwAppID, lpConn );
1048 /********************************************************************
1050 * Registers an event that will be set when a lobby message is received.
1053 static HRESULT WINAPI IDirectPlayLobbyA_SetLobbyMessageEvent
1054 ( LPDIRECTPLAYLOBBYA this,
1057 HANDLE32 hReceiveEvent )
1059 FIXME( dplay, ":stub\n");
1060 return DPERR_OUTOFMEMORY;
1063 static HRESULT WINAPI IDirectPlayLobby2A_SetLobbyMessageEvent
1064 ( LPDIRECTPLAYLOBBY2A this,
1067 HANDLE32 hReceiveEvent )
1069 return IDirectPlayLobbyA_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBYA)this, dwFlags,
1070 dwAppID, hReceiveEvent );
1073 static HRESULT WINAPI IDirectPlayLobbyW_SetLobbyMessageEvent
1074 ( LPDIRECTPLAYLOBBY this,
1077 HANDLE32 hReceiveEvent )
1079 FIXME( dplay, ":stub\n");
1080 return DPERR_OUTOFMEMORY;
1083 static HRESULT WINAPI IDirectPlayLobby2W_SetLobbyMessageEvent
1084 ( LPDIRECTPLAYLOBBY2 this,
1087 HANDLE32 hReceiveEvent )
1089 return IDirectPlayLobbyW_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBY)this, dwFlags,
1090 dwAppID, hReceiveEvent );
1094 /********************************************************************
1096 * Registers an event that will be set when a lobby message is received.
1099 static HRESULT WINAPI IDirectPlayLobby2W_CreateCompoundAddress
1100 ( LPDIRECTPLAYLOBBY2 this,
1101 LPCDPCOMPOUNDADDRESSELEMENT lpElements,
1102 DWORD dwElementCount,
1104 LPDWORD lpdwAddressSize )
1106 FIXME( dplay, ":stub\n");
1107 return DPERR_OUTOFMEMORY;
1110 static HRESULT WINAPI IDirectPlayLobby2A_CreateCompoundAddress
1111 ( LPDIRECTPLAYLOBBY2A this,
1112 LPCDPCOMPOUNDADDRESSELEMENT lpElements,
1113 DWORD dwElementCount,
1115 LPDWORD lpdwAddressSize )
1117 FIXME( dplay, ":stub\n");
1118 return DPERR_OUTOFMEMORY;
1122 /* Direct Play Lobby 1 (ascii) Virtual Table for methods */
1123 /* All lobby 1 methods are exactly the same except QueryInterface */
1124 static struct tagLPDIRECTPLAYLOBBY_VTABLE directPlayLobbyAVT = {
1125 IDirectPlayLobbyA_QueryInterface,
1126 (void*)IDirectPlayLobby2A_AddRef,
1127 (void*)IDirectPlayLobby2A_Release,
1128 (void*)IDirectPlayLobby2A_Connect,
1129 (void*)IDirectPlayLobby2A_CreateAddress,
1130 (void*)IDirectPlayLobby2A_EnumAddress,
1131 (void*)IDirectPlayLobby2A_EnumAddressTypes,
1132 (void*)IDirectPlayLobby2A_EnumLocalApplications,
1133 (void*)IDirectPlayLobby2A_GetConnectionSettings,
1134 (void*)IDirectPlayLobby2A_ReceiveLobbyMessage,
1135 (void*)IDirectPlayLobby2A_RunApplication,
1136 (void*)IDirectPlayLobby2A_SendLobbyMessage,
1137 (void*)IDirectPlayLobby2A_SetConnectionSettings,
1138 (void*)IDirectPlayLobby2A_SetLobbyMessageEvent
1141 /* Direct Play Lobby 1 (unicode) Virtual Table for methods */
1142 static struct tagLPDIRECTPLAYLOBBY_VTABLE directPlayLobbyWVT = {
1143 IDirectPlayLobbyW_QueryInterface,
1144 (void*)IDirectPlayLobby2W_AddRef,
1145 (void*)IDirectPlayLobby2W_Release,
1146 (void*)IDirectPlayLobby2W_Connect,
1147 (void*)IDirectPlayLobby2W_CreateAddress,
1148 (void*)IDirectPlayLobby2W_EnumAddress,
1149 (void*)IDirectPlayLobby2W_EnumAddressTypes,
1150 (void*)IDirectPlayLobby2W_EnumLocalApplications,
1151 (void*)IDirectPlayLobby2W_GetConnectionSettings,
1152 (void*)IDirectPlayLobby2W_ReceiveLobbyMessage,
1153 (void*)IDirectPlayLobby2W_RunApplication,
1154 (void*)IDirectPlayLobby2W_SendLobbyMessage,
1155 (void*)IDirectPlayLobby2W_SetConnectionSettings,
1156 (void*)IDirectPlayLobby2W_SetLobbyMessageEvent
1160 /* Direct Play Lobby 2 (ascii) Virtual Table for methods */
1161 static struct tagLPDIRECTPLAYLOBBY2_VTABLE directPlayLobby2AVT = {
1162 IDirectPlayLobby2A_QueryInterface,
1163 IDirectPlayLobby2A_AddRef,
1164 IDirectPlayLobby2A_Release,
1165 IDirectPlayLobby2A_Connect,
1166 IDirectPlayLobby2A_CreateAddress,
1167 IDirectPlayLobby2A_EnumAddress,
1168 IDirectPlayLobby2A_EnumAddressTypes,
1169 IDirectPlayLobby2A_EnumLocalApplications,
1170 IDirectPlayLobby2A_GetConnectionSettings,
1171 IDirectPlayLobby2A_ReceiveLobbyMessage,
1172 IDirectPlayLobby2A_RunApplication,
1173 IDirectPlayLobby2A_SendLobbyMessage,
1174 IDirectPlayLobby2A_SetConnectionSettings,
1175 IDirectPlayLobby2A_SetLobbyMessageEvent,
1176 IDirectPlayLobby2A_CreateCompoundAddress
1179 /* Direct Play Lobby 2 (unicode) Virtual Table for methods */
1180 static struct tagLPDIRECTPLAYLOBBY2_VTABLE directPlayLobby2WVT = {
1181 IDirectPlayLobby2W_QueryInterface,
1182 IDirectPlayLobby2W_AddRef,
1183 IDirectPlayLobby2W_Release,
1184 IDirectPlayLobby2W_Connect,
1185 IDirectPlayLobby2W_CreateAddress,
1186 IDirectPlayLobby2W_EnumAddress,
1187 IDirectPlayLobby2W_EnumAddressTypes,
1188 IDirectPlayLobby2W_EnumLocalApplications,
1189 IDirectPlayLobby2W_GetConnectionSettings,
1190 IDirectPlayLobby2W_ReceiveLobbyMessage,
1191 IDirectPlayLobby2W_RunApplication,
1192 IDirectPlayLobby2W_SendLobbyMessage,
1193 IDirectPlayLobby2W_SetConnectionSettings,
1194 IDirectPlayLobby2W_SetLobbyMessageEvent,
1195 IDirectPlayLobby2W_CreateCompoundAddress
1198 /***************************************************************************
1199 * DirectPlayLobbyCreateA (DPLAYX.4)
1202 HRESULT WINAPI DirectPlayLobbyCreateA( LPGUID lpGUIDDSP,
1203 LPDIRECTPLAYLOBBYA *lplpDPL,
1208 TRACE(dplay,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1209 lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize);
1211 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1212 * equal 0. These fields are mostly for future expansion.
1214 if ( lpGUIDDSP || lpUnk || lpData || dwDataSize )
1217 return DPERR_INVALIDPARAMS;
1220 /* Yes...really we should be returning a lobby 1 object */
1221 *lplpDPL = (LPDIRECTPLAYLOBBYA)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1222 sizeof( IDirectPlayLobbyA ) );
1226 return DPERR_OUTOFMEMORY;
1229 (*lplpDPL)->lpVtbl = &directPlayLobbyAVT;
1230 (*lplpDPL)->ref = 1;
1232 /* All fields were nulled out by the allocation */
1237 /***************************************************************************
1238 * DirectPlayLobbyCreateW (DPLAYX.5)
1241 HRESULT WINAPI DirectPlayLobbyCreateW( LPGUID lpGUIDDSP,
1242 LPDIRECTPLAYLOBBY *lplpDPL,
1247 TRACE(dplay,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1248 lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize);
1250 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1251 * equal 0. These fields are mostly for future expansion.
1253 if ( lpGUIDDSP || lpUnk || lpData || dwDataSize )
1256 ERR( dplay, "Bad parameters!\n" );
1257 return DPERR_INVALIDPARAMS;
1260 /* Yes...really we should bre returning a lobby 1 object */
1261 *lplpDPL = (LPDIRECTPLAYLOBBY)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1262 sizeof( IDirectPlayLobby ) );
1266 return DPERR_OUTOFMEMORY;
1269 (*lplpDPL)->lpVtbl = &directPlayLobbyWVT;
1270 (*lplpDPL)->ref = 1;
1272 /* All fields were nulled out by the allocation */
1278 /***************************************************************************
1279 * DirectPlayEnumerateA (DPLAYX.2)
1281 * The pointer to the structure lpContext will be filled with the
1282 * appropriate data for each service offered by the OS. These services are
1283 * not necessarily available on this particular machine but are defined
1284 * as simple service providers under the "Service Providers" registry key.
1285 * This structure is then passed to lpEnumCallback for each of the different
1288 * This API is useful only for applications written using DirectX3 or
1289 * worse. It is superceeded by IDirectPlay3::EnumConnections which also
1290 * gives information on the actual connections.
1292 * defn of a service provider:
1293 * A dynamic-link library used by DirectPlay to communicate over a network.
1294 * The service provider contains all the network-specific code required
1295 * to send and receive messages. Online services and network operators can
1296 * supply service providers to use specialized hardware, protocols, communications
1297 * media, and network resources.
1299 * TODO: Allocate string buffer space from the heap (length from reg)
1300 * Pass real device driver numbers...
1301 * Get the GUID properly...
1303 HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA lpEnumCallback,
1308 LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
1309 LPSTR guidDataSubKey = "Guid";
1310 LPSTR majVerDataSubKey = "dwReserved1";
1311 DWORD dwIndex, sizeOfSubKeyName=50;
1312 char subKeyName[51];
1314 TRACE( dplay, ": lpEnumCallback=%p lpContext=%p\n", lpEnumCallback, lpContext );
1316 if( !lpEnumCallback || !*lpEnumCallback )
1318 return DPERR_INVALIDPARAMS;
1321 /* Need to loop over the service providers in the registry */
1322 if( RegOpenKeyEx32A( HKEY_LOCAL_MACHINE, searchSubKey,
1323 0, KEY_ENUMERATE_SUB_KEYS, &hkResult ) != ERROR_SUCCESS )
1325 /* Hmmm. Does this mean that there are no service providers? */
1326 ERR(dplay, ": no service providers?\n");
1330 /* Traverse all the service providers we have available */
1332 RegEnumKey32A( hkResult, dwIndex, subKeyName, sizeOfSubKeyName ) !=
1333 ERROR_NO_MORE_ITEMS;
1336 HKEY hkServiceProvider;
1337 GUID serviceProviderGUID;
1338 DWORD returnTypeGUID, returnTypeReserved1, sizeOfReturnBuffer=50;
1339 char returnBuffer[51];
1340 DWORD majVersionNum /*, minVersionNum */;
1341 LPWSTR lpWGUIDString;
1343 TRACE( dplay, " this time through: %s\n", subKeyName );
1345 /* Get a handle for this particular service provider */
1346 if( RegOpenKeyEx32A( hkResult, subKeyName, 0, KEY_QUERY_VALUE,
1347 &hkServiceProvider ) != ERROR_SUCCESS )
1349 ERR( dplay, ": what the heck is going on?\n" );
1353 /* Get the GUID, Device major number and device minor number
1354 * from the registry.
1356 if( RegQueryValueEx32A( hkServiceProvider, guidDataSubKey,
1357 NULL, &returnTypeGUID, returnBuffer,
1358 &sizeOfReturnBuffer ) != ERROR_SUCCESS )
1360 ERR( dplay, ": missing GUID registry data members\n" );
1364 /* FIXME: Check return types to ensure we're interpreting data right */
1365 lpWGUIDString = HEAP_strdupAtoW( GetProcessHeap(), 0, returnBuffer );
1366 CLSIDFromString32( (LPCOLESTR32)lpWGUIDString, &serviceProviderGUID );
1367 HeapFree( GetProcessHeap(), 0, lpWGUIDString );
1369 sizeOfReturnBuffer = 50;
1371 if( RegQueryValueEx32A( hkServiceProvider, majVerDataSubKey,
1372 NULL, &returnTypeReserved1, returnBuffer,
1373 &sizeOfReturnBuffer ) != ERROR_SUCCESS )
1375 ERR( dplay, ": missing dwReserved1 registry data members\n") ;
1378 /* FIXME: This couldn't possibly be right...*/
1379 majVersionNum = GET_DWORD( returnBuffer );
1381 /* The enumeration will return FALSE if we are not to continue */
1382 if( !lpEnumCallback( &serviceProviderGUID , subKeyName,
1383 majVersionNum, (DWORD)0, lpContext ) )
1385 WARN( dplay, "lpEnumCallback returning FALSE\n" );
1394 /***************************************************************************
1395 * DirectPlayEnumerateW (DPLAYX.3)
1398 HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW lpEnumCallback, LPVOID lpContext )
1401 FIXME( dplay, ":stub\n");
1403 return DPERR_OUTOFMEMORY;
1407 /***************************************************************************
1408 * DirectPlayCreate (DPLAYX.1) (DPLAY.1)
1411 HRESULT WINAPI DirectPlayCreate
1412 ( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk)
1415 TRACE(dplay,"lpGUID=%p lplpDP=%p pUnk=%p\n", lpGUID,lplpDP,pUnk);
1419 /* Hmmm...wonder what this means! */
1420 ERR(dplay, "What does a NULL here mean?\n" );
1421 return DPERR_OUTOFMEMORY;
1424 if( IsEqualGUID( &IID_IDirectPlay2A, lpGUID ) )
1426 *lplpDP = (LPDIRECTPLAY2A)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1427 sizeof( **lplpDP ) );
1431 return DPERR_OUTOFMEMORY;
1434 (*lplpDP)->lpVtbl = &directPlay2AVT;
1439 else if( IsEqualGUID( &IID_IDirectPlay2, lpGUID ) )
1441 *lplpDP = (LPDIRECTPLAY2)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1442 sizeof( **lplpDP ) );
1446 return DPERR_OUTOFMEMORY;
1449 (*lplpDP)->lpVtbl = &directPlay2WVT;
1455 /* Unknown interface type */
1456 return DPERR_NOINTERFACE;
1460 /* Direct Play helper methods */
1462 /* Get a new interface. To be used by QueryInterface. */
1463 static HRESULT directPlay_QueryInterface
1464 ( REFIID riid, LPVOID* ppvObj )
1467 if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
1469 LPDIRECTPLAY2 lpDP = (LPDIRECTPLAY2)*ppvObj;
1471 lpDP = (LPDIRECTPLAY2)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1476 return DPERR_OUTOFMEMORY;
1479 lpDP->lpVtbl = &directPlay2WVT;
1484 else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
1486 LPDIRECTPLAY2A lpDP = (LPDIRECTPLAY2A)*ppvObj;
1488 lpDP = (LPDIRECTPLAY2A)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1493 return DPERR_OUTOFMEMORY;
1496 lpDP->lpVtbl = &directPlay2AVT;
1501 else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
1503 LPDIRECTPLAY3 lpDP = (LPDIRECTPLAY3)*ppvObj;
1505 lpDP = (LPDIRECTPLAY3)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1510 return DPERR_OUTOFMEMORY;
1513 lpDP->lpVtbl = &directPlay3WVT;
1518 else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
1520 LPDIRECTPLAY3A lpDP = (LPDIRECTPLAY3A)*ppvObj;
1522 lpDP = (LPDIRECTPLAY3A)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1527 return DPERR_OUTOFMEMORY;
1530 lpDP->lpVtbl = &directPlay3AVT;
1538 return E_NOINTERFACE;
1542 /* Direct Play methods */
1543 static HRESULT WINAPI DirectPlay2W_QueryInterface
1544 ( LPDIRECTPLAY2 this, REFIID riid, LPVOID* ppvObj )
1546 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
1548 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1549 IsEqualGUID( &IID_IDirectPlay2, riid )
1552 this->lpVtbl->fnAddRef( this );
1556 return directPlay_QueryInterface( riid, ppvObj );
1559 static HRESULT WINAPI DirectPlay2A_QueryInterface
1560 ( LPDIRECTPLAY2A this, REFIID riid, LPVOID* ppvObj )
1562 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
1564 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1565 IsEqualGUID( &IID_IDirectPlay2A, riid )
1568 this->lpVtbl->fnAddRef( this );
1573 return directPlay_QueryInterface( riid, ppvObj );
1576 static HRESULT WINAPI DirectPlay3W_QueryInterface
1577 ( LPDIRECTPLAY3 this, REFIID riid, LPVOID* ppvObj )
1579 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
1581 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1582 IsEqualGUID( &IID_IDirectPlay3, riid )
1585 this->lpVtbl->fnAddRef( this );
1590 return directPlay_QueryInterface( riid, ppvObj );
1593 static HRESULT WINAPI DirectPlay3A_QueryInterface
1594 ( LPDIRECTPLAY3A this, REFIID riid, LPVOID* ppvObj )
1596 TRACE( dplay, "(%p)->(%p,%p)\n", this, riid, ppvObj );
1598 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1599 IsEqualGUID( &IID_IDirectPlay3A, riid )
1602 this->lpVtbl->fnAddRef( this );
1607 return directPlay_QueryInterface( riid, ppvObj );
1611 /* Shared between all dplay types */
1612 static ULONG WINAPI DirectPlay3W_AddRef
1613 ( LPDIRECTPLAY3 this )
1616 TRACE( dplay,"ref count now %lu\n", this->ref );
1620 static ULONG WINAPI DirectPlay3W_Release
1621 ( LPDIRECTPLAY3 this )
1623 TRACE( dplay, "ref count decremeneted from %lu\n", this->ref );
1627 /* Deallocate if this is the last reference to the object */
1630 FIXME( dplay, "memory leak\n" );
1631 /* Implement memory deallocation */
1633 HeapFree( GetProcessHeap(), 0, this );
1641 static ULONG WINAPI DirectPlay3A_Release
1642 ( LPDIRECTPLAY3A this )
1644 TRACE( dplay, "ref count decremeneted from %lu\n", this->ref );
1648 /* Deallocate if this is the last reference to the object */
1651 FIXME( dplay, "memory leak\n" );
1652 /* Implement memory deallocation */
1654 HeapFree( GetProcessHeap(), 0, this );
1662 HRESULT WINAPI DirectPlay3A_AddPlayerToGroup
1663 ( LPDIRECTPLAY3A this, DPID a, DPID b )
1665 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
1669 HRESULT WINAPI DirectPlay3W_AddPlayerToGroup
1670 ( LPDIRECTPLAY3 this, DPID a, DPID b )
1672 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
1677 HRESULT WINAPI DirectPlay3A_Close
1678 ( LPDIRECTPLAY3A this )
1680 FIXME( dplay,"(%p)->(): stub", this );
1684 HRESULT WINAPI DirectPlay3W_Close
1685 ( LPDIRECTPLAY3 this )
1687 FIXME( dplay,"(%p)->(): stub", this );
1691 HRESULT WINAPI DirectPlay3A_CreateGroup
1692 ( LPDIRECTPLAY3A this, LPDPID a, LPDPNAME b, LPVOID c, DWORD d, DWORD e )
1694 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d, e );
1698 HRESULT WINAPI DirectPlay3W_CreateGroup
1699 ( LPDIRECTPLAY3 this, LPDPID a, LPDPNAME b, LPVOID c, DWORD d, DWORD e )
1701 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d, e );
1705 HRESULT WINAPI DirectPlay3A_CreatePlayer
1706 ( LPDIRECTPLAY3A this, LPDPID a, LPDPNAME b, HANDLE32 c, LPVOID d, DWORD e, DWORD f )
1708 FIXME( dplay,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d, e, f );
1712 HRESULT WINAPI DirectPlay3W_CreatePlayer
1713 ( LPDIRECTPLAY3 this, LPDPID a, LPDPNAME b, HANDLE32 c, LPVOID d, DWORD e, DWORD f )
1715 FIXME( dplay,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d, e, f );
1719 HRESULT WINAPI DirectPlay3A_DeletePlayerFromGroup
1720 ( LPDIRECTPLAY3A this, DPID a, DPID b )
1722 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
1726 HRESULT WINAPI DirectPlay3W_DeletePlayerFromGroup
1727 ( LPDIRECTPLAY3 this, DPID a, DPID b )
1729 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
1733 HRESULT WINAPI DirectPlay3A_DestroyGroup
1734 ( LPDIRECTPLAY3A this, DPID a )
1736 FIXME( dplay,"(%p)->(0x%08lx): stub", this, a );
1740 HRESULT WINAPI DirectPlay3W_DestroyGroup
1741 ( LPDIRECTPLAY3 this, DPID a )
1743 FIXME( dplay,"(%p)->(0x%08lx): stub", this, a );
1747 HRESULT WINAPI DirectPlay3A_DestroyPlayer
1748 ( LPDIRECTPLAY3A this, DPID a )
1750 FIXME( dplay,"(%p)->(0x%08lx): stub", this, a );
1754 HRESULT WINAPI DirectPlay3W_DestroyPlayer
1755 ( LPDIRECTPLAY3 this, DPID a )
1757 FIXME( dplay,"(%p)->(0x%08lx): stub", this, a );
1761 HRESULT WINAPI DirectPlay3A_EnumGroupPlayers
1762 ( LPDIRECTPLAY3A this, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c,
1765 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a, b, c, d, e );
1769 HRESULT WINAPI DirectPlay3W_EnumGroupPlayers
1770 ( LPDIRECTPLAY3 this, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c,
1773 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a, b, c, d, e );
1777 HRESULT WINAPI DirectPlay3A_EnumGroups
1778 ( LPDIRECTPLAY3A this, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1780 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a, b, c, d );
1784 HRESULT WINAPI DirectPlay3W_EnumGroups
1785 ( LPDIRECTPLAY3 this, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1787 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a, b, c, d );
1791 HRESULT WINAPI DirectPlay3A_EnumPlayers
1792 ( LPDIRECTPLAY3A this, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1794 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a, b, c, d );
1798 HRESULT WINAPI DirectPlay3W_EnumPlayers
1799 ( LPDIRECTPLAY3 this, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1801 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a, b, c, d );
1805 HRESULT WINAPI DirectPlay3A_EnumSessions
1806 ( LPDIRECTPLAY3A this, LPDPSESSIONDESC2 a, DWORD b, LPDPENUMSESSIONSCALLBACK2 c,
1809 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", this, a, b, c, d, e );
1813 HRESULT WINAPI DirectPlay3W_EnumSessions
1814 ( LPDIRECTPLAY3 this, LPDPSESSIONDESC2 a, DWORD b, LPDPENUMSESSIONSCALLBACK2 c,
1817 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", this, a, b, c, d, e );
1821 HRESULT WINAPI DirectPlay3A_GetCaps
1822 ( LPDIRECTPLAY3A this, LPDPCAPS a, DWORD b )
1824 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
1828 HRESULT WINAPI DirectPlay3W_GetCaps
1829 ( LPDIRECTPLAY3 this, LPDPCAPS a, DWORD b )
1831 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
1835 HRESULT WINAPI DirectPlay3A_GetGroupData
1836 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c, DWORD d )
1838 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a, b, c, d );
1842 HRESULT WINAPI DirectPlay3W_GetGroupData
1843 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c, DWORD d )
1845 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a, b, c, d );
1849 HRESULT WINAPI DirectPlay3A_GetGroupName
1850 ( LPDIRECTPLAY3A this, DPID a, LPVOID b, LPDWORD c )
1852 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", this, a, b, c );
1856 HRESULT WINAPI DirectPlay3W_GetGroupName
1857 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c )
1859 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", this, a, b, c );
1863 HRESULT WINAPI DirectPlay3A_GetMessageCount
1864 ( LPDIRECTPLAY3A this, DPID a, LPDWORD b )
1866 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
1870 HRESULT WINAPI DirectPlay3W_GetMessageCount
1871 ( LPDIRECTPLAY3 this, DPID a, LPDWORD b )
1873 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
1877 HRESULT WINAPI DirectPlay3A_GetPlayerAddress
1878 ( LPDIRECTPLAY3A this, DPID a, LPVOID b, LPDWORD c )
1880 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", this, a, b, c );
1884 HRESULT WINAPI DirectPlay3W_GetPlayerAddress
1885 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c )
1887 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", this, a, b, c );
1891 HRESULT WINAPI DirectPlay3A_GetPlayerCaps
1892 ( LPDIRECTPLAY3A this, DPID a, LPDPCAPS b, DWORD c )
1894 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a, b, c );
1898 HRESULT WINAPI DirectPlay3W_GetPlayerCaps
1899 ( LPDIRECTPLAY3 this, DPID a, LPDPCAPS b, DWORD c )
1901 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a, b, c );
1905 HRESULT WINAPI DirectPlay3A_GetPlayerData
1906 ( LPDIRECTPLAY3A this, DPID a, LPVOID b, LPDWORD c, DWORD d )
1908 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a, b, c, d );
1912 HRESULT WINAPI DirectPlay3W_GetPlayerData
1913 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c, DWORD d )
1915 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", this, a, b, c, d );
1919 HRESULT WINAPI DirectPlay3A_GetPlayerName
1920 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c )
1922 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", this, a, b, c );
1926 HRESULT WINAPI DirectPlay3W_GetPlayerName
1927 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, LPDWORD c )
1929 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", this, a, b, c );
1933 HRESULT WINAPI DirectPlay3A_GetSessionDesc
1934 ( LPDIRECTPLAY3A this, LPVOID a, LPDWORD b )
1936 FIXME( dplay,"(%p)->(%p,%p): stub", this, a, b );
1940 HRESULT WINAPI DirectPlay3W_GetSessionDesc
1941 ( LPDIRECTPLAY3 this, LPVOID a, LPDWORD b )
1943 FIXME( dplay,"(%p)->(%p,%p): stub", this, a, b );
1947 HRESULT WINAPI DirectPlay3A_Initialize
1948 ( LPDIRECTPLAY3A this, LPGUID a )
1950 FIXME( dplay,"(%p)->(%p): stub", this, a );
1954 HRESULT WINAPI DirectPlay3W_Initialize
1955 ( LPDIRECTPLAY3 this, LPGUID a )
1957 FIXME( dplay,"(%p)->(%p): stub", this, a );
1962 HRESULT WINAPI DirectPlay3A_Open
1963 ( LPDIRECTPLAY3A this, LPDPSESSIONDESC2 a, DWORD b )
1965 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
1969 HRESULT WINAPI DirectPlay3W_Open
1970 ( LPDIRECTPLAY3 this, LPDPSESSIONDESC2 a, DWORD b )
1972 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
1976 HRESULT WINAPI DirectPlay3A_Receive
1977 ( LPDIRECTPLAY3A this, LPDPID a, LPDPID b, DWORD c, LPVOID d, LPDWORD e )
1979 FIXME( dplay,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", this, a, b, c, d, e );
1983 HRESULT WINAPI DirectPlay3W_Receive
1984 ( LPDIRECTPLAY3 this, LPDPID a, LPDPID b, DWORD c, LPVOID d, LPDWORD e )
1986 FIXME( dplay,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", this, a, b, c, d, e );
1990 HRESULT WINAPI DirectPlay3A_Send
1991 ( LPDIRECTPLAY3A this, DPID a, DPID b, DWORD c, LPVOID d, DWORD e )
1993 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", this, a, b, c, d, e );
1997 HRESULT WINAPI DirectPlay3W_Send
1998 ( LPDIRECTPLAY3 this, DPID a, DPID b, DWORD c, LPVOID d, DWORD e )
2000 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", this, a, b, c, d, e );
2004 HRESULT WINAPI DirectPlay3A_SetGroupData
2005 ( LPDIRECTPLAY3A this, DPID a, LPVOID b, DWORD c, DWORD d )
2007 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d );
2011 HRESULT WINAPI DirectPlay3W_SetGroupData
2012 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, DWORD c, DWORD d )
2014 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d );
2018 HRESULT WINAPI DirectPlay3A_SetGroupName
2019 ( LPDIRECTPLAY3A this, DPID a, LPDPNAME b, DWORD c )
2021 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a, b, c );
2025 HRESULT WINAPI DirectPlay3W_SetGroupName
2026 ( LPDIRECTPLAY3 this, DPID a, LPDPNAME b, DWORD c )
2028 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a, b, c );
2032 HRESULT WINAPI DirectPlay3A_SetPlayerData
2033 ( LPDIRECTPLAY3A this, DPID a, LPVOID b, DWORD c, DWORD d )
2035 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d );
2039 HRESULT WINAPI DirectPlay3W_SetPlayerData
2040 ( LPDIRECTPLAY3 this, DPID a, LPVOID b, DWORD c, DWORD d )
2042 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d );
2046 HRESULT WINAPI DirectPlay3A_SetPlayerName
2047 ( LPDIRECTPLAY3A this, DPID a, LPDPNAME b, DWORD c )
2049 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a, b, c );
2053 HRESULT WINAPI DirectPlay3W_SetPlayerName
2054 ( LPDIRECTPLAY3 this, DPID a, LPDPNAME b, DWORD c )
2056 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", this, a, b, c );
2060 HRESULT WINAPI DirectPlay3A_SetSessionDesc
2061 ( LPDIRECTPLAY3A this, LPDPSESSIONDESC2 a, DWORD b )
2063 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
2067 HRESULT WINAPI DirectPlay3W_SetSessionDesc
2068 ( LPDIRECTPLAY3 this, LPDPSESSIONDESC2 a, DWORD b )
2070 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
2074 HRESULT WINAPI DirectPlay3A_AddGroupToGroup
2075 ( LPDIRECTPLAY3A this, DPID a, DPID b )
2077 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
2081 HRESULT WINAPI DirectPlay3W_AddGroupToGroup
2082 ( LPDIRECTPLAY3 this, DPID a, DPID b )
2084 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
2088 HRESULT WINAPI DirectPlay3A_CreateGroupInGroup
2089 ( LPDIRECTPLAY3A this, DPID a, LPDPID b, LPDPNAME c, LPVOID d, DWORD e, DWORD f )
2091 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d, e, f );
2095 HRESULT WINAPI DirectPlay3W_CreateGroupInGroup
2096 ( LPDIRECTPLAY3 this, DPID a, LPDPID b, LPDPNAME c, LPVOID d, DWORD e, DWORD f )
2098 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", this, a, b, c, d, e, f );
2102 HRESULT WINAPI DirectPlay3A_DeleteGroupFromGroup
2103 ( LPDIRECTPLAY3A this, DPID a, DPID b )
2105 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
2109 HRESULT WINAPI DirectPlay3W_DeleteGroupFromGroup
2110 ( LPDIRECTPLAY3 this, DPID a, DPID b )
2112 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
2116 HRESULT WINAPI DirectPlay3A_EnumConnections
2117 ( LPDIRECTPLAY3A this, LPCGUID a, LPDPENUMCONNECTIONSCALLBACK b, LPVOID c, DWORD d )
2119 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a, b, c, d );
2123 HRESULT WINAPI DirectPlay3W_EnumConnections
2124 ( LPDIRECTPLAY3 this, LPCGUID a, LPDPENUMCONNECTIONSCALLBACK b, LPVOID c, DWORD d )
2126 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", this, a, b, c, d );
2130 HRESULT WINAPI DirectPlay3A_EnumGroupsInGroup
2131 ( LPDIRECTPLAY3A this, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c, LPVOID d, DWORD e )
2133 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a, b, c, d, e );
2137 HRESULT WINAPI DirectPlay3W_EnumGroupsInGroup
2138 ( LPDIRECTPLAY3 this, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c, LPVOID d, DWORD e )
2140 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", this, a, b, c, d, e );
2144 HRESULT WINAPI DirectPlay3A_GetGroupConnectionSettings
2145 ( LPDIRECTPLAY3A this, DWORD a, DPID b, LPVOID c, LPDWORD d )
2147 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a, b, c, d );
2151 HRESULT WINAPI DirectPlay3W_GetGroupConnectionSettings
2152 ( LPDIRECTPLAY3 this, DWORD a, DPID b, LPVOID c, LPDWORD d )
2154 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a, b, c, d );
2158 HRESULT WINAPI DirectPlay3A_InitializeConnection
2159 ( LPDIRECTPLAY3A this, LPVOID a, DWORD b )
2161 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
2165 HRESULT WINAPI DirectPlay3W_InitializeConnection
2166 ( LPDIRECTPLAY3 this, LPVOID a, DWORD b )
2168 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", this, a, b );
2172 HRESULT WINAPI DirectPlay3A_SecureOpen
2173 ( LPDIRECTPLAY3A this, LPCDPSESSIONDESC2 a, DWORD b, LPCDPSECURITYDESC c, LPCDPCREDENTIALS d )
2175 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p): stub", this, a, b, c, d );
2179 HRESULT WINAPI DirectPlay3W_SecureOpen
2180 ( LPDIRECTPLAY3 this, LPCDPSESSIONDESC2 a, DWORD b, LPCDPSECURITYDESC c, LPCDPCREDENTIALS d )
2182 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p): stub", this, a, b, c, d );
2186 HRESULT WINAPI DirectPlay3A_SendChatMessage
2187 ( LPDIRECTPLAY3A this, DPID a, DPID b, DWORD c, LPDPCHAT d )
2189 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", this, a, b, c, d );
2193 HRESULT WINAPI DirectPlay3W_SendChatMessage
2194 ( LPDIRECTPLAY3 this, DPID a, DPID b, DWORD c, LPDPCHAT d )
2196 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", this, a, b, c, d );
2200 HRESULT WINAPI DirectPlay3A_SetGroupConnectionSettings
2201 ( LPDIRECTPLAY3A this, DWORD a, DPID b, LPDPLCONNECTION c )
2203 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p): stub", this, a, b, c );
2207 HRESULT WINAPI DirectPlay3W_SetGroupConnectionSettings
2208 ( LPDIRECTPLAY3 this, DWORD a, DPID b, LPDPLCONNECTION c )
2210 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p): stub", this, a, b, c );
2214 HRESULT WINAPI DirectPlay3A_StartSession
2215 ( LPDIRECTPLAY3A this, DWORD a, DPID b )
2217 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
2221 HRESULT WINAPI DirectPlay3W_StartSession
2222 ( LPDIRECTPLAY3 this, DWORD a, DPID b )
2224 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", this, a, b );
2228 HRESULT WINAPI DirectPlay3A_GetGroupFlags
2229 ( LPDIRECTPLAY3A this, DPID a, LPDWORD b )
2231 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
2235 HRESULT WINAPI DirectPlay3W_GetGroupFlags
2236 ( LPDIRECTPLAY3 this, DPID a, LPDWORD b )
2238 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
2242 HRESULT WINAPI DirectPlay3A_GetGroupParent
2243 ( LPDIRECTPLAY3A this, DPID a, LPDPID b )
2245 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
2249 HRESULT WINAPI DirectPlay3W_GetGroupParent
2250 ( LPDIRECTPLAY3 this, DPID a, LPDPID b )
2252 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
2256 HRESULT WINAPI DirectPlay3A_GetPlayerAccount
2257 ( LPDIRECTPLAY3A this, DPID a, DWORD b, LPVOID c, LPDWORD d )
2259 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a, b, c, d );
2263 HRESULT WINAPI DirectPlay3W_GetPlayerAccount
2264 ( LPDIRECTPLAY3 this, DPID a, DWORD b, LPVOID c, LPDWORD d )
2266 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", this, a, b, c, d );
2270 HRESULT WINAPI DirectPlay3A_GetPlayerFlags
2271 ( LPDIRECTPLAY3A this, DPID a, LPDWORD b )
2273 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
2277 HRESULT WINAPI DirectPlay3W_GetPlayerFlags
2278 ( LPDIRECTPLAY3 this, DPID a, LPDWORD b )
2280 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", this, a, b );
2284 static struct tagLPDIRECTPLAY2_VTABLE directPlay2WVT = {
2285 DirectPlay2W_QueryInterface,
2286 (void*)DirectPlay3W_AddRef,
2287 (void*)DirectPlay3W_Release,
2288 (void*)DirectPlay3W_AddPlayerToGroup,
2289 (void*)DirectPlay3W_Close,
2290 (void*)DirectPlay3W_CreateGroup,
2291 (void*)DirectPlay3W_CreatePlayer,
2292 (void*)DirectPlay3W_DeletePlayerFromGroup,
2293 (void*)DirectPlay3W_DestroyGroup,
2294 (void*)DirectPlay3W_DestroyPlayer,
2295 (void*)DirectPlay3W_EnumGroupPlayers,
2296 (void*)DirectPlay3W_EnumGroups,
2297 (void*)DirectPlay3W_EnumPlayers,
2298 (void*)DirectPlay3W_EnumSessions,
2299 (void*)DirectPlay3W_GetCaps,
2300 (void*)DirectPlay3W_GetGroupData,
2301 (void*)DirectPlay3W_GetGroupName,
2302 (void*)DirectPlay3W_GetMessageCount,
2303 (void*)DirectPlay3W_GetPlayerAddress,
2304 (void*)DirectPlay3W_GetPlayerCaps,
2305 (void*)DirectPlay3W_GetPlayerData,
2306 (void*)DirectPlay3W_GetPlayerName,
2307 (void*)DirectPlay3W_GetSessionDesc,
2308 (void*)DirectPlay3W_Initialize,
2309 (void*)DirectPlay3W_Open,
2310 (void*)DirectPlay3W_Receive,
2311 (void*)DirectPlay3W_Send,
2312 (void*)DirectPlay3W_SetGroupData,
2313 (void*)DirectPlay3W_SetGroupName,
2314 (void*)DirectPlay3W_SetPlayerData,
2315 (void*)DirectPlay3W_SetPlayerName,
2316 (void*)DirectPlay3W_SetSessionDesc
2319 static struct tagLPDIRECTPLAY2_VTABLE directPlay2AVT = {
2320 DirectPlay2A_QueryInterface,
2321 (void*)DirectPlay3W_AddRef,
2322 (void*)DirectPlay3A_Release,
2323 (void*)DirectPlay3A_AddPlayerToGroup,
2324 (void*)DirectPlay3A_Close,
2325 (void*)DirectPlay3A_CreateGroup,
2326 (void*)DirectPlay3A_CreatePlayer,
2327 (void*)DirectPlay3A_DeletePlayerFromGroup,
2328 (void*)DirectPlay3A_DestroyGroup,
2329 (void*)DirectPlay3A_DestroyPlayer,
2330 (void*)DirectPlay3A_EnumGroupPlayers,
2331 (void*)DirectPlay3A_EnumGroups,
2332 (void*)DirectPlay3A_EnumPlayers,
2333 (void*)DirectPlay3A_EnumSessions,
2334 (void*)DirectPlay3A_GetCaps,
2335 (void*)DirectPlay3A_GetGroupData,
2336 (void*)DirectPlay3A_GetGroupName,
2337 (void*)DirectPlay3A_GetMessageCount,
2338 (void*)DirectPlay3A_GetPlayerAddress,
2339 (void*)DirectPlay3A_GetPlayerCaps,
2340 (void*)DirectPlay3A_GetPlayerData,
2341 (void*)DirectPlay3A_GetPlayerName,
2342 (void*)DirectPlay3A_GetSessionDesc,
2343 (void*)DirectPlay3A_Initialize,
2344 (void*)DirectPlay3A_Open,
2345 (void*)DirectPlay3A_Receive,
2346 (void*)DirectPlay3A_Send,
2347 (void*)DirectPlay3A_SetGroupData,
2348 (void*)DirectPlay3A_SetGroupName,
2349 (void*)DirectPlay3A_SetPlayerData,
2350 (void*)DirectPlay3A_SetPlayerName,
2351 (void*)DirectPlay3A_SetSessionDesc
2354 static struct tagLPDIRECTPLAY3_VTABLE directPlay3AVT = {
2355 DirectPlay3A_QueryInterface,
2356 (void*)DirectPlay3W_AddRef,
2357 DirectPlay3A_Release,
2358 DirectPlay3A_AddPlayerToGroup,
2360 DirectPlay3A_CreateGroup,
2361 DirectPlay3A_CreatePlayer,
2362 DirectPlay3A_DeletePlayerFromGroup,
2363 DirectPlay3A_DestroyGroup,
2364 DirectPlay3A_DestroyPlayer,
2365 DirectPlay3A_EnumGroupPlayers,
2366 DirectPlay3A_EnumGroups,
2367 DirectPlay3A_EnumPlayers,
2368 DirectPlay3A_EnumSessions,
2369 DirectPlay3A_GetCaps,
2370 DirectPlay3A_GetGroupData,
2371 DirectPlay3A_GetGroupName,
2372 DirectPlay3A_GetMessageCount,
2373 DirectPlay3A_GetPlayerAddress,
2374 DirectPlay3A_GetPlayerCaps,
2375 DirectPlay3A_GetPlayerData,
2376 DirectPlay3A_GetPlayerName,
2377 DirectPlay3A_GetSessionDesc,
2378 DirectPlay3A_Initialize,
2380 DirectPlay3A_Receive,
2382 DirectPlay3A_SetGroupData,
2383 DirectPlay3A_SetGroupName,
2384 DirectPlay3A_SetPlayerData,
2385 DirectPlay3A_SetPlayerName,
2386 DirectPlay3A_SetSessionDesc,
2388 DirectPlay3A_AddGroupToGroup,
2389 DirectPlay3A_CreateGroupInGroup,
2390 DirectPlay3A_DeleteGroupFromGroup,
2391 DirectPlay3A_EnumConnections,
2392 DirectPlay3A_EnumGroupsInGroup,
2393 DirectPlay3A_GetGroupConnectionSettings,
2394 DirectPlay3A_InitializeConnection,
2395 DirectPlay3A_SecureOpen,
2396 DirectPlay3A_SendChatMessage,
2397 DirectPlay3A_SetGroupConnectionSettings,
2398 DirectPlay3A_StartSession,
2399 DirectPlay3A_GetGroupFlags,
2400 DirectPlay3A_GetGroupParent,
2401 DirectPlay3A_GetPlayerAccount,
2402 DirectPlay3A_GetPlayerFlags
2405 static struct tagLPDIRECTPLAY3_VTABLE directPlay3WVT = {
2406 DirectPlay3W_QueryInterface,
2407 DirectPlay3W_AddRef,
2408 DirectPlay3W_Release,
2409 DirectPlay3W_AddPlayerToGroup,
2411 DirectPlay3W_CreateGroup,
2412 DirectPlay3W_CreatePlayer,
2413 DirectPlay3W_DeletePlayerFromGroup,
2414 DirectPlay3W_DestroyGroup,
2415 DirectPlay3W_DestroyPlayer,
2416 DirectPlay3W_EnumGroupPlayers,
2417 DirectPlay3W_EnumGroups,
2418 DirectPlay3W_EnumPlayers,
2419 DirectPlay3W_EnumSessions,
2420 DirectPlay3W_GetCaps,
2421 DirectPlay3W_GetGroupData,
2422 DirectPlay3W_GetGroupName,
2423 DirectPlay3W_GetMessageCount,
2424 DirectPlay3W_GetPlayerAddress,
2425 DirectPlay3W_GetPlayerCaps,
2426 DirectPlay3W_GetPlayerData,
2427 DirectPlay3W_GetPlayerName,
2428 DirectPlay3W_GetSessionDesc,
2429 DirectPlay3W_Initialize,
2431 DirectPlay3W_Receive,
2433 DirectPlay3W_SetGroupData,
2434 DirectPlay3W_SetGroupName,
2435 DirectPlay3W_SetPlayerData,
2436 DirectPlay3W_SetPlayerName,
2437 DirectPlay3W_SetSessionDesc,
2439 DirectPlay3W_AddGroupToGroup,
2440 DirectPlay3W_CreateGroupInGroup,
2441 DirectPlay3W_DeleteGroupFromGroup,
2442 DirectPlay3W_EnumConnections,
2443 DirectPlay3W_EnumGroupsInGroup,
2444 DirectPlay3W_GetGroupConnectionSettings,
2445 DirectPlay3W_InitializeConnection,
2446 DirectPlay3W_SecureOpen,
2447 DirectPlay3W_SendChatMessage,
2448 DirectPlay3W_SetGroupConnectionSettings,
2449 DirectPlay3W_StartSession,
2450 DirectPlay3W_GetGroupFlags,
2451 DirectPlay3W_GetGroupParent,
2452 DirectPlay3W_GetPlayerAccount,
2453 DirectPlay3W_GetPlayerFlags