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 DEFAULT_DEBUG_CHANNEL(dplay)
19 /*****************************************************************************
20 * Predeclare the interface implementation structures
22 typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyImpl;
23 typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyAImpl;
24 typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyWImpl;
25 typedef struct IDirectPlayLobby2Impl IDirectPlayLobby2Impl;
26 typedef struct IDirectPlayLobby2Impl IDirectPlayLobby2AImpl;
27 typedef struct IDirectPlay2Impl IDirectPlay2Impl;
28 typedef struct IDirectPlay2Impl IDirectPlay2AImpl;
29 typedef struct IDirectPlay3Impl IDirectPlay3Impl;
30 typedef struct IDirectPlay3Impl IDirectPlay3AImpl;
32 /*****************************************************************************
33 * IDirectPlayLobby implementation structure
35 struct IDirectPlayLobbyImpl
38 ICOM_VTABLE(IDirectPlayLobby)* lpvtbl;
40 /* IDirectPlayLobbyImpl fields */
42 DPSESSIONDESC2 sessionDesc;
49 /*****************************************************************************
50 * IDirectPlayLobby2 implementation structure
52 struct IDirectPlayLobby2Impl
55 ICOM_VTABLE(IDirectPlayLobby2)* lpvtbl;
57 /* IDirectPlayLobby2Impl fields */
59 DPSESSIONDESC2 lpSessionDesc;
66 /*****************************************************************************
67 * IDirectPlay2 implementation structure
69 struct IDirectPlay2Impl
72 ICOM_VTABLE(IDirectPlay2)* lpvtbl;
74 /* IDirectPlay2Impl fields */
78 /*****************************************************************************
79 * IDirectPlay3 implementation structure
81 struct IDirectPlay3Impl
84 ICOM_VTABLE(IDirectPlay3)* lpvtbl;
86 /* IDirectPlay3Impl fields */
90 /* Forward declarations of virtual tables */
91 static ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyAVT;
92 static ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyWVT;
93 static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2AVT;
94 static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2WVT;
95 static ICOM_VTABLE(IDirectPlay2) directPlay2WVT;
96 static ICOM_VTABLE(IDirectPlay2) directPlay2AVT;
97 static ICOM_VTABLE(IDirectPlay3) directPlay3WVT;
98 static ICOM_VTABLE(IDirectPlay3) directPlay3AVT;
103 /* Routine called when starting up the server thread */
104 DWORD DPLobby_Spawn_Server( LPVOID startData )
106 DPSESSIONDESC2* lpSession = (DPSESSIONDESC2*) startData;
107 DWORD sessionDwFlags = lpSession->dwFlags;
109 TRACE( dplay, "spawing thread for lpConn=%p dwFlags=%08lx\n", lpSession, sessionDwFlags );
110 FIXME( dplay, "thread needs something to do\n" );
115 /* Check out the connection flags to determine what to do. Ensure we have
116 no leftover bits in this structure */
117 if( sessionDwFlags & DPSESSION_CLIENTSERVER )
119 /* This indicates that the application which is requesting the creation
120 * of this session is going to be the server (application/player)
122 if( sessionDwFlags & DPSESSION_SECURESERVER )
124 sessionDwFlags &= ~DPSESSION_SECURESERVER;
126 sessionDwFlags &= ~DPSESSION_CLIENTSERVER;
129 if( sessionDwFlags & DPSESSION_JOINDISABLED )
131 sessionDwFlags &= ~DPSESSION_JOINDISABLED;
134 if( sessionDwFlags & DPSESSION_KEEPALIVE )
136 sessionDwFlags &= ~DPSESSION_KEEPALIVE;
139 if( sessionDwFlags & DPSESSION_MIGRATEHOST )
141 sessionDwFlags &= ~DPSESSION_MIGRATEHOST;
144 if( sessionDwFlags & DPSESSION_MULTICASTSERVER )
146 sessionDwFlags &= ~DPSESSION_MULTICASTSERVER;
149 if( sessionDwFlags & DPSESSION_NEWPLAYERSDISABLED )
151 sessionDwFlags &= ~DPSESSION_NEWPLAYERSDISABLED;
154 if( sessionDwFlags & DPSESSION_NODATAMESSAGES )
156 sessionDwFlags &= ~DPSESSION_NODATAMESSAGES;
159 if( sessionDwFlags & DPSESSION_NOMESSAGEID )
161 sessionDwFlags &= ~DPSESSION_NOMESSAGEID;
164 if( sessionDwFlags & DPSESSION_PASSWORDREQUIRED )
166 sessionDwFlags &= ~DPSESSION_PASSWORDREQUIRED;
176 /*********************************************************
178 * Direct Play and Direct Play Lobby Interface Implementation
180 *********************************************************/
182 /* The COM interface for upversioning an interface
183 * We've been given a GUID (riid) and we need to replace the present
184 * interface with that of the requested interface.
186 * Snip from some Microsoft document:
187 * There are four requirements for implementations of QueryInterface (In these
188 * cases, "must succeed" means "must succeed barring catastrophic failure."):
190 * * The set of interfaces accessible on an object through
191 * IUnknown::QueryInterface must be static, not dynamic. This means that
192 * if a call to QueryInterface for a pointer to a specified interface
193 * succeeds the first time, it must succeed again, and if it fails the
194 * first time, it must fail on all subsequent queries.
195 * * It must be symmetric ~W if a client holds a pointer to an interface on
196 * an object, and queries for that interface, the call must succeed.
197 * * It must be reflexive ~W if a client holding a pointer to one interface
198 * queries successfully for another, a query through the obtained pointer
199 * for the first interface must succeed.
200 * * It must be transitive ~W if a client holding a pointer to one interface
201 * queries successfully for a second, and through that pointer queries
202 * successfully for a third interface, a query for the first interface
203 * through the pointer for the third interface must succeed.
205 * As you can see, this interface doesn't qualify but will most likely
206 * be good enough for the time being.
209 /* Helper function for DirectPlayLobby QueryInterface */
210 static HRESULT directPlayLobby_QueryInterface
211 ( REFIID riid, LPVOID* ppvObj )
214 if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) )
216 IDirectPlayLobbyImpl* lpDpL = (IDirectPlayLobbyImpl*)(*ppvObj);
218 lpDpL = (IDirectPlayLobbyImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
223 return E_NOINTERFACE;
226 lpDpL->lpvtbl = &directPlayLobbyWVT;
231 else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) )
233 IDirectPlayLobbyAImpl* lpDpL = (IDirectPlayLobbyAImpl*)(*ppvObj);
235 lpDpL = (IDirectPlayLobbyAImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
240 return E_NOINTERFACE;
243 lpDpL->lpvtbl = &directPlayLobbyAVT;
248 else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) )
250 IDirectPlayLobby2Impl* lpDpL = (IDirectPlayLobby2Impl*)(*ppvObj);
252 lpDpL = (IDirectPlayLobby2Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
257 return E_NOINTERFACE;
260 lpDpL->lpvtbl = &directPlayLobby2WVT;
265 else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) )
267 IDirectPlayLobby2AImpl* lpDpL = (IDirectPlayLobby2AImpl*)(*ppvObj);
269 lpDpL = (IDirectPlayLobby2AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
274 return E_NOINTERFACE;
277 lpDpL->lpvtbl = &directPlayLobby2AVT;
283 /* Unknown interface */
285 return E_NOINTERFACE;
287 static HRESULT WINAPI IDirectPlayLobbyAImpl_QueryInterface
288 ( LPDIRECTPLAYLOBBYA iface,
292 ICOM_THIS(IDirectPlayLobby2Impl,iface);
293 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
295 if( IsEqualGUID( &IID_IUnknown, riid ) ||
296 IsEqualGUID( &IID_IDirectPlayLobbyA, riid )
299 IDirectPlayLobby_AddRef( iface );
304 return directPlayLobby_QueryInterface( riid, ppvObj );
308 static HRESULT WINAPI IDirectPlayLobbyW_QueryInterface
309 ( LPDIRECTPLAYLOBBY iface,
313 ICOM_THIS(IDirectPlayLobbyImpl,iface);
314 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
316 if( IsEqualGUID( &IID_IUnknown, riid ) ||
317 IsEqualGUID( &IID_IDirectPlayLobby, riid )
320 IDirectPlayLobby_AddRef( iface );
325 return directPlayLobby_QueryInterface( riid, ppvObj );
329 static HRESULT WINAPI IDirectPlayLobby2AImpl_QueryInterface
330 ( LPDIRECTPLAYLOBBY2A iface,
334 ICOM_THIS(IDirectPlayLobby2Impl,iface);
335 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
337 /* Compare riids. We know this object is a direct play lobby 2A object.
338 If we are asking about the same type of interface we're fine.
340 if( IsEqualGUID( &IID_IUnknown, riid ) ||
341 IsEqualGUID( &IID_IDirectPlayLobby2A, riid )
344 IDirectPlayLobby2_AddRef( iface );
348 return directPlayLobby_QueryInterface( riid, ppvObj );
351 static HRESULT WINAPI IDirectPlayLobby2WImpl_QueryInterface
352 ( LPDIRECTPLAYLOBBY2 iface,
356 ICOM_THIS(IDirectPlayLobby2Impl,iface);
358 /* Compare riids. We know this object is a direct play lobby 2 object.
359 If we are asking about the same type of interface we're fine.
361 if( IsEqualGUID( &IID_IUnknown, riid ) ||
362 IsEqualGUID( &IID_IDirectPlayLobby2, riid )
365 IDirectPlayLobby2_AddRef( iface );
370 return directPlayLobby_QueryInterface( riid, ppvObj );
375 * Simple procedure. Just increment the reference count to this
376 * structure and return the new reference count.
378 static ULONG WINAPI IDirectPlayLobby2AImpl_AddRef
379 ( LPDIRECTPLAYLOBBY2A iface )
381 ICOM_THIS(IDirectPlayLobby2Impl,iface);
383 TRACE( dplay,"ref count now %lu\n", This->ref );
387 static ULONG WINAPI IDirectPlayLobby2WImpl_AddRef
388 ( LPDIRECTPLAYLOBBY2 iface )
390 ICOM_THIS(IDirectPlayLobby2Impl,iface);
391 return IDirectPlayLobby2AImpl_AddRef( (LPDIRECTPLAYLOBBY2) This );
396 * Simple COM procedure. Decrease the reference count to this object.
397 * If the object no longer has any reference counts, free up the associated
400 static ULONG WINAPI IDirectPlayLobby2AImpl_Release
401 ( LPDIRECTPLAYLOBBY2A iface )
403 ICOM_THIS(IDirectPlayLobby2Impl,iface);
404 TRACE( dplay, "ref count decremeneted from %lu\n", This->ref );
408 /* Deallocate if this is the last reference to the object */
411 FIXME( dplay, "memory leak\n" );
412 /* Implement memory deallocation */
414 HeapFree( GetProcessHeap(), 0, This );
422 static ULONG WINAPI IDirectPlayLobby2WImpl_Release
423 ( LPDIRECTPLAYLOBBY2 iface )
425 ICOM_THIS(IDirectPlayLobby2Impl,iface);
426 return IDirectPlayLobby2AImpl_Release( (LPDIRECTPLAYLOBBY2A) This );
430 /********************************************************************
432 * Connects an application to the session specified by the DPLCONNECTION
433 * structure currently stored with the DirectPlayLobby object.
435 * Returns a IDirectPlay interface.
438 static HRESULT WINAPI IDirectPlayLobby2AImpl_Connect
439 ( LPDIRECTPLAYLOBBY2A iface,
441 LPDIRECTPLAY2* lplpDP,
444 FIXME( dplay, ": dwFlags=%08lx %p %p stub\n", dwFlags, lplpDP, pUnk );
445 return DPERR_OUTOFMEMORY;
448 static HRESULT WINAPI IDirectPlayLobby2WImpl_Connect
449 ( LPDIRECTPLAYLOBBY2 iface,
451 LPDIRECTPLAY2* lplpDP,
454 ICOM_THIS(IDirectPlayLobby2Impl,iface);
455 LPDIRECTPLAY2* directPlay2W;
458 FIXME( dplay, "(%p)->(%08lx,%p,%p): stub\n", This, dwFlags, lplpDP, pUnk );
462 return DPERR_INVALIDPARAMS;
465 if( ( createRC = DirectPlayCreate( (LPGUID)&IID_IDirectPlayLobby2, lplpDP, pUnk ) ) != DP_OK )
467 ERR( dplay, "error creating Direct Play 2W interface. Return Code = %ld.\n", createRC );
471 /* This should invoke IDirectPlay3::InitializeConnection IDirectPlay3::Open */
472 directPlay2W = lplpDP;
478 /* All the stuff below this is WRONG! */
479 if( This->lpSession->dwFlags == DPLCONNECTION_CREATESESSION )
483 /* Spawn a thread to deal with all of this and to handle the incomming requests */
484 threadIdSink = CreateThread( NULL, 0, &DPLobby_Spawn_Server,
485 (LPVOID)This->lpSession->lpConn->lpSessionDesc, 0, &threadIdSink );
488 else if ( This->lpSession->dwFlags == DPLCONNECTION_JOINSESSION )
490 /* Let's search for a matching session */
491 FIXME( dplay, "joining session not yet supported.\n");
492 return DPERR_OUTOFMEMORY;
494 else /* Unknown type of connection request */
496 ERR( dplay, ": Unknown connection request lpConn->dwFlags=%08lx\n",
499 return DPERR_OUTOFMEMORY;
502 /* This does the work of the following methods...
503 IDirectPlay3::InitializeConnection,
504 IDirectPlay3::EnumSessions,
515 /********************************************************************
517 * Creates a DirectPlay Address, given a service provider-specific network
519 * Returns an address contains the globally unique identifier
520 * (GUID) of the service provider and data that the service provider can
521 * interpret as a network address.
524 static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateAddress
525 ( LPDIRECTPLAYLOBBY2A iface,
527 REFGUID guidDataType,
531 LPDWORD lpdwAddressSize )
533 FIXME( dplay, ":stub\n");
534 return DPERR_OUTOFMEMORY;
537 static HRESULT WINAPI IDirectPlayLobby2WImpl_CreateAddress
538 ( LPDIRECTPLAYLOBBY2 iface,
540 REFGUID guidDataType,
544 LPDWORD lpdwAddressSize )
546 FIXME( dplay, ":stub\n");
547 return DPERR_OUTOFMEMORY;
551 /********************************************************************
553 * Parses out chunks from the DirectPlay Address buffer by calling the
554 * given callback function, with lpContext, for each of the chunks.
557 static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumAddress
558 ( LPDIRECTPLAYLOBBY2A iface,
559 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
564 FIXME( dplay, ":stub\n");
565 return DPERR_OUTOFMEMORY;
568 static HRESULT WINAPI IDirectPlayLobby2WImpl_EnumAddress
569 ( LPDIRECTPLAYLOBBY2 iface,
570 LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
575 FIXME( dplay, ":stub\n");
576 return DPERR_OUTOFMEMORY;
579 /********************************************************************
581 * Enumerates all the address types that a given service provider needs to
582 * build the DirectPlay Address.
585 static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes
586 ( LPDIRECTPLAYLOBBYA iface,
587 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
592 FIXME( dplay, ":stub\n");
593 return DPERR_OUTOFMEMORY;
596 static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumAddressTypes
597 ( LPDIRECTPLAYLOBBY2A iface,
598 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
603 ICOM_THIS(IDirectPlayLobby2Impl,iface);
604 return IDirectPlayLobbyAImpl_EnumAddressTypes( (LPDIRECTPLAYLOBBYA)This, lpEnumAddressTypeCallback,
605 guidSP, lpContext, dwFlags );
608 static HRESULT WINAPI IDirectPlayLobby2WImpl_EnumAddressTypes
609 ( LPDIRECTPLAYLOBBY2 iface,
610 LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback,
615 FIXME( dplay, ":stub\n");
616 return DPERR_OUTOFMEMORY;
619 /********************************************************************
621 * Enumerates what applications are registered with DirectPlay by
622 * invoking the callback function with lpContext.
625 static HRESULT WINAPI IDirectPlayLobbyW_EnumLocalApplications
626 ( LPDIRECTPLAYLOBBY iface,
627 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
631 FIXME( dplay, ":stub\n");
632 return DPERR_OUTOFMEMORY;
635 static HRESULT WINAPI IDirectPlayLobby2WImpl_EnumLocalApplications
636 ( LPDIRECTPLAYLOBBY2 iface,
637 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
641 ICOM_THIS(IDirectPlayLobby2Impl,iface);
642 return IDirectPlayLobbyW_EnumLocalApplications( (LPDIRECTPLAYLOBBY)This, a,
643 lpContext, dwFlags );
646 static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumLocalApplications
647 ( LPDIRECTPLAYLOBBYA iface,
648 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
652 FIXME( dplay, ":stub\n");
653 return DPERR_OUTOFMEMORY;
656 static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumLocalApplications
657 ( LPDIRECTPLAYLOBBY2A iface,
658 LPDPLENUMLOCALAPPLICATIONSCALLBACK a,
662 ICOM_THIS(IDirectPlayLobby2Impl,iface);
663 return IDirectPlayLobbyAImpl_EnumLocalApplications( (LPDIRECTPLAYLOBBYA)This, a,
664 lpContext, dwFlags );
668 /********************************************************************
670 * Retrieves the DPLCONNECTION structure that contains all the information
671 * needed to start and connect an application. This was generated using
672 * either the RunApplication or SetConnectionSettings methods.
674 * NOTES: If lpData is NULL then just return lpdwDataSize. This allows
675 * the data structure to be allocated by our caller which can then
676 * call this procedure/method again with a valid data pointer.
678 static HRESULT WINAPI IDirectPlayLobbyAImpl_GetConnectionSettings
679 ( LPDIRECTPLAYLOBBYA iface,
682 LPDWORD lpdwDataSize )
684 ICOM_THIS(IDirectPlayLobbyImpl,iface);
685 LPDPLCONNECTION lpDplConnection;
687 FIXME( dplay, ": semi stub (%p)->(0x%08lx,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
689 /* Application is requesting us to give the required size */
692 /* Let's check the size of the buffer that the application has allocated */
693 if( *lpdwDataSize >= sizeof( DPLCONNECTION ) )
699 *lpdwDataSize = sizeof( DPLCONNECTION );
700 return DPERR_BUFFERTOOSMALL;
704 /* Fill in the fields - let them just use the ptrs */
705 lpDplConnection = (LPDPLCONNECTION)lpData;
707 /* Make sure we were given the right size */
708 if( lpDplConnection->dwSize < sizeof( DPLCONNECTION ) )
710 ERR( dplay, "bad passed size 0x%08lx.\n", lpDplConnection->dwSize );
711 return DPERR_INVALIDPARAMS;
714 /* Copy everything we've got into here */
715 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
716 lpDplConnection->dwFlags = This->dwConnFlags;
718 /* Copy LPDPSESSIONDESC2 struct */
719 lpDplConnection->lpSessionDesc = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( This->sessionDesc ) );
720 memcpy( lpDplConnection->lpSessionDesc, &(This->sessionDesc), sizeof( This->sessionDesc ) );
722 if( This->sessionDesc.sess.lpszSessionName )
724 lpDplConnection->lpSessionDesc->sess.lpszSessionName =
725 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->sessionDesc.sess.lpszSessionName );
728 if( This->sessionDesc.pass.lpszPassword )
730 lpDplConnection->lpSessionDesc->pass.lpszPassword =
731 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->sessionDesc.pass.lpszPassword );
734 /* I don't know what to use the reserved for. We'll set it to 0 just for fun */
735 This->sessionDesc.dwReserved1 = This->sessionDesc.dwReserved2 = 0;
737 /* Copy DPNAME struct - seems to be optional - check for existance first */
738 lpDplConnection->lpPlayerName = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( This->playerName ) );
739 memcpy( lpDplConnection->lpPlayerName, &(This->playerName), sizeof( This->playerName ) );
741 if( This->playerName.psn.lpszShortName )
743 lpDplConnection->lpPlayerName->psn.lpszShortName =
744 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->playerName.psn.lpszShortName );
747 if( This->playerName.pln.lpszLongName )
749 lpDplConnection->lpPlayerName->pln.lpszLongName =
750 HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, This->playerName.pln.lpszLongName );
755 memcpy( &(lpDplConnection->guidSP), &(This->guidSP), sizeof( This->guidSP ) );
757 lpDplConnection->lpAddress = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, This->dwAddressSize );
758 memcpy( lpDplConnection->lpAddress, This->lpAddress, This->dwAddressSize );
760 lpDplConnection->dwAddressSize = This->dwAddressSize;
765 static HRESULT WINAPI IDirectPlayLobby2AImpl_GetConnectionSettings
766 ( LPDIRECTPLAYLOBBY2A iface,
769 LPDWORD lpdwDataSize )
771 ICOM_THIS(IDirectPlayLobby2Impl,iface);
772 return IDirectPlayLobbyAImpl_GetConnectionSettings( (LPDIRECTPLAYLOBBYA)This,
773 dwAppID, lpData, lpdwDataSize );
776 static HRESULT WINAPI IDirectPlayLobbyWImpl_GetConnectionSettings
777 ( LPDIRECTPLAYLOBBY iface,
780 LPDWORD lpdwDataSize )
782 ICOM_THIS(IDirectPlayLobbyImpl,iface);
783 FIXME( dplay, ":semi stub %p %08lx %p %p \n", This, dwAppID, lpData, lpdwDataSize );
785 /* Application is requesting us to give the required size */
788 /* Let's check the size of the buffer that the application has allocated */
789 if( *lpdwDataSize >= sizeof( DPLCONNECTION ) )
795 *lpdwDataSize = sizeof( DPLCONNECTION );
796 return DPERR_BUFFERTOOSMALL;
800 /* Fill in the fields - let them just use the ptrs */
801 FIXME( dplay, "stub\n" );
806 static HRESULT WINAPI IDirectPlayLobby2WImpl_GetConnectionSettings
807 ( LPDIRECTPLAYLOBBY2 iface,
810 LPDWORD lpdwDataSize )
812 ICOM_THIS(IDirectPlayLobby2Impl,iface);
813 return IDirectPlayLobbyWImpl_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This,
814 dwAppID, lpData, lpdwDataSize );
817 /********************************************************************
819 * Retrieves the message sent between a lobby client and a DirectPlay
820 * application. All messages are queued until received.
823 static HRESULT WINAPI IDirectPlayLobbyAImpl_ReceiveLobbyMessage
824 ( LPDIRECTPLAYLOBBYA iface,
827 LPDWORD lpdwMessageFlags,
829 LPDWORD lpdwDataSize )
831 ICOM_THIS(IDirectPlayLobbyImpl,iface);
832 FIXME( dplay, ":stub %p %08lx %08lx %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
834 return DPERR_OUTOFMEMORY;
837 static HRESULT WINAPI IDirectPlayLobby2AImpl_ReceiveLobbyMessage
838 ( LPDIRECTPLAYLOBBY2A iface,
841 LPDWORD lpdwMessageFlags,
843 LPDWORD lpdwDataSize )
845 ICOM_THIS(IDirectPlayLobby2Impl,iface);
846 return IDirectPlayLobbyAImpl_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBYA)This, dwFlags, dwAppID,
847 lpdwMessageFlags, lpData, lpdwDataSize );
851 static HRESULT WINAPI IDirectPlayLobbyW_ReceiveLobbyMessage
852 ( LPDIRECTPLAYLOBBY iface,
855 LPDWORD lpdwMessageFlags,
857 LPDWORD lpdwDataSize )
859 ICOM_THIS(IDirectPlayLobbyImpl,iface);
860 FIXME( dplay, ":stub %p %08lx %08lx %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
862 return DPERR_OUTOFMEMORY;
865 static HRESULT WINAPI IDirectPlayLobby2WImpl_ReceiveLobbyMessage
866 ( LPDIRECTPLAYLOBBY2 iface,
869 LPDWORD lpdwMessageFlags,
871 LPDWORD lpdwDataSize )
873 ICOM_THIS(IDirectPlayLobby2Impl,iface);
874 return IDirectPlayLobbyW_ReceiveLobbyMessage( (LPDIRECTPLAYLOBBY)This, dwFlags, dwAppID,
875 lpdwMessageFlags, lpData, lpdwDataSize );
878 /********************************************************************
880 * Starts an application and passes to it all the information to
881 * connect to a session.
884 static HRESULT WINAPI IDirectPlayLobbyAImpl_RunApplication
885 ( LPDIRECTPLAYLOBBYA iface,
888 LPDPLCONNECTION lpConn,
889 HANDLE hReceiveEvent )
891 FIXME( dplay, ":stub\n");
892 return DPERR_OUTOFMEMORY;
895 static HRESULT WINAPI IDirectPlayLobby2AImpl_RunApplication
896 ( LPDIRECTPLAYLOBBY2A iface,
899 LPDPLCONNECTION lpConn,
900 HANDLE hReceiveEvent )
902 ICOM_THIS(IDirectPlayLobby2Impl,iface);
903 return IDirectPlayLobbyAImpl_RunApplication( (LPDIRECTPLAYLOBBYA)This, dwFlags,
904 lpdwAppID, lpConn, hReceiveEvent );
907 static HRESULT WINAPI IDirectPlayLobbyW_RunApplication
908 ( LPDIRECTPLAYLOBBY iface,
911 LPDPLCONNECTION lpConn,
912 HANDLE hReceiveEvent )
914 FIXME( dplay, ":stub\n");
915 return DPERR_OUTOFMEMORY;
918 static HRESULT WINAPI IDirectPlayLobby2WImpl_RunApplication
919 ( LPDIRECTPLAYLOBBY2 iface,
922 LPDPLCONNECTION lpConn,
923 HANDLE hReceiveEvent )
925 ICOM_THIS(IDirectPlayLobby2Impl,iface);
926 return IDirectPlayLobbyW_RunApplication( (LPDIRECTPLAYLOBBY)This, dwFlags,
927 lpdwAppID, lpConn, hReceiveEvent );
931 /********************************************************************
933 * Sends a message between the application and the lobby client.
934 * All messages are queued until received.
937 static HRESULT WINAPI IDirectPlayLobbyAImpl_SendLobbyMessage
938 ( LPDIRECTPLAYLOBBYA iface,
944 FIXME( dplay, ":stub\n");
945 return DPERR_OUTOFMEMORY;
948 static HRESULT WINAPI IDirectPlayLobby2AImpl_SendLobbyMessage
949 ( LPDIRECTPLAYLOBBY2A iface,
955 ICOM_THIS(IDirectPlayLobby2Impl,iface);
956 return IDirectPlayLobbyAImpl_SendLobbyMessage( (LPDIRECTPLAYLOBBYA)This, dwFlags,
957 dwAppID, lpData, dwDataSize );
961 static HRESULT WINAPI IDirectPlayLobbyW_SendLobbyMessage
962 ( LPDIRECTPLAYLOBBY iface,
968 FIXME( dplay, ":stub\n");
969 return DPERR_OUTOFMEMORY;
972 static HRESULT WINAPI IDirectPlayLobby2WImpl_SendLobbyMessage
973 ( LPDIRECTPLAYLOBBY2 iface,
979 ICOM_THIS(IDirectPlayLobby2Impl,iface);
980 return IDirectPlayLobbyW_SendLobbyMessage( (LPDIRECTPLAYLOBBY)This, dwFlags,
981 dwAppID, lpData, dwDataSize );
984 /********************************************************************
986 * Modifies the DPLCONNECTION structure to contain all information
987 * needed to start and connect an application.
990 static HRESULT WINAPI IDirectPlayLobbyW_SetConnectionSettings
991 ( LPDIRECTPLAYLOBBY iface,
994 LPDPLCONNECTION lpConn )
996 ICOM_THIS(IDirectPlayLobbyImpl,iface);
997 TRACE( dplay, ": This=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p\n",
998 This, dwFlags, dwAppID, lpConn );
1000 /* Paramater check */
1001 if( dwFlags || !This || !lpConn )
1003 ERR( dplay, "invalid parameters.\n");
1004 return DPERR_INVALIDPARAMS;
1007 /* See if there is a connection associated with this request.
1008 * dwAppID == 0 indicates that this request isn't associated with a connection.
1012 FIXME( dplay, ": Connection dwAppID=%08lx given. Not implemented yet.\n",
1015 /* Need to add a check for this application Id...*/
1016 return DPERR_NOTLOBBIED;
1019 if( lpConn->dwSize != sizeof(DPLCONNECTION) )
1021 ERR( dplay, ": old/new DPLCONNECTION type? Size=%08lx vs. expected=%ul bytes\n",
1022 lpConn->dwSize, sizeof( DPLCONNECTION ) );
1023 return DPERR_INVALIDPARAMS;
1026 /* Need to investigate the lpConn->lpSessionDesc to figure out
1027 * what type of session we need to join/create.
1029 if( (!lpConn->lpSessionDesc ) ||
1030 ( lpConn->lpSessionDesc->dwSize != sizeof( DPSESSIONDESC2 ) )
1033 ERR( dplay, "DPSESSIONDESC passed in? Size=%08lx vs. expected=%ul bytes\n",
1034 lpConn->lpSessionDesc->dwSize, sizeof( DPSESSIONDESC2 ) );
1035 return DPERR_INVALIDPARAMS;
1038 /* Need to actually store the stuff here. Check if we've already allocated each field first. */
1039 This->dwConnFlags = lpConn->dwFlags;
1041 /* Copy LPDPSESSIONDESC2 struct - this is required */
1042 memcpy( &(This->sessionDesc), lpConn->lpSessionDesc, sizeof( *(lpConn->lpSessionDesc) ) );
1044 if( lpConn->lpSessionDesc->sess.lpszSessionName )
1045 This->sessionDesc.sess.lpszSessionName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpSessionDesc->sess.lpszSessionName );
1047 This->sessionDesc.sess.lpszSessionName = NULL;
1049 if( lpConn->lpSessionDesc->pass.lpszPassword )
1050 This->sessionDesc.pass.lpszPassword = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpSessionDesc->pass.lpszPassword );
1052 This->sessionDesc.pass.lpszPassword = NULL;
1054 /* I don't know what to use the reserved for ... */
1055 This->sessionDesc.dwReserved1 = This->sessionDesc.dwReserved2 = 0;
1057 /* Copy DPNAME struct - seems to be optional - check for existance first */
1058 if( lpConn->lpPlayerName )
1060 memcpy( &(This->playerName), lpConn->lpPlayerName, sizeof( *lpConn->lpPlayerName ) );
1062 if( lpConn->lpPlayerName->psn.lpszShortName )
1063 This->playerName.psn.lpszShortName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpPlayerName->psn.lpszShortName );
1065 if( lpConn->lpPlayerName->pln.lpszLongName )
1066 This->playerName.pln.lpszLongName = HEAP_strdupW( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->lpPlayerName->pln.lpszLongName );
1070 memcpy( &(This->guidSP), &(lpConn->guidSP), sizeof( lpConn->guidSP ) );
1072 This->lpAddress = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpConn->dwAddressSize );
1073 memcpy( This->lpAddress, lpConn->lpAddress, lpConn->dwAddressSize );
1075 This->dwAddressSize = lpConn->dwAddressSize;
1080 static HRESULT WINAPI IDirectPlayLobby2WImpl_SetConnectionSettings
1081 ( LPDIRECTPLAYLOBBY2 iface,
1084 LPDPLCONNECTION lpConn )
1086 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1087 return IDirectPlayLobbyW_SetConnectionSettings( (LPDIRECTPLAYLOBBY)This,
1088 dwFlags, dwAppID, lpConn );
1091 static HRESULT WINAPI IDirectPlayLobbyAImpl_SetConnectionSettings
1092 ( LPDIRECTPLAYLOBBYA iface,
1095 LPDPLCONNECTION lpConn )
1097 ICOM_THIS(IDirectPlayLobbyImpl,iface);
1098 FIXME( dplay, ": This=%p, dwFlags=%08lx, dwAppId=%08lx, lpConn=%p: stub\n",
1099 This, dwFlags, dwAppID, lpConn );
1100 return DPERR_OUTOFMEMORY;
1103 static HRESULT WINAPI IDirectPlayLobby2AImpl_SetConnectionSettings
1104 ( LPDIRECTPLAYLOBBY2A iface,
1107 LPDPLCONNECTION lpConn )
1109 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1110 return IDirectPlayLobbyAImpl_SetConnectionSettings( (LPDIRECTPLAYLOBBYA)This,
1111 dwFlags, dwAppID, lpConn );
1114 /********************************************************************
1116 * Registers an event that will be set when a lobby message is received.
1119 static HRESULT WINAPI IDirectPlayLobbyAImpl_SetLobbyMessageEvent
1120 ( LPDIRECTPLAYLOBBYA iface,
1123 HANDLE hReceiveEvent )
1125 FIXME( dplay, ":stub\n");
1126 return DPERR_OUTOFMEMORY;
1129 static HRESULT WINAPI IDirectPlayLobby2AImpl_SetLobbyMessageEvent
1130 ( LPDIRECTPLAYLOBBY2A iface,
1133 HANDLE hReceiveEvent )
1135 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1136 return IDirectPlayLobbyAImpl_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBYA)This, dwFlags,
1137 dwAppID, hReceiveEvent );
1140 static HRESULT WINAPI IDirectPlayLobbyW_SetLobbyMessageEvent
1141 ( LPDIRECTPLAYLOBBY iface,
1144 HANDLE hReceiveEvent )
1146 FIXME( dplay, ":stub\n");
1147 return DPERR_OUTOFMEMORY;
1150 static HRESULT WINAPI IDirectPlayLobby2WImpl_SetLobbyMessageEvent
1151 ( LPDIRECTPLAYLOBBY2 iface,
1154 HANDLE hReceiveEvent )
1156 ICOM_THIS(IDirectPlayLobby2Impl,iface);
1157 return IDirectPlayLobbyW_SetLobbyMessageEvent( (LPDIRECTPLAYLOBBY)This, dwFlags,
1158 dwAppID, hReceiveEvent );
1162 /********************************************************************
1164 * Registers an event that will be set when a lobby message is received.
1167 static HRESULT WINAPI IDirectPlayLobby2WImpl_CreateCompoundAddress
1168 ( LPDIRECTPLAYLOBBY2 iface,
1169 LPCDPCOMPOUNDADDRESSELEMENT lpElements,
1170 DWORD dwElementCount,
1172 LPDWORD lpdwAddressSize )
1174 FIXME( dplay, ":stub\n");
1175 return DPERR_OUTOFMEMORY;
1178 static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateCompoundAddress
1179 ( LPDIRECTPLAYLOBBY2A iface,
1180 LPCDPCOMPOUNDADDRESSELEMENT lpElements,
1181 DWORD dwElementCount,
1183 LPDWORD lpdwAddressSize )
1185 FIXME( dplay, ":stub\n");
1186 return DPERR_OUTOFMEMORY;
1190 /* Note: Hack so we can reuse the old functions without compiler warnings */
1191 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
1192 # define XCAST(fun) (typeof(directPlayLobbyAVT.fn##fun))
1194 # define XCAST(fun) (void*)
1197 /* Direct Play Lobby 1 (ascii) Virtual Table for methods */
1198 /* All lobby 1 methods are exactly the same except QueryInterface */
1199 static struct ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyAVT =
1201 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1202 IDirectPlayLobbyAImpl_QueryInterface,
1203 XCAST(AddRef)IDirectPlayLobby2AImpl_AddRef,
1204 XCAST(Release)IDirectPlayLobby2AImpl_Release,
1205 XCAST(Connect)IDirectPlayLobby2AImpl_Connect,
1206 XCAST(CreateAddress)IDirectPlayLobby2AImpl_CreateAddress,
1207 XCAST(EnumAddress)IDirectPlayLobby2AImpl_EnumAddress,
1208 XCAST(EnumAddressTypes)IDirectPlayLobby2AImpl_EnumAddressTypes,
1209 XCAST(EnumLocalApplications)IDirectPlayLobby2AImpl_EnumLocalApplications,
1210 XCAST(GetConnectionSettings)IDirectPlayLobby2AImpl_GetConnectionSettings,
1211 XCAST(ReceiveLobbyMessage)IDirectPlayLobby2AImpl_ReceiveLobbyMessage,
1212 XCAST(RunApplication)IDirectPlayLobby2AImpl_RunApplication,
1213 XCAST(SendLobbyMessage)IDirectPlayLobby2AImpl_SendLobbyMessage,
1214 XCAST(SetConnectionSettings)IDirectPlayLobby2AImpl_SetConnectionSettings,
1215 XCAST(SetLobbyMessageEvent)IDirectPlayLobby2AImpl_SetLobbyMessageEvent
1220 /* Note: Hack so we can reuse the old functions without compiler warnings */
1221 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
1222 # define XCAST(fun) (typeof(directPlayLobbyWVT.fn##fun))
1224 # define XCAST(fun) (void*)
1227 /* Direct Play Lobby 1 (unicode) Virtual Table for methods */
1228 static ICOM_VTABLE(IDirectPlayLobby) directPlayLobbyWVT =
1230 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1231 IDirectPlayLobbyW_QueryInterface,
1232 XCAST(AddRef)IDirectPlayLobby2WImpl_AddRef,
1233 XCAST(Release)IDirectPlayLobby2WImpl_Release,
1234 XCAST(Connect)IDirectPlayLobby2WImpl_Connect,
1235 XCAST(CreateAddress)IDirectPlayLobby2WImpl_CreateAddress,
1236 XCAST(EnumAddress)IDirectPlayLobby2WImpl_EnumAddress,
1237 XCAST(EnumAddressTypes)IDirectPlayLobby2WImpl_EnumAddressTypes,
1238 XCAST(EnumLocalApplications)IDirectPlayLobby2WImpl_EnumLocalApplications,
1239 XCAST(GetConnectionSettings)IDirectPlayLobby2WImpl_GetConnectionSettings,
1240 XCAST(ReceiveLobbyMessage)IDirectPlayLobby2WImpl_ReceiveLobbyMessage,
1241 XCAST(RunApplication)IDirectPlayLobby2WImpl_RunApplication,
1242 XCAST(SendLobbyMessage)IDirectPlayLobby2WImpl_SendLobbyMessage,
1243 XCAST(SetConnectionSettings)IDirectPlayLobby2WImpl_SetConnectionSettings,
1244 XCAST(SetLobbyMessageEvent)IDirectPlayLobby2WImpl_SetLobbyMessageEvent
1249 /* Direct Play Lobby 2 (ascii) Virtual Table for methods */
1250 static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2AVT =
1252 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1253 IDirectPlayLobby2AImpl_QueryInterface,
1254 IDirectPlayLobby2AImpl_AddRef,
1255 IDirectPlayLobby2AImpl_Release,
1256 IDirectPlayLobby2AImpl_Connect,
1257 IDirectPlayLobby2AImpl_CreateAddress,
1258 IDirectPlayLobby2AImpl_EnumAddress,
1259 IDirectPlayLobby2AImpl_EnumAddressTypes,
1260 IDirectPlayLobby2AImpl_EnumLocalApplications,
1261 IDirectPlayLobby2AImpl_GetConnectionSettings,
1262 IDirectPlayLobby2AImpl_ReceiveLobbyMessage,
1263 IDirectPlayLobby2AImpl_RunApplication,
1264 IDirectPlayLobby2AImpl_SendLobbyMessage,
1265 IDirectPlayLobby2AImpl_SetConnectionSettings,
1266 IDirectPlayLobby2AImpl_SetLobbyMessageEvent,
1267 IDirectPlayLobby2AImpl_CreateCompoundAddress
1270 /* Direct Play Lobby 2 (unicode) Virtual Table for methods */
1271 static ICOM_VTABLE(IDirectPlayLobby2) directPlayLobby2WVT =
1273 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1274 IDirectPlayLobby2WImpl_QueryInterface,
1275 IDirectPlayLobby2WImpl_AddRef,
1276 IDirectPlayLobby2WImpl_Release,
1277 IDirectPlayLobby2WImpl_Connect,
1278 IDirectPlayLobby2WImpl_CreateAddress,
1279 IDirectPlayLobby2WImpl_EnumAddress,
1280 IDirectPlayLobby2WImpl_EnumAddressTypes,
1281 IDirectPlayLobby2WImpl_EnumLocalApplications,
1282 IDirectPlayLobby2WImpl_GetConnectionSettings,
1283 IDirectPlayLobby2WImpl_ReceiveLobbyMessage,
1284 IDirectPlayLobby2WImpl_RunApplication,
1285 IDirectPlayLobby2WImpl_SendLobbyMessage,
1286 IDirectPlayLobby2WImpl_SetConnectionSettings,
1287 IDirectPlayLobby2WImpl_SetLobbyMessageEvent,
1288 IDirectPlayLobby2WImpl_CreateCompoundAddress
1291 /***************************************************************************
1292 * DirectPlayLobbyCreateA (DPLAYX.4)
1295 HRESULT WINAPI DirectPlayLobbyCreateA( LPGUID lpGUIDDSP,
1296 LPDIRECTPLAYLOBBYA *lplpDPL,
1301 IDirectPlayLobbyAImpl** ilplpDPL=(IDirectPlayLobbyAImpl**)lplpDPL;
1302 TRACE(dplay,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1303 lpGUIDDSP,ilplpDPL,lpUnk,lpData,dwDataSize);
1305 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1306 * equal 0. These fields are mostly for future expansion.
1308 if ( lpGUIDDSP || lpUnk || lpData || dwDataSize )
1311 return DPERR_INVALIDPARAMS;
1314 /* Yes...really we should be returning a lobby 1 object */
1315 *ilplpDPL = (IDirectPlayLobbyAImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1316 sizeof( IDirectPlayLobbyAImpl ) );
1320 return DPERR_OUTOFMEMORY;
1323 (*ilplpDPL)->lpvtbl = &directPlayLobbyAVT;
1324 (*ilplpDPL)->ref = 1;
1326 /* All fields were nulled out by the allocation */
1331 /***************************************************************************
1332 * DirectPlayLobbyCreateW (DPLAYX.5)
1335 HRESULT WINAPI DirectPlayLobbyCreateW( LPGUID lpGUIDDSP,
1336 LPDIRECTPLAYLOBBY *lplpDPL,
1341 IDirectPlayLobbyImpl** ilplpDPL=(IDirectPlayLobbyImpl**)lplpDPL;
1342 TRACE(dplay,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1343 lpGUIDDSP,ilplpDPL,lpUnk,lpData,dwDataSize);
1345 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1346 * equal 0. These fields are mostly for future expansion.
1348 if ( lpGUIDDSP || lpUnk || lpData || dwDataSize )
1351 ERR( dplay, "Bad parameters!\n" );
1352 return DPERR_INVALIDPARAMS;
1355 /* Yes...really we should bre returning a lobby 1 object */
1356 *ilplpDPL = (IDirectPlayLobbyImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1357 sizeof( IDirectPlayLobbyImpl ) );
1361 return DPERR_OUTOFMEMORY;
1364 (*ilplpDPL)->lpvtbl = &directPlayLobbyWVT;
1365 (*ilplpDPL)->ref = 1;
1367 /* All fields were nulled out by the allocation */
1373 /***************************************************************************
1374 * DirectPlayEnumerateA (DPLAYX.2)
1376 * The pointer to the structure lpContext will be filled with the
1377 * appropriate data for each service offered by the OS. These services are
1378 * not necessarily available on this particular machine but are defined
1379 * as simple service providers under the "Service Providers" registry key.
1380 * This structure is then passed to lpEnumCallback for each of the different
1383 * This API is useful only for applications written using DirectX3 or
1384 * worse. It is superceeded by IDirectPlay3::EnumConnections which also
1385 * gives information on the actual connections.
1387 * defn of a service provider:
1388 * A dynamic-link library used by DirectPlay to communicate over a network.
1389 * The service provider contains all the network-specific code required
1390 * to send and receive messages. Online services and network operators can
1391 * supply service providers to use specialized hardware, protocols, communications
1392 * media, and network resources.
1394 * TODO: Allocate string buffer space from the heap (length from reg)
1395 * Pass real device driver numbers...
1396 * Get the GUID properly...
1398 HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA lpEnumCallback,
1403 LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
1404 LPSTR guidDataSubKey = "Guid";
1405 LPSTR majVerDataSubKey = "dwReserved1";
1406 DWORD dwIndex, sizeOfSubKeyName=50;
1407 char subKeyName[51];
1409 TRACE( dplay, ": lpEnumCallback=%p lpContext=%p\n", lpEnumCallback, lpContext );
1411 if( !lpEnumCallback || !*lpEnumCallback )
1413 return DPERR_INVALIDPARAMS;
1416 /* Need to loop over the service providers in the registry */
1417 if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey,
1418 0, KEY_ENUMERATE_SUB_KEYS, &hkResult ) != ERROR_SUCCESS )
1420 /* Hmmm. Does this mean that there are no service providers? */
1421 ERR(dplay, ": no service providers?\n");
1425 /* Traverse all the service providers we have available */
1427 RegEnumKeyA( hkResult, dwIndex, subKeyName, sizeOfSubKeyName ) !=
1428 ERROR_NO_MORE_ITEMS;
1431 HKEY hkServiceProvider;
1432 GUID serviceProviderGUID;
1433 DWORD returnTypeGUID, returnTypeReserved1, sizeOfReturnBuffer=50;
1434 char returnBuffer[51];
1435 DWORD majVersionNum /*, minVersionNum */;
1436 LPWSTR lpWGUIDString;
1438 TRACE( dplay, " this time through: %s\n", subKeyName );
1440 /* Get a handle for this particular service provider */
1441 if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_QUERY_VALUE,
1442 &hkServiceProvider ) != ERROR_SUCCESS )
1444 ERR( dplay, ": what the heck is going on?\n" );
1448 /* Get the GUID, Device major number and device minor number
1449 * from the registry.
1451 if( RegQueryValueExA( hkServiceProvider, guidDataSubKey,
1452 NULL, &returnTypeGUID, returnBuffer,
1453 &sizeOfReturnBuffer ) != ERROR_SUCCESS )
1455 ERR( dplay, ": missing GUID registry data members\n" );
1459 /* FIXME: Check return types to ensure we're interpreting data right */
1460 lpWGUIDString = HEAP_strdupAtoW( GetProcessHeap(), 0, returnBuffer );
1461 CLSIDFromString( (LPCOLESTR)lpWGUIDString, &serviceProviderGUID );
1462 HeapFree( GetProcessHeap(), 0, lpWGUIDString );
1464 sizeOfReturnBuffer = 50;
1466 if( RegQueryValueExA( hkServiceProvider, majVerDataSubKey,
1467 NULL, &returnTypeReserved1, returnBuffer,
1468 &sizeOfReturnBuffer ) != ERROR_SUCCESS )
1470 ERR( dplay, ": missing dwReserved1 registry data members\n") ;
1473 /* FIXME: This couldn't possibly be right...*/
1474 majVersionNum = GET_DWORD( returnBuffer );
1476 /* The enumeration will return FALSE if we are not to continue */
1477 if( !lpEnumCallback( &serviceProviderGUID , subKeyName,
1478 majVersionNum, (DWORD)0, lpContext ) )
1480 WARN( dplay, "lpEnumCallback returning FALSE\n" );
1489 /***************************************************************************
1490 * DirectPlayEnumerateW (DPLAYX.3)
1493 HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW lpEnumCallback, LPVOID lpContext )
1496 FIXME( dplay, ":stub\n");
1498 return DPERR_OUTOFMEMORY;
1502 /***************************************************************************
1503 * DirectPlayCreate (DPLAYX.1) (DPLAY.1)
1506 HRESULT WINAPI DirectPlayCreate
1507 ( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk)
1510 TRACE(dplay,"lpGUID=%p lplpDP=%p pUnk=%p\n", lpGUID,lplpDP,pUnk);
1514 /* Hmmm...wonder what this means! */
1515 ERR(dplay, "What does a NULL here mean?\n" );
1516 return DPERR_OUTOFMEMORY;
1519 if( IsEqualGUID( &IID_IDirectPlay2A, lpGUID ) )
1521 IDirectPlay2AImpl** ilplpDP=(IDirectPlay2AImpl**)lplpDP;
1522 *ilplpDP = (IDirectPlay2AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1523 sizeof( **ilplpDP ) );
1527 return DPERR_OUTOFMEMORY;
1530 (*ilplpDP)->lpvtbl = &directPlay2AVT;
1531 (*ilplpDP)->ref = 1;
1535 else if( IsEqualGUID( &IID_IDirectPlay2, lpGUID ) )
1537 IDirectPlay2Impl** ilplpDP=(IDirectPlay2Impl**)lplpDP;
1538 *ilplpDP = (IDirectPlay2Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1539 sizeof( **ilplpDP ) );
1543 return DPERR_OUTOFMEMORY;
1546 (*ilplpDP)->lpvtbl = &directPlay2WVT;
1547 (*ilplpDP)->ref = 1;
1552 /* Unknown interface type */
1553 return DPERR_NOINTERFACE;
1557 /* Direct Play helper methods */
1559 /* Get a new interface. To be used by QueryInterface. */
1560 static HRESULT directPlay_QueryInterface
1561 ( REFIID riid, LPVOID* ppvObj )
1564 if( IsEqualGUID( &IID_IDirectPlay2, riid ) )
1566 IDirectPlay2Impl* lpDP = (IDirectPlay2Impl*)*ppvObj;
1568 lpDP = (IDirectPlay2Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1573 return DPERR_OUTOFMEMORY;
1576 lpDP->lpvtbl = &directPlay2WVT;
1581 else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) )
1583 IDirectPlay2AImpl* lpDP = (IDirectPlay2AImpl*)*ppvObj;
1585 lpDP = (IDirectPlay2AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1590 return DPERR_OUTOFMEMORY;
1593 lpDP->lpvtbl = &directPlay2AVT;
1598 else if( IsEqualGUID( &IID_IDirectPlay3, riid ) )
1600 IDirectPlay3Impl* lpDP = (IDirectPlay3Impl*)*ppvObj;
1602 lpDP = (IDirectPlay3Impl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1607 return DPERR_OUTOFMEMORY;
1610 lpDP->lpvtbl = &directPlay3WVT;
1615 else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) )
1617 IDirectPlay3AImpl* lpDP = (IDirectPlay3AImpl*)*ppvObj;
1619 lpDP = (IDirectPlay3AImpl*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
1624 return DPERR_OUTOFMEMORY;
1627 lpDP->lpvtbl = &directPlay3AVT;
1635 return E_NOINTERFACE;
1639 /* Direct Play methods */
1640 static HRESULT WINAPI DirectPlay2W_QueryInterface
1641 ( LPDIRECTPLAY2 iface, REFIID riid, LPVOID* ppvObj )
1643 ICOM_THIS(IDirectPlay2Impl,iface);
1644 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
1646 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1647 IsEqualGUID( &IID_IDirectPlay2, riid )
1650 IDirectPlay2_AddRef( iface );
1654 return directPlay_QueryInterface( riid, ppvObj );
1657 static HRESULT WINAPI DirectPlay2A_QueryInterface
1658 ( LPDIRECTPLAY2A iface, REFIID riid, LPVOID* ppvObj )
1660 ICOM_THIS(IDirectPlay2Impl,iface);
1661 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
1663 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1664 IsEqualGUID( &IID_IDirectPlay2A, riid )
1667 IDirectPlay2_AddRef( iface );
1672 return directPlay_QueryInterface( riid, ppvObj );
1675 static HRESULT WINAPI DirectPlay3WImpl_QueryInterface
1676 ( LPDIRECTPLAY3 iface, REFIID riid, LPVOID* ppvObj )
1678 ICOM_THIS(IDirectPlay3Impl,iface);
1679 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
1681 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1682 IsEqualGUID( &IID_IDirectPlay3, riid )
1685 IDirectPlay3_AddRef( iface );
1690 return directPlay_QueryInterface( riid, ppvObj );
1693 static HRESULT WINAPI DirectPlay3A_QueryInterface
1694 ( LPDIRECTPLAY3A iface, REFIID riid, LPVOID* ppvObj )
1696 ICOM_THIS(IDirectPlay3Impl,iface);
1697 TRACE( dplay, "(%p)->(%p,%p)\n", This, riid, ppvObj );
1699 if( IsEqualGUID( &IID_IUnknown, riid ) ||
1700 IsEqualGUID( &IID_IDirectPlay3A, riid )
1703 IDirectPlay3_AddRef( iface );
1708 return directPlay_QueryInterface( riid, ppvObj );
1712 /* Shared between all dplay types */
1713 static ULONG WINAPI DirectPlay3WImpl_AddRef
1714 ( LPDIRECTPLAY3 iface )
1716 ICOM_THIS(IDirectPlay3Impl,iface);
1718 TRACE( dplay,"ref count now %lu\n", This->ref );
1722 static ULONG WINAPI DirectPlay3WImpl_Release
1723 ( LPDIRECTPLAY3 iface )
1725 ICOM_THIS(IDirectPlay3Impl,iface);
1726 TRACE( dplay, "ref count decremeneted from %lu\n", This->ref );
1730 /* Deallocate if this is the last reference to the object */
1733 FIXME( dplay, "memory leak\n" );
1734 /* Implement memory deallocation */
1736 HeapFree( GetProcessHeap(), 0, This );
1744 static ULONG WINAPI DirectPlay3A_Release
1745 ( LPDIRECTPLAY3A iface )
1747 ICOM_THIS(IDirectPlay3Impl,iface);
1748 TRACE( dplay, "ref count decremeneted from %lu\n", This->ref );
1752 /* Deallocate if this is the last reference to the object */
1755 FIXME( dplay, "memory leak\n" );
1756 /* Implement memory deallocation */
1758 HeapFree( GetProcessHeap(), 0, This );
1766 HRESULT WINAPI DirectPlay3A_AddPlayerToGroup
1767 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
1769 ICOM_THIS(IDirectPlay3Impl,iface);
1770 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1774 HRESULT WINAPI DirectPlay3WImpl_AddPlayerToGroup
1775 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
1777 ICOM_THIS(IDirectPlay3Impl,iface);
1778 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1783 HRESULT WINAPI DirectPlay3A_Close
1784 ( LPDIRECTPLAY3A iface )
1786 ICOM_THIS(IDirectPlay3Impl,iface);
1787 FIXME( dplay,"(%p)->(): stub", This );
1791 HRESULT WINAPI DirectPlay3WImpl_Close
1792 ( LPDIRECTPLAY3 iface )
1794 ICOM_THIS(IDirectPlay3Impl,iface);
1795 FIXME( dplay,"(%p)->(): stub", This );
1799 HRESULT WINAPI DirectPlay3A_CreateGroup
1800 ( LPDIRECTPLAY3A iface, LPDPID a, LPDPNAME b, LPVOID c, DWORD d, DWORD e )
1802 ICOM_THIS(IDirectPlay3Impl,iface);
1803 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e );
1807 HRESULT WINAPI DirectPlay3WImpl_CreateGroup
1808 ( LPDIRECTPLAY3 iface, LPDPID a, LPDPNAME b, LPVOID c, DWORD d, DWORD e )
1810 ICOM_THIS(IDirectPlay3Impl,iface);
1811 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e );
1815 HRESULT WINAPI DirectPlay3A_CreatePlayer
1816 ( LPDIRECTPLAY3A iface, LPDPID a, LPDPNAME b, HANDLE c, LPVOID d, DWORD e, DWORD f )
1818 ICOM_THIS(IDirectPlay3Impl,iface);
1819 FIXME( dplay,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
1823 HRESULT WINAPI DirectPlay3WImpl_CreatePlayer
1824 ( LPDIRECTPLAY3 iface, LPDPID a, LPDPNAME b, HANDLE c, LPVOID d, DWORD e, DWORD f )
1826 ICOM_THIS(IDirectPlay3Impl,iface);
1827 FIXME( dplay,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
1831 HRESULT WINAPI DirectPlay3A_DeletePlayerFromGroup
1832 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
1834 ICOM_THIS(IDirectPlay3Impl,iface);
1835 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1839 HRESULT WINAPI DirectPlay3WImpl_DeletePlayerFromGroup
1840 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
1842 ICOM_THIS(IDirectPlay3Impl,iface);
1843 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
1847 HRESULT WINAPI DirectPlay3A_DestroyGroup
1848 ( LPDIRECTPLAY3A iface, DPID a )
1850 ICOM_THIS(IDirectPlay3Impl,iface);
1851 FIXME( dplay,"(%p)->(0x%08lx): stub", This, a );
1855 HRESULT WINAPI DirectPlay3WImpl_DestroyGroup
1856 ( LPDIRECTPLAY3 iface, DPID a )
1858 ICOM_THIS(IDirectPlay3Impl,iface);
1859 FIXME( dplay,"(%p)->(0x%08lx): stub", This, a );
1863 HRESULT WINAPI DirectPlay3A_DestroyPlayer
1864 ( LPDIRECTPLAY3A iface, DPID a )
1866 ICOM_THIS(IDirectPlay3Impl,iface);
1867 FIXME( dplay,"(%p)->(0x%08lx): stub", This, a );
1871 HRESULT WINAPI DirectPlay3WImpl_DestroyPlayer
1872 ( LPDIRECTPLAY3 iface, DPID a )
1874 ICOM_THIS(IDirectPlay3Impl,iface);
1875 FIXME( dplay,"(%p)->(0x%08lx): stub", This, a );
1879 HRESULT WINAPI DirectPlay3A_EnumGroupPlayers
1880 ( LPDIRECTPLAY3A iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c,
1883 ICOM_THIS(IDirectPlay3Impl,iface);
1884 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1888 HRESULT WINAPI DirectPlay3WImpl_EnumGroupPlayers
1889 ( LPDIRECTPLAY3 iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c,
1892 ICOM_THIS(IDirectPlay3Impl,iface);
1893 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1897 HRESULT WINAPI DirectPlay3A_EnumGroups
1898 ( LPDIRECTPLAY3A iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1900 ICOM_THIS(IDirectPlay3Impl,iface);
1901 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1905 HRESULT WINAPI DirectPlay3WImpl_EnumGroups
1906 ( LPDIRECTPLAY3 iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1908 ICOM_THIS(IDirectPlay3Impl,iface);
1909 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1913 HRESULT WINAPI DirectPlay3A_EnumPlayers
1914 ( LPDIRECTPLAY3A iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1916 ICOM_THIS(IDirectPlay3Impl,iface);
1917 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1921 HRESULT WINAPI DirectPlay3WImpl_EnumPlayers
1922 ( LPDIRECTPLAY3 iface, LPGUID a, LPDPENUMPLAYERSCALLBACK2 b, LPVOID c, DWORD d )
1924 ICOM_THIS(IDirectPlay3Impl,iface);
1925 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
1929 HRESULT WINAPI DirectPlay3A_EnumSessions
1930 ( LPDIRECTPLAY3A iface, LPDPSESSIONDESC2 a, DWORD b, LPDPENUMSESSIONSCALLBACK2 c,
1933 ICOM_THIS(IDirectPlay3Impl,iface);
1934 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1938 HRESULT WINAPI DirectPlay3WImpl_EnumSessions
1939 ( LPDIRECTPLAY3 iface, LPDPSESSIONDESC2 a, DWORD b, LPDPENUMSESSIONSCALLBACK2 c,
1942 ICOM_THIS(IDirectPlay3Impl,iface);
1943 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
1947 HRESULT WINAPI DirectPlay3A_GetCaps
1948 ( LPDIRECTPLAY3A iface, LPDPCAPS a, DWORD b )
1950 ICOM_THIS(IDirectPlay3Impl,iface);
1951 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
1955 HRESULT WINAPI DirectPlay3WImpl_GetCaps
1956 ( LPDIRECTPLAY3 iface, LPDPCAPS a, DWORD b )
1958 ICOM_THIS(IDirectPlay3Impl,iface);
1959 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
1963 HRESULT WINAPI DirectPlay3A_GetGroupData
1964 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
1966 ICOM_THIS(IDirectPlay3Impl,iface);
1967 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
1971 HRESULT WINAPI DirectPlay3WImpl_GetGroupData
1972 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
1974 ICOM_THIS(IDirectPlay3Impl,iface);
1975 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
1979 HRESULT WINAPI DirectPlay3A_GetGroupName
1980 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, LPDWORD c )
1982 ICOM_THIS(IDirectPlay3Impl,iface);
1983 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
1987 HRESULT WINAPI DirectPlay3WImpl_GetGroupName
1988 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
1990 ICOM_THIS(IDirectPlay3Impl,iface);
1991 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
1995 HRESULT WINAPI DirectPlay3A_GetMessageCount
1996 ( LPDIRECTPLAY3A iface, DPID a, LPDWORD b )
1998 ICOM_THIS(IDirectPlay3Impl,iface);
1999 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2003 HRESULT WINAPI DirectPlay3WImpl_GetMessageCount
2004 ( LPDIRECTPLAY3 iface, DPID a, LPDWORD b )
2006 ICOM_THIS(IDirectPlay3Impl,iface);
2007 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2011 HRESULT WINAPI DirectPlay3A_GetPlayerAddress
2012 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, LPDWORD c )
2014 ICOM_THIS(IDirectPlay3Impl,iface);
2015 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2019 HRESULT WINAPI DirectPlay3WImpl_GetPlayerAddress
2020 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
2022 ICOM_THIS(IDirectPlay3Impl,iface);
2023 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2027 HRESULT WINAPI DirectPlay3A_GetPlayerCaps
2028 ( LPDIRECTPLAY3A iface, DPID a, LPDPCAPS b, DWORD c )
2030 ICOM_THIS(IDirectPlay3Impl,iface);
2031 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2035 HRESULT WINAPI DirectPlay3WImpl_GetPlayerCaps
2036 ( LPDIRECTPLAY3 iface, DPID a, LPDPCAPS b, DWORD c )
2038 ICOM_THIS(IDirectPlay3Impl,iface);
2039 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2043 HRESULT WINAPI DirectPlay3A_GetPlayerData
2044 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
2046 ICOM_THIS(IDirectPlay3Impl,iface);
2047 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
2051 HRESULT WINAPI DirectPlay3WImpl_GetPlayerData
2052 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c, DWORD d )
2054 ICOM_THIS(IDirectPlay3Impl,iface);
2055 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This, a, b, c, d );
2059 HRESULT WINAPI DirectPlay3A_GetPlayerName
2060 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
2062 ICOM_THIS(IDirectPlay3Impl,iface);
2063 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2067 HRESULT WINAPI DirectPlay3WImpl_GetPlayerName
2068 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, LPDWORD c )
2070 ICOM_THIS(IDirectPlay3Impl,iface);
2071 FIXME( dplay,"(%p)->(0x%08lx,%p,%p): stub", This, a, b, c );
2075 HRESULT WINAPI DirectPlay3A_GetSessionDesc
2076 ( LPDIRECTPLAY3A iface, LPVOID a, LPDWORD b )
2078 ICOM_THIS(IDirectPlay3Impl,iface);
2079 FIXME( dplay,"(%p)->(%p,%p): stub", This, a, b );
2083 HRESULT WINAPI DirectPlay3WImpl_GetSessionDesc
2084 ( LPDIRECTPLAY3 iface, LPVOID a, LPDWORD b )
2086 ICOM_THIS(IDirectPlay3Impl,iface);
2087 FIXME( dplay,"(%p)->(%p,%p): stub", This, a, b );
2091 HRESULT WINAPI DirectPlay3A_Initialize
2092 ( LPDIRECTPLAY3A iface, LPGUID a )
2094 ICOM_THIS(IDirectPlay3Impl,iface);
2095 FIXME( dplay,"(%p)->(%p): stub", This, a );
2099 HRESULT WINAPI DirectPlay3WImpl_Initialize
2100 ( LPDIRECTPLAY3 iface, LPGUID a )
2102 ICOM_THIS(IDirectPlay3Impl,iface);
2103 FIXME( dplay,"(%p)->(%p): stub", This, a );
2108 HRESULT WINAPI DirectPlay3A_Open
2109 ( LPDIRECTPLAY3A iface, LPDPSESSIONDESC2 a, DWORD b )
2111 ICOM_THIS(IDirectPlay3Impl,iface);
2112 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
2116 HRESULT WINAPI DirectPlay3WImpl_Open
2117 ( LPDIRECTPLAY3 iface, LPDPSESSIONDESC2 a, DWORD b )
2119 ICOM_THIS(IDirectPlay3Impl,iface);
2120 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
2124 HRESULT WINAPI DirectPlay3A_Receive
2125 ( LPDIRECTPLAY3A iface, LPDPID a, LPDPID b, DWORD c, LPVOID d, LPDWORD e )
2127 ICOM_THIS(IDirectPlay3Impl,iface);
2128 FIXME( dplay,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", This, a, b, c, d, e );
2132 HRESULT WINAPI DirectPlay3WImpl_Receive
2133 ( LPDIRECTPLAY3 iface, LPDPID a, LPDPID b, DWORD c, LPVOID d, LPDWORD e )
2135 ICOM_THIS(IDirectPlay3Impl,iface);
2136 FIXME( dplay,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", This, a, b, c, d, e );
2140 HRESULT WINAPI DirectPlay3A_Send
2141 ( LPDIRECTPLAY3A iface, DPID a, DPID b, DWORD c, LPVOID d, DWORD e )
2143 ICOM_THIS(IDirectPlay3Impl,iface);
2144 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", This, a, b, c, d, e );
2148 HRESULT WINAPI DirectPlay3WImpl_Send
2149 ( LPDIRECTPLAY3 iface, DPID a, DPID b, DWORD c, LPVOID d, DWORD e )
2151 ICOM_THIS(IDirectPlay3Impl,iface);
2152 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", This, a, b, c, d, e );
2156 HRESULT WINAPI DirectPlay3A_SetGroupData
2157 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, DWORD c, DWORD d )
2159 ICOM_THIS(IDirectPlay3Impl,iface);
2160 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2164 HRESULT WINAPI DirectPlay3WImpl_SetGroupData
2165 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, DWORD c, DWORD d )
2167 ICOM_THIS(IDirectPlay3Impl,iface);
2168 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2172 HRESULT WINAPI DirectPlay3A_SetGroupName
2173 ( LPDIRECTPLAY3A iface, DPID a, LPDPNAME b, DWORD c )
2175 ICOM_THIS(IDirectPlay3Impl,iface);
2176 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2180 HRESULT WINAPI DirectPlay3WImpl_SetGroupName
2181 ( LPDIRECTPLAY3 iface, DPID a, LPDPNAME b, DWORD c )
2183 ICOM_THIS(IDirectPlay3Impl,iface);
2184 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2188 HRESULT WINAPI DirectPlay3A_SetPlayerData
2189 ( LPDIRECTPLAY3A iface, DPID a, LPVOID b, DWORD c, DWORD d )
2191 ICOM_THIS(IDirectPlay3Impl,iface);
2192 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2196 HRESULT WINAPI DirectPlay3WImpl_SetPlayerData
2197 ( LPDIRECTPLAY3 iface, DPID a, LPVOID b, DWORD c, DWORD d )
2199 ICOM_THIS(IDirectPlay3Impl,iface);
2200 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d );
2204 HRESULT WINAPI DirectPlay3A_SetPlayerName
2205 ( LPDIRECTPLAY3A iface, DPID a, LPDPNAME b, DWORD c )
2207 ICOM_THIS(IDirectPlay3Impl,iface);
2208 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2212 HRESULT WINAPI DirectPlay3WImpl_SetPlayerName
2213 ( LPDIRECTPLAY3 iface, DPID a, LPDPNAME b, DWORD c )
2215 ICOM_THIS(IDirectPlay3Impl,iface);
2216 FIXME( dplay,"(%p)->(0x%08lx,%p,0x%08lx): stub", This, a, b, c );
2220 HRESULT WINAPI DirectPlay3A_SetSessionDesc
2221 ( LPDIRECTPLAY3A iface, LPDPSESSIONDESC2 a, DWORD b )
2223 ICOM_THIS(IDirectPlay3Impl,iface);
2224 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
2228 HRESULT WINAPI DirectPlay3WImpl_SetSessionDesc
2229 ( LPDIRECTPLAY3 iface, LPDPSESSIONDESC2 a, DWORD b )
2231 ICOM_THIS(IDirectPlay3Impl,iface);
2232 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
2236 HRESULT WINAPI DirectPlay3A_AddGroupToGroup
2237 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
2239 ICOM_THIS(IDirectPlay3Impl,iface);
2240 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2244 HRESULT WINAPI DirectPlay3WImpl_AddGroupToGroup
2245 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
2247 ICOM_THIS(IDirectPlay3Impl,iface);
2248 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2252 HRESULT WINAPI DirectPlay3A_CreateGroupInGroup
2253 ( LPDIRECTPLAY3A iface, DPID a, LPDPID b, LPDPNAME c, LPVOID d, DWORD e, DWORD f )
2255 ICOM_THIS(IDirectPlay3Impl,iface);
2256 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
2260 HRESULT WINAPI DirectPlay3WImpl_CreateGroupInGroup
2261 ( LPDIRECTPLAY3 iface, DPID a, LPDPID b, LPDPNAME c, LPVOID d, DWORD e, DWORD f )
2263 ICOM_THIS(IDirectPlay3Impl,iface);
2264 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", This, a, b, c, d, e, f );
2268 HRESULT WINAPI DirectPlay3A_DeleteGroupFromGroup
2269 ( LPDIRECTPLAY3A iface, DPID a, DPID b )
2271 ICOM_THIS(IDirectPlay3Impl,iface);
2272 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2276 HRESULT WINAPI DirectPlay3WImpl_DeleteGroupFromGroup
2277 ( LPDIRECTPLAY3 iface, DPID a, DPID b )
2279 ICOM_THIS(IDirectPlay3Impl,iface);
2280 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2284 HRESULT WINAPI DirectPlay3A_EnumConnections
2285 ( LPDIRECTPLAY3A iface, LPCGUID a, LPDPENUMCONNECTIONSCALLBACK b, LPVOID c, DWORD d )
2287 ICOM_THIS(IDirectPlay3Impl,iface);
2288 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
2292 HRESULT WINAPI DirectPlay3WImpl_EnumConnections
2293 ( LPDIRECTPLAY3 iface, LPCGUID a, LPDPENUMCONNECTIONSCALLBACK b, LPVOID c, DWORD d )
2295 ICOM_THIS(IDirectPlay3Impl,iface);
2296 FIXME( dplay,"(%p)->(%p,%p,%p,0x%08lx): stub", This, a, b, c, d );
2300 HRESULT WINAPI DirectPlay3A_EnumGroupsInGroup
2301 ( LPDIRECTPLAY3A iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c, LPVOID d, DWORD e )
2303 ICOM_THIS(IDirectPlay3Impl,iface);
2304 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
2308 HRESULT WINAPI DirectPlay3WImpl_EnumGroupsInGroup
2309 ( LPDIRECTPLAY3 iface, DPID a, LPGUID b, LPDPENUMPLAYERSCALLBACK2 c, LPVOID d, DWORD e )
2311 ICOM_THIS(IDirectPlay3Impl,iface);
2312 FIXME( dplay,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This, a, b, c, d, e );
2316 HRESULT WINAPI DirectPlay3A_GetGroupConnectionSettings
2317 ( LPDIRECTPLAY3A iface, DWORD a, DPID b, LPVOID c, LPDWORD d )
2319 ICOM_THIS(IDirectPlay3Impl,iface);
2320 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2324 HRESULT WINAPI DirectPlay3WImpl_GetGroupConnectionSettings
2325 ( LPDIRECTPLAY3 iface, DWORD a, DPID b, LPVOID c, LPDWORD d )
2327 ICOM_THIS(IDirectPlay3Impl,iface);
2328 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2332 HRESULT WINAPI DirectPlay3A_InitializeConnection
2333 ( LPDIRECTPLAY3A iface, LPVOID a, DWORD b )
2335 ICOM_THIS(IDirectPlay3Impl,iface);
2336 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
2340 HRESULT WINAPI DirectPlay3WImpl_InitializeConnection
2341 ( LPDIRECTPLAY3 iface, LPVOID a, DWORD b )
2343 ICOM_THIS(IDirectPlay3Impl,iface);
2344 FIXME( dplay,"(%p)->(%p,0x%08lx): stub", This, a, b );
2348 HRESULT WINAPI DirectPlay3A_SecureOpen
2349 ( LPDIRECTPLAY3A iface, LPCDPSESSIONDESC2 a, DWORD b, LPCDPSECURITYDESC c, LPCDPCREDENTIALS d )
2351 ICOM_THIS(IDirectPlay3Impl,iface);
2352 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p): stub", This, a, b, c, d );
2356 HRESULT WINAPI DirectPlay3WImpl_SecureOpen
2357 ( LPDIRECTPLAY3 iface, LPCDPSESSIONDESC2 a, DWORD b, LPCDPSECURITYDESC c, LPCDPCREDENTIALS d )
2359 ICOM_THIS(IDirectPlay3Impl,iface);
2360 FIXME( dplay,"(%p)->(%p,0x%08lx,%p,%p): stub", This, a, b, c, d );
2364 HRESULT WINAPI DirectPlay3A_SendChatMessage
2365 ( LPDIRECTPLAY3A iface, DPID a, DPID b, DWORD c, LPDPCHAT d )
2367 ICOM_THIS(IDirectPlay3Impl,iface);
2368 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", This, a, b, c, d );
2372 HRESULT WINAPI DirectPlay3WImpl_SendChatMessage
2373 ( LPDIRECTPLAY3 iface, DPID a, DPID b, DWORD c, LPDPCHAT d )
2375 ICOM_THIS(IDirectPlay3Impl,iface);
2376 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", This, a, b, c, d );
2380 HRESULT WINAPI DirectPlay3A_SetGroupConnectionSettings
2381 ( LPDIRECTPLAY3A iface, DWORD a, DPID b, LPDPLCONNECTION c )
2383 ICOM_THIS(IDirectPlay3Impl,iface);
2384 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p): stub", This, a, b, c );
2388 HRESULT WINAPI DirectPlay3WImpl_SetGroupConnectionSettings
2389 ( LPDIRECTPLAY3 iface, DWORD a, DPID b, LPDPLCONNECTION c )
2391 ICOM_THIS(IDirectPlay3Impl,iface);
2392 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p): stub", This, a, b, c );
2396 HRESULT WINAPI DirectPlay3A_StartSession
2397 ( LPDIRECTPLAY3A iface, DWORD a, DPID b )
2399 ICOM_THIS(IDirectPlay3Impl,iface);
2400 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2404 HRESULT WINAPI DirectPlay3WImpl_StartSession
2405 ( LPDIRECTPLAY3 iface, DWORD a, DPID b )
2407 ICOM_THIS(IDirectPlay3Impl,iface);
2408 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx): stub", This, a, b );
2412 HRESULT WINAPI DirectPlay3A_GetGroupFlags
2413 ( LPDIRECTPLAY3A iface, DPID a, LPDWORD b )
2415 ICOM_THIS(IDirectPlay3Impl,iface);
2416 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2420 HRESULT WINAPI DirectPlay3WImpl_GetGroupFlags
2421 ( LPDIRECTPLAY3 iface, DPID a, LPDWORD b )
2423 ICOM_THIS(IDirectPlay3Impl,iface);
2424 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2428 HRESULT WINAPI DirectPlay3A_GetGroupParent
2429 ( LPDIRECTPLAY3A iface, DPID a, LPDPID b )
2431 ICOM_THIS(IDirectPlay3Impl,iface);
2432 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2436 HRESULT WINAPI DirectPlay3WImpl_GetGroupParent
2437 ( LPDIRECTPLAY3 iface, DPID a, LPDPID b )
2439 ICOM_THIS(IDirectPlay3Impl,iface);
2440 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2444 HRESULT WINAPI DirectPlay3A_GetPlayerAccount
2445 ( LPDIRECTPLAY3A iface, DPID a, DWORD b, LPVOID c, LPDWORD d )
2447 ICOM_THIS(IDirectPlay3Impl,iface);
2448 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2452 HRESULT WINAPI DirectPlay3WImpl_GetPlayerAccount
2453 ( LPDIRECTPLAY3 iface, DPID a, DWORD b, LPVOID c, LPDWORD d )
2455 ICOM_THIS(IDirectPlay3Impl,iface);
2456 FIXME( dplay,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This, a, b, c, d );
2460 HRESULT WINAPI DirectPlay3A_GetPlayerFlags
2461 ( LPDIRECTPLAY3A iface, DPID a, LPDWORD b )
2463 ICOM_THIS(IDirectPlay3Impl,iface);
2464 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2468 HRESULT WINAPI DirectPlay3WImpl_GetPlayerFlags
2469 ( LPDIRECTPLAY3 iface, DPID a, LPDWORD b )
2471 ICOM_THIS(IDirectPlay3Impl,iface);
2472 FIXME( dplay,"(%p)->(0x%08lx,%p): stub", This, a, b );
2477 /* Note: Hack so we can reuse the old functions without compiler warnings */
2478 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
2479 # define XCAST(fun) (typeof(directPlay2WVT.fn##fun))
2481 # define XCAST(fun) (void*)
2484 static ICOM_VTABLE(IDirectPlay2) directPlay2WVT =
2486 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2487 DirectPlay2W_QueryInterface,
2488 XCAST(AddRef)DirectPlay3WImpl_AddRef,
2489 XCAST(Release)DirectPlay3WImpl_Release,
2490 XCAST(AddPlayerToGroup)DirectPlay3WImpl_AddPlayerToGroup,
2491 XCAST(Close)DirectPlay3WImpl_Close,
2492 XCAST(CreateGroup)DirectPlay3WImpl_CreateGroup,
2493 XCAST(CreatePlayer)DirectPlay3WImpl_CreatePlayer,
2494 XCAST(DeletePlayerFromGroup)DirectPlay3WImpl_DeletePlayerFromGroup,
2495 XCAST(DestroyGroup)DirectPlay3WImpl_DestroyGroup,
2496 XCAST(DestroyPlayer)DirectPlay3WImpl_DestroyPlayer,
2497 XCAST(EnumGroupPlayers)DirectPlay3WImpl_EnumGroupPlayers,
2498 XCAST(EnumGroups)DirectPlay3WImpl_EnumGroups,
2499 XCAST(EnumPlayers)DirectPlay3WImpl_EnumPlayers,
2500 XCAST(EnumSessions)DirectPlay3WImpl_EnumSessions,
2501 XCAST(GetCaps)DirectPlay3WImpl_GetCaps,
2502 XCAST(GetGroupData)DirectPlay3WImpl_GetGroupData,
2503 XCAST(GetGroupName)DirectPlay3WImpl_GetGroupName,
2504 XCAST(GetMessageCount)DirectPlay3WImpl_GetMessageCount,
2505 XCAST(GetPlayerAddress)DirectPlay3WImpl_GetPlayerAddress,
2506 XCAST(GetPlayerCaps)DirectPlay3WImpl_GetPlayerCaps,
2507 XCAST(GetPlayerData)DirectPlay3WImpl_GetPlayerData,
2508 XCAST(GetPlayerName)DirectPlay3WImpl_GetPlayerName,
2509 XCAST(GetSessionDesc)DirectPlay3WImpl_GetSessionDesc,
2510 XCAST(Initialize)DirectPlay3WImpl_Initialize,
2511 XCAST(Open)DirectPlay3WImpl_Open,
2512 XCAST(Receive)DirectPlay3WImpl_Receive,
2513 XCAST(Send)DirectPlay3WImpl_Send,
2514 XCAST(SetGroupData)DirectPlay3WImpl_SetGroupData,
2515 XCAST(SetGroupName)DirectPlay3WImpl_SetGroupName,
2516 XCAST(SetPlayerData)DirectPlay3WImpl_SetPlayerData,
2517 XCAST(SetPlayerName)DirectPlay3WImpl_SetPlayerName,
2518 XCAST(SetSessionDesc)DirectPlay3WImpl_SetSessionDesc
2523 /* Note: Hack so we can reuse the old functions without compiler warnings */
2524 #if !defined(__STRICT_ANSI__) && defined(__GNUC__)
2525 # define XCAST(fun) (typeof(directPlay2AVT.fn##fun))
2527 # define XCAST(fun) (void*)
2530 static ICOM_VTABLE(IDirectPlay2) directPlay2AVT =
2532 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2533 DirectPlay2A_QueryInterface,
2534 XCAST(AddRef)DirectPlay3WImpl_AddRef,
2535 XCAST(Release)DirectPlay3A_Release,
2536 XCAST(AddPlayerToGroup)DirectPlay3A_AddPlayerToGroup,
2537 XCAST(Close)DirectPlay3A_Close,
2538 XCAST(CreateGroup)DirectPlay3A_CreateGroup,
2539 XCAST(CreatePlayer)DirectPlay3A_CreatePlayer,
2540 XCAST(DeletePlayerFromGroup)DirectPlay3A_DeletePlayerFromGroup,
2541 XCAST(DestroyGroup)DirectPlay3A_DestroyGroup,
2542 XCAST(DestroyPlayer)DirectPlay3A_DestroyPlayer,
2543 XCAST(EnumGroupPlayers)DirectPlay3A_EnumGroupPlayers,
2544 XCAST(EnumGroups)DirectPlay3A_EnumGroups,
2545 XCAST(EnumPlayers)DirectPlay3A_EnumPlayers,
2546 XCAST(EnumSessions)DirectPlay3A_EnumSessions,
2547 XCAST(GetCaps)DirectPlay3A_GetCaps,
2548 XCAST(GetGroupData)DirectPlay3A_GetGroupData,
2549 XCAST(GetGroupName)DirectPlay3A_GetGroupName,
2550 XCAST(GetMessageCount)DirectPlay3A_GetMessageCount,
2551 XCAST(GetPlayerAddress)DirectPlay3A_GetPlayerAddress,
2552 XCAST(GetPlayerCaps)DirectPlay3A_GetPlayerCaps,
2553 XCAST(GetPlayerData)DirectPlay3A_GetPlayerData,
2554 XCAST(GetPlayerName)DirectPlay3A_GetPlayerName,
2555 XCAST(GetSessionDesc)DirectPlay3A_GetSessionDesc,
2556 XCAST(Initialize)DirectPlay3A_Initialize,
2557 XCAST(Open)DirectPlay3A_Open,
2558 XCAST(Receive)DirectPlay3A_Receive,
2559 XCAST(Send)DirectPlay3A_Send,
2560 XCAST(SetGroupData)DirectPlay3A_SetGroupData,
2561 XCAST(SetGroupName)DirectPlay3A_SetGroupName,
2562 XCAST(SetPlayerData)DirectPlay3A_SetPlayerData,
2563 XCAST(SetPlayerName)DirectPlay3A_SetPlayerName,
2564 XCAST(SetSessionDesc)DirectPlay3A_SetSessionDesc
2569 static ICOM_VTABLE(IDirectPlay3) directPlay3AVT =
2571 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2572 DirectPlay3A_QueryInterface,
2573 DirectPlay3WImpl_AddRef,
2574 DirectPlay3A_Release,
2575 DirectPlay3A_AddPlayerToGroup,
2577 DirectPlay3A_CreateGroup,
2578 DirectPlay3A_CreatePlayer,
2579 DirectPlay3A_DeletePlayerFromGroup,
2580 DirectPlay3A_DestroyGroup,
2581 DirectPlay3A_DestroyPlayer,
2582 DirectPlay3A_EnumGroupPlayers,
2583 DirectPlay3A_EnumGroups,
2584 DirectPlay3A_EnumPlayers,
2585 DirectPlay3A_EnumSessions,
2586 DirectPlay3A_GetCaps,
2587 DirectPlay3A_GetGroupData,
2588 DirectPlay3A_GetGroupName,
2589 DirectPlay3A_GetMessageCount,
2590 DirectPlay3A_GetPlayerAddress,
2591 DirectPlay3A_GetPlayerCaps,
2592 DirectPlay3A_GetPlayerData,
2593 DirectPlay3A_GetPlayerName,
2594 DirectPlay3A_GetSessionDesc,
2595 DirectPlay3A_Initialize,
2597 DirectPlay3A_Receive,
2599 DirectPlay3A_SetGroupData,
2600 DirectPlay3A_SetGroupName,
2601 DirectPlay3A_SetPlayerData,
2602 DirectPlay3A_SetPlayerName,
2603 DirectPlay3A_SetSessionDesc,
2605 DirectPlay3A_AddGroupToGroup,
2606 DirectPlay3A_CreateGroupInGroup,
2607 DirectPlay3A_DeleteGroupFromGroup,
2608 DirectPlay3A_EnumConnections,
2609 DirectPlay3A_EnumGroupsInGroup,
2610 DirectPlay3A_GetGroupConnectionSettings,
2611 DirectPlay3A_InitializeConnection,
2612 DirectPlay3A_SecureOpen,
2613 DirectPlay3A_SendChatMessage,
2614 DirectPlay3A_SetGroupConnectionSettings,
2615 DirectPlay3A_StartSession,
2616 DirectPlay3A_GetGroupFlags,
2617 DirectPlay3A_GetGroupParent,
2618 DirectPlay3A_GetPlayerAccount,
2619 DirectPlay3A_GetPlayerFlags
2622 static ICOM_VTABLE(IDirectPlay3) directPlay3WVT =
2624 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2625 DirectPlay3WImpl_QueryInterface,
2626 DirectPlay3WImpl_AddRef,
2627 DirectPlay3WImpl_Release,
2628 DirectPlay3WImpl_AddPlayerToGroup,
2629 DirectPlay3WImpl_Close,
2630 DirectPlay3WImpl_CreateGroup,
2631 DirectPlay3WImpl_CreatePlayer,
2632 DirectPlay3WImpl_DeletePlayerFromGroup,
2633 DirectPlay3WImpl_DestroyGroup,
2634 DirectPlay3WImpl_DestroyPlayer,
2635 DirectPlay3WImpl_EnumGroupPlayers,
2636 DirectPlay3WImpl_EnumGroups,
2637 DirectPlay3WImpl_EnumPlayers,
2638 DirectPlay3WImpl_EnumSessions,
2639 DirectPlay3WImpl_GetCaps,
2640 DirectPlay3WImpl_GetGroupData,
2641 DirectPlay3WImpl_GetGroupName,
2642 DirectPlay3WImpl_GetMessageCount,
2643 DirectPlay3WImpl_GetPlayerAddress,
2644 DirectPlay3WImpl_GetPlayerCaps,
2645 DirectPlay3WImpl_GetPlayerData,
2646 DirectPlay3WImpl_GetPlayerName,
2647 DirectPlay3WImpl_GetSessionDesc,
2648 DirectPlay3WImpl_Initialize,
2649 DirectPlay3WImpl_Open,
2650 DirectPlay3WImpl_Receive,
2651 DirectPlay3WImpl_Send,
2652 DirectPlay3WImpl_SetGroupData,
2653 DirectPlay3WImpl_SetGroupName,
2654 DirectPlay3WImpl_SetPlayerData,
2655 DirectPlay3WImpl_SetPlayerName,
2656 DirectPlay3WImpl_SetSessionDesc,
2658 DirectPlay3WImpl_AddGroupToGroup,
2659 DirectPlay3WImpl_CreateGroupInGroup,
2660 DirectPlay3WImpl_DeleteGroupFromGroup,
2661 DirectPlay3WImpl_EnumConnections,
2662 DirectPlay3WImpl_EnumGroupsInGroup,
2663 DirectPlay3WImpl_GetGroupConnectionSettings,
2664 DirectPlay3WImpl_InitializeConnection,
2665 DirectPlay3WImpl_SecureOpen,
2666 DirectPlay3WImpl_SendChatMessage,
2667 DirectPlay3WImpl_SetGroupConnectionSettings,
2668 DirectPlay3WImpl_StartSession,
2669 DirectPlay3WImpl_GetGroupFlags,
2670 DirectPlay3WImpl_GetGroupParent,
2671 DirectPlay3WImpl_GetPlayerAccount,
2672 DirectPlay3WImpl_GetPlayerFlags