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 */
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
= {
1200 IDirectPlayLobbyAImpl_QueryInterface
,
1201 XCAST(AddRef
)IDirectPlayLobby2AImpl_AddRef
,
1202 XCAST(Release
)IDirectPlayLobby2AImpl_Release
,
1203 XCAST(Connect
)IDirectPlayLobby2AImpl_Connect
,
1204 XCAST(CreateAddress
)IDirectPlayLobby2AImpl_CreateAddress
,
1205 XCAST(EnumAddress
)IDirectPlayLobby2AImpl_EnumAddress
,
1206 XCAST(EnumAddressTypes
)IDirectPlayLobby2AImpl_EnumAddressTypes
,
1207 XCAST(EnumLocalApplications
)IDirectPlayLobby2AImpl_EnumLocalApplications
,
1208 XCAST(GetConnectionSettings
)IDirectPlayLobby2AImpl_GetConnectionSettings
,
1209 XCAST(ReceiveLobbyMessage
)IDirectPlayLobby2AImpl_ReceiveLobbyMessage
,
1210 XCAST(RunApplication
)IDirectPlayLobby2AImpl_RunApplication
,
1211 XCAST(SendLobbyMessage
)IDirectPlayLobby2AImpl_SendLobbyMessage
,
1212 XCAST(SetConnectionSettings
)IDirectPlayLobby2AImpl_SetConnectionSettings
,
1213 XCAST(SetLobbyMessageEvent
)IDirectPlayLobby2AImpl_SetLobbyMessageEvent
1218 /* Note: Hack so we can reuse the old functions without compiler warnings */
1220 # define XCAST(fun) (typeof(directPlayLobbyWVT.fn##fun))
1222 # define XCAST(fun) (void*)
1225 /* Direct Play Lobby 1 (unicode) Virtual Table for methods */
1226 static ICOM_VTABLE(IDirectPlayLobby
) directPlayLobbyWVT
= {
1227 IDirectPlayLobbyW_QueryInterface
,
1228 XCAST(AddRef
)IDirectPlayLobby2WImpl_AddRef
,
1229 XCAST(Release
)IDirectPlayLobby2WImpl_Release
,
1230 XCAST(Connect
)IDirectPlayLobby2WImpl_Connect
,
1231 XCAST(CreateAddress
)IDirectPlayLobby2WImpl_CreateAddress
,
1232 XCAST(EnumAddress
)IDirectPlayLobby2WImpl_EnumAddress
,
1233 XCAST(EnumAddressTypes
)IDirectPlayLobby2WImpl_EnumAddressTypes
,
1234 XCAST(EnumLocalApplications
)IDirectPlayLobby2WImpl_EnumLocalApplications
,
1235 XCAST(GetConnectionSettings
)IDirectPlayLobby2WImpl_GetConnectionSettings
,
1236 XCAST(ReceiveLobbyMessage
)IDirectPlayLobby2WImpl_ReceiveLobbyMessage
,
1237 XCAST(RunApplication
)IDirectPlayLobby2WImpl_RunApplication
,
1238 XCAST(SendLobbyMessage
)IDirectPlayLobby2WImpl_SendLobbyMessage
,
1239 XCAST(SetConnectionSettings
)IDirectPlayLobby2WImpl_SetConnectionSettings
,
1240 XCAST(SetLobbyMessageEvent
)IDirectPlayLobby2WImpl_SetLobbyMessageEvent
1245 /* Direct Play Lobby 2 (ascii) Virtual Table for methods */
1246 static ICOM_VTABLE(IDirectPlayLobby2
) directPlayLobby2AVT
= {
1247 IDirectPlayLobby2AImpl_QueryInterface
,
1248 IDirectPlayLobby2AImpl_AddRef
,
1249 IDirectPlayLobby2AImpl_Release
,
1250 IDirectPlayLobby2AImpl_Connect
,
1251 IDirectPlayLobby2AImpl_CreateAddress
,
1252 IDirectPlayLobby2AImpl_EnumAddress
,
1253 IDirectPlayLobby2AImpl_EnumAddressTypes
,
1254 IDirectPlayLobby2AImpl_EnumLocalApplications
,
1255 IDirectPlayLobby2AImpl_GetConnectionSettings
,
1256 IDirectPlayLobby2AImpl_ReceiveLobbyMessage
,
1257 IDirectPlayLobby2AImpl_RunApplication
,
1258 IDirectPlayLobby2AImpl_SendLobbyMessage
,
1259 IDirectPlayLobby2AImpl_SetConnectionSettings
,
1260 IDirectPlayLobby2AImpl_SetLobbyMessageEvent
,
1261 IDirectPlayLobby2AImpl_CreateCompoundAddress
1264 /* Direct Play Lobby 2 (unicode) Virtual Table for methods */
1265 static ICOM_VTABLE(IDirectPlayLobby2
) directPlayLobby2WVT
= {
1266 IDirectPlayLobby2WImpl_QueryInterface
,
1267 IDirectPlayLobby2WImpl_AddRef
,
1268 IDirectPlayLobby2WImpl_Release
,
1269 IDirectPlayLobby2WImpl_Connect
,
1270 IDirectPlayLobby2WImpl_CreateAddress
,
1271 IDirectPlayLobby2WImpl_EnumAddress
,
1272 IDirectPlayLobby2WImpl_EnumAddressTypes
,
1273 IDirectPlayLobby2WImpl_EnumLocalApplications
,
1274 IDirectPlayLobby2WImpl_GetConnectionSettings
,
1275 IDirectPlayLobby2WImpl_ReceiveLobbyMessage
,
1276 IDirectPlayLobby2WImpl_RunApplication
,
1277 IDirectPlayLobby2WImpl_SendLobbyMessage
,
1278 IDirectPlayLobby2WImpl_SetConnectionSettings
,
1279 IDirectPlayLobby2WImpl_SetLobbyMessageEvent
,
1280 IDirectPlayLobby2WImpl_CreateCompoundAddress
1283 /***************************************************************************
1284 * DirectPlayLobbyCreateA (DPLAYX.4)
1287 HRESULT WINAPI
DirectPlayLobbyCreateA( LPGUID lpGUIDDSP
,
1288 LPDIRECTPLAYLOBBYA
*lplpDPL
,
1293 IDirectPlayLobbyAImpl
** ilplpDPL
=(IDirectPlayLobbyAImpl
**)lplpDPL
;
1294 TRACE(dplay
,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1295 lpGUIDDSP
,ilplpDPL
,lpUnk
,lpData
,dwDataSize
);
1297 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1298 * equal 0. These fields are mostly for future expansion.
1300 if ( lpGUIDDSP
|| lpUnk
|| lpData
|| dwDataSize
)
1303 return DPERR_INVALIDPARAMS
;
1306 /* Yes...really we should be returning a lobby 1 object */
1307 *ilplpDPL
= (IDirectPlayLobbyAImpl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1308 sizeof( IDirectPlayLobbyAImpl
) );
1312 return DPERR_OUTOFMEMORY
;
1315 (*ilplpDPL
)->lpvtbl
= &directPlayLobbyAVT
;
1316 (*ilplpDPL
)->ref
= 1;
1318 /* All fields were nulled out by the allocation */
1323 /***************************************************************************
1324 * DirectPlayLobbyCreateW (DPLAYX.5)
1327 HRESULT WINAPI
DirectPlayLobbyCreateW( LPGUID lpGUIDDSP
,
1328 LPDIRECTPLAYLOBBY
*lplpDPL
,
1333 IDirectPlayLobbyImpl
** ilplpDPL
=(IDirectPlayLobbyImpl
**)lplpDPL
;
1334 TRACE(dplay
,"lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
1335 lpGUIDDSP
,ilplpDPL
,lpUnk
,lpData
,dwDataSize
);
1337 /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
1338 * equal 0. These fields are mostly for future expansion.
1340 if ( lpGUIDDSP
|| lpUnk
|| lpData
|| dwDataSize
)
1343 ERR( dplay
, "Bad parameters!\n" );
1344 return DPERR_INVALIDPARAMS
;
1347 /* Yes...really we should bre returning a lobby 1 object */
1348 *ilplpDPL
= (IDirectPlayLobbyImpl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1349 sizeof( IDirectPlayLobbyImpl
) );
1353 return DPERR_OUTOFMEMORY
;
1356 (*ilplpDPL
)->lpvtbl
= &directPlayLobbyWVT
;
1357 (*ilplpDPL
)->ref
= 1;
1359 /* All fields were nulled out by the allocation */
1365 /***************************************************************************
1366 * DirectPlayEnumerateA (DPLAYX.2)
1368 * The pointer to the structure lpContext will be filled with the
1369 * appropriate data for each service offered by the OS. These services are
1370 * not necessarily available on this particular machine but are defined
1371 * as simple service providers under the "Service Providers" registry key.
1372 * This structure is then passed to lpEnumCallback for each of the different
1375 * This API is useful only for applications written using DirectX3 or
1376 * worse. It is superceeded by IDirectPlay3::EnumConnections which also
1377 * gives information on the actual connections.
1379 * defn of a service provider:
1380 * A dynamic-link library used by DirectPlay to communicate over a network.
1381 * The service provider contains all the network-specific code required
1382 * to send and receive messages. Online services and network operators can
1383 * supply service providers to use specialized hardware, protocols, communications
1384 * media, and network resources.
1386 * TODO: Allocate string buffer space from the heap (length from reg)
1387 * Pass real device driver numbers...
1388 * Get the GUID properly...
1390 HRESULT WINAPI
DirectPlayEnumerateA( LPDPENUMDPCALLBACKA lpEnumCallback
,
1395 LPCSTR searchSubKey
= "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers";
1396 LPSTR guidDataSubKey
= "Guid";
1397 LPSTR majVerDataSubKey
= "dwReserved1";
1398 DWORD dwIndex
, sizeOfSubKeyName
=50;
1399 char subKeyName
[51];
1401 TRACE( dplay
, ": lpEnumCallback=%p lpContext=%p\n", lpEnumCallback
, lpContext
);
1403 if( !lpEnumCallback
|| !*lpEnumCallback
)
1405 return DPERR_INVALIDPARAMS
;
1408 /* Need to loop over the service providers in the registry */
1409 if( RegOpenKeyExA( HKEY_LOCAL_MACHINE
, searchSubKey
,
1410 0, KEY_ENUMERATE_SUB_KEYS
, &hkResult
) != ERROR_SUCCESS
)
1412 /* Hmmm. Does this mean that there are no service providers? */
1413 ERR(dplay
, ": no service providers?\n");
1417 /* Traverse all the service providers we have available */
1419 RegEnumKeyA( hkResult
, dwIndex
, subKeyName
, sizeOfSubKeyName
) !=
1420 ERROR_NO_MORE_ITEMS
;
1423 HKEY hkServiceProvider
;
1424 GUID serviceProviderGUID
;
1425 DWORD returnTypeGUID
, returnTypeReserved1
, sizeOfReturnBuffer
=50;
1426 char returnBuffer
[51];
1427 DWORD majVersionNum
/*, minVersionNum */;
1428 LPWSTR lpWGUIDString
;
1430 TRACE( dplay
, " this time through: %s\n", subKeyName
);
1432 /* Get a handle for this particular service provider */
1433 if( RegOpenKeyExA( hkResult
, subKeyName
, 0, KEY_QUERY_VALUE
,
1434 &hkServiceProvider
) != ERROR_SUCCESS
)
1436 ERR( dplay
, ": what the heck is going on?\n" );
1440 /* Get the GUID, Device major number and device minor number
1441 * from the registry.
1443 if( RegQueryValueExA( hkServiceProvider
, guidDataSubKey
,
1444 NULL
, &returnTypeGUID
, returnBuffer
,
1445 &sizeOfReturnBuffer
) != ERROR_SUCCESS
)
1447 ERR( dplay
, ": missing GUID registry data members\n" );
1451 /* FIXME: Check return types to ensure we're interpreting data right */
1452 lpWGUIDString
= HEAP_strdupAtoW( GetProcessHeap(), 0, returnBuffer
);
1453 CLSIDFromString( (LPCOLESTR
)lpWGUIDString
, &serviceProviderGUID
);
1454 HeapFree( GetProcessHeap(), 0, lpWGUIDString
);
1456 sizeOfReturnBuffer
= 50;
1458 if( RegQueryValueExA( hkServiceProvider
, majVerDataSubKey
,
1459 NULL
, &returnTypeReserved1
, returnBuffer
,
1460 &sizeOfReturnBuffer
) != ERROR_SUCCESS
)
1462 ERR( dplay
, ": missing dwReserved1 registry data members\n") ;
1465 /* FIXME: This couldn't possibly be right...*/
1466 majVersionNum
= GET_DWORD( returnBuffer
);
1468 /* The enumeration will return FALSE if we are not to continue */
1469 if( !lpEnumCallback( &serviceProviderGUID
, subKeyName
,
1470 majVersionNum
, (DWORD
)0, lpContext
) )
1472 WARN( dplay
, "lpEnumCallback returning FALSE\n" );
1481 /***************************************************************************
1482 * DirectPlayEnumerateW (DPLAYX.3)
1485 HRESULT WINAPI
DirectPlayEnumerateW( LPDPENUMDPCALLBACKW lpEnumCallback
, LPVOID lpContext
)
1488 FIXME( dplay
, ":stub\n");
1490 return DPERR_OUTOFMEMORY
;
1494 /***************************************************************************
1495 * DirectPlayCreate (DPLAYX.1) (DPLAY.1)
1498 HRESULT WINAPI DirectPlayCreate
1499 ( LPGUID lpGUID
, LPDIRECTPLAY2
*lplpDP
, IUnknown
*pUnk
)
1502 TRACE(dplay
,"lpGUID=%p lplpDP=%p pUnk=%p\n", lpGUID
,lplpDP
,pUnk
);
1506 /* Hmmm...wonder what this means! */
1507 ERR(dplay
, "What does a NULL here mean?\n" );
1508 return DPERR_OUTOFMEMORY
;
1511 if( IsEqualGUID( &IID_IDirectPlay2A
, lpGUID
) )
1513 IDirectPlay2AImpl
** ilplpDP
=(IDirectPlay2AImpl
**)lplpDP
;
1514 *ilplpDP
= (IDirectPlay2AImpl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1515 sizeof( **ilplpDP
) );
1519 return DPERR_OUTOFMEMORY
;
1522 (*ilplpDP
)->lpvtbl
= &directPlay2AVT
;
1523 (*ilplpDP
)->ref
= 1;
1527 else if( IsEqualGUID( &IID_IDirectPlay2
, lpGUID
) )
1529 IDirectPlay2Impl
** ilplpDP
=(IDirectPlay2Impl
**)lplpDP
;
1530 *ilplpDP
= (IDirectPlay2Impl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1531 sizeof( **ilplpDP
) );
1535 return DPERR_OUTOFMEMORY
;
1538 (*ilplpDP
)->lpvtbl
= &directPlay2WVT
;
1539 (*ilplpDP
)->ref
= 1;
1544 /* Unknown interface type */
1545 return DPERR_NOINTERFACE
;
1549 /* Direct Play helper methods */
1551 /* Get a new interface. To be used by QueryInterface. */
1552 static HRESULT directPlay_QueryInterface
1553 ( REFIID riid
, LPVOID
* ppvObj
)
1556 if( IsEqualGUID( &IID_IDirectPlay2
, riid
) )
1558 IDirectPlay2Impl
* lpDP
= (IDirectPlay2Impl
*)*ppvObj
;
1560 lpDP
= (IDirectPlay2Impl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1565 return DPERR_OUTOFMEMORY
;
1568 lpDP
->lpvtbl
= &directPlay2WVT
;
1573 else if( IsEqualGUID( &IID_IDirectPlay2A
, riid
) )
1575 IDirectPlay2AImpl
* lpDP
= (IDirectPlay2AImpl
*)*ppvObj
;
1577 lpDP
= (IDirectPlay2AImpl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1582 return DPERR_OUTOFMEMORY
;
1585 lpDP
->lpvtbl
= &directPlay2AVT
;
1590 else if( IsEqualGUID( &IID_IDirectPlay3
, riid
) )
1592 IDirectPlay3Impl
* lpDP
= (IDirectPlay3Impl
*)*ppvObj
;
1594 lpDP
= (IDirectPlay3Impl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1599 return DPERR_OUTOFMEMORY
;
1602 lpDP
->lpvtbl
= &directPlay3WVT
;
1607 else if( IsEqualGUID( &IID_IDirectPlay3A
, riid
) )
1609 IDirectPlay3AImpl
* lpDP
= (IDirectPlay3AImpl
*)*ppvObj
;
1611 lpDP
= (IDirectPlay3AImpl
*)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY
,
1616 return DPERR_OUTOFMEMORY
;
1619 lpDP
->lpvtbl
= &directPlay3AVT
;
1627 return E_NOINTERFACE
;
1631 /* Direct Play methods */
1632 static HRESULT WINAPI DirectPlay2W_QueryInterface
1633 ( LPDIRECTPLAY2 iface
, REFIID riid
, LPVOID
* ppvObj
)
1635 ICOM_THIS(IDirectPlay2Impl
,iface
);
1636 TRACE( dplay
, "(%p)->(%p,%p)\n", This
, riid
, ppvObj
);
1638 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1639 IsEqualGUID( &IID_IDirectPlay2
, riid
)
1642 IDirectPlay2_AddRef( iface
);
1646 return directPlay_QueryInterface( riid
, ppvObj
);
1649 static HRESULT WINAPI DirectPlay2A_QueryInterface
1650 ( LPDIRECTPLAY2A iface
, REFIID riid
, LPVOID
* ppvObj
)
1652 ICOM_THIS(IDirectPlay2Impl
,iface
);
1653 TRACE( dplay
, "(%p)->(%p,%p)\n", This
, riid
, ppvObj
);
1655 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1656 IsEqualGUID( &IID_IDirectPlay2A
, riid
)
1659 IDirectPlay2_AddRef( iface
);
1664 return directPlay_QueryInterface( riid
, ppvObj
);
1667 static HRESULT WINAPI DirectPlay3WImpl_QueryInterface
1668 ( LPDIRECTPLAY3 iface
, REFIID riid
, LPVOID
* ppvObj
)
1670 ICOM_THIS(IDirectPlay3Impl
,iface
);
1671 TRACE( dplay
, "(%p)->(%p,%p)\n", This
, riid
, ppvObj
);
1673 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1674 IsEqualGUID( &IID_IDirectPlay3
, riid
)
1677 IDirectPlay3_AddRef( iface
);
1682 return directPlay_QueryInterface( riid
, ppvObj
);
1685 static HRESULT WINAPI DirectPlay3A_QueryInterface
1686 ( LPDIRECTPLAY3A iface
, REFIID riid
, LPVOID
* ppvObj
)
1688 ICOM_THIS(IDirectPlay3Impl
,iface
);
1689 TRACE( dplay
, "(%p)->(%p,%p)\n", This
, riid
, ppvObj
);
1691 if( IsEqualGUID( &IID_IUnknown
, riid
) ||
1692 IsEqualGUID( &IID_IDirectPlay3A
, riid
)
1695 IDirectPlay3_AddRef( iface
);
1700 return directPlay_QueryInterface( riid
, ppvObj
);
1704 /* Shared between all dplay types */
1705 static ULONG WINAPI DirectPlay3WImpl_AddRef
1706 ( LPDIRECTPLAY3 iface
)
1708 ICOM_THIS(IDirectPlay3Impl
,iface
);
1710 TRACE( dplay
,"ref count now %lu\n", This
->ref
);
1714 static ULONG WINAPI DirectPlay3WImpl_Release
1715 ( LPDIRECTPLAY3 iface
)
1717 ICOM_THIS(IDirectPlay3Impl
,iface
);
1718 TRACE( dplay
, "ref count decremeneted from %lu\n", This
->ref
);
1722 /* Deallocate if this is the last reference to the object */
1725 FIXME( dplay
, "memory leak\n" );
1726 /* Implement memory deallocation */
1728 HeapFree( GetProcessHeap(), 0, This
);
1736 static ULONG WINAPI DirectPlay3A_Release
1737 ( LPDIRECTPLAY3A iface
)
1739 ICOM_THIS(IDirectPlay3Impl
,iface
);
1740 TRACE( dplay
, "ref count decremeneted from %lu\n", This
->ref
);
1744 /* Deallocate if this is the last reference to the object */
1747 FIXME( dplay
, "memory leak\n" );
1748 /* Implement memory deallocation */
1750 HeapFree( GetProcessHeap(), 0, This
);
1758 HRESULT WINAPI DirectPlay3A_AddPlayerToGroup
1759 ( LPDIRECTPLAY3A iface
, DPID a
, DPID b
)
1761 ICOM_THIS(IDirectPlay3Impl
,iface
);
1762 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", This
, a
, b
);
1766 HRESULT WINAPI DirectPlay3WImpl_AddPlayerToGroup
1767 ( LPDIRECTPLAY3 iface
, DPID a
, DPID b
)
1769 ICOM_THIS(IDirectPlay3Impl
,iface
);
1770 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", This
, a
, b
);
1775 HRESULT WINAPI DirectPlay3A_Close
1776 ( LPDIRECTPLAY3A iface
)
1778 ICOM_THIS(IDirectPlay3Impl
,iface
);
1779 FIXME( dplay
,"(%p)->(): stub", This
);
1783 HRESULT WINAPI DirectPlay3WImpl_Close
1784 ( LPDIRECTPLAY3 iface
)
1786 ICOM_THIS(IDirectPlay3Impl
,iface
);
1787 FIXME( dplay
,"(%p)->(): stub", This
);
1791 HRESULT WINAPI DirectPlay3A_CreateGroup
1792 ( LPDIRECTPLAY3A iface
, LPDPID a
, LPDPNAME b
, LPVOID c
, DWORD d
, DWORD e
)
1794 ICOM_THIS(IDirectPlay3Impl
,iface
);
1795 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
1799 HRESULT WINAPI DirectPlay3WImpl_CreateGroup
1800 ( LPDIRECTPLAY3 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 DirectPlay3A_CreatePlayer
1808 ( LPDIRECTPLAY3A iface
, LPDPID a
, LPDPNAME b
, HANDLE c
, LPVOID d
, DWORD e
, DWORD f
)
1810 ICOM_THIS(IDirectPlay3Impl
,iface
);
1811 FIXME( dplay
,"(%p)->(%p,%p,%d,%p,0x%08lx,0x%08lx): stub", This
, a
, b
, c
, d
, e
, f
);
1815 HRESULT WINAPI DirectPlay3WImpl_CreatePlayer
1816 ( LPDIRECTPLAY3 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 DirectPlay3A_DeletePlayerFromGroup
1824 ( LPDIRECTPLAY3A iface
, DPID a
, DPID b
)
1826 ICOM_THIS(IDirectPlay3Impl
,iface
);
1827 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", This
, a
, b
);
1831 HRESULT WINAPI DirectPlay3WImpl_DeletePlayerFromGroup
1832 ( LPDIRECTPLAY3 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 DirectPlay3A_DestroyGroup
1840 ( LPDIRECTPLAY3A iface
, DPID a
)
1842 ICOM_THIS(IDirectPlay3Impl
,iface
);
1843 FIXME( dplay
,"(%p)->(0x%08lx): stub", This
, a
);
1847 HRESULT WINAPI DirectPlay3WImpl_DestroyGroup
1848 ( LPDIRECTPLAY3 iface
, DPID a
)
1850 ICOM_THIS(IDirectPlay3Impl
,iface
);
1851 FIXME( dplay
,"(%p)->(0x%08lx): stub", This
, a
);
1855 HRESULT WINAPI DirectPlay3A_DestroyPlayer
1856 ( LPDIRECTPLAY3A iface
, DPID a
)
1858 ICOM_THIS(IDirectPlay3Impl
,iface
);
1859 FIXME( dplay
,"(%p)->(0x%08lx): stub", This
, a
);
1863 HRESULT WINAPI DirectPlay3WImpl_DestroyPlayer
1864 ( LPDIRECTPLAY3 iface
, DPID a
)
1866 ICOM_THIS(IDirectPlay3Impl
,iface
);
1867 FIXME( dplay
,"(%p)->(0x%08lx): stub", This
, a
);
1871 HRESULT WINAPI DirectPlay3A_EnumGroupPlayers
1872 ( LPDIRECTPLAY3A iface
, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
,
1875 ICOM_THIS(IDirectPlay3Impl
,iface
);
1876 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
1880 HRESULT WINAPI DirectPlay3WImpl_EnumGroupPlayers
1881 ( LPDIRECTPLAY3 iface
, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
,
1884 ICOM_THIS(IDirectPlay3Impl
,iface
);
1885 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
1889 HRESULT WINAPI DirectPlay3A_EnumGroups
1890 ( LPDIRECTPLAY3A iface
, LPGUID a
, LPDPENUMPLAYERSCALLBACK2 b
, LPVOID c
, DWORD d
)
1892 ICOM_THIS(IDirectPlay3Impl
,iface
);
1893 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
);
1897 HRESULT WINAPI DirectPlay3WImpl_EnumGroups
1898 ( LPDIRECTPLAY3 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 DirectPlay3A_EnumPlayers
1906 ( LPDIRECTPLAY3A 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 DirectPlay3WImpl_EnumPlayers
1914 ( LPDIRECTPLAY3 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 DirectPlay3A_EnumSessions
1922 ( LPDIRECTPLAY3A iface
, LPDPSESSIONDESC2 a
, DWORD b
, LPDPENUMSESSIONSCALLBACK2 c
,
1925 ICOM_THIS(IDirectPlay3Impl
,iface
);
1926 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
1930 HRESULT WINAPI DirectPlay3WImpl_EnumSessions
1931 ( LPDIRECTPLAY3 iface
, LPDPSESSIONDESC2 a
, DWORD b
, LPDPENUMSESSIONSCALLBACK2 c
,
1934 ICOM_THIS(IDirectPlay3Impl
,iface
);
1935 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
1939 HRESULT WINAPI DirectPlay3A_GetCaps
1940 ( LPDIRECTPLAY3A iface
, LPDPCAPS a
, DWORD b
)
1942 ICOM_THIS(IDirectPlay3Impl
,iface
);
1943 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
1947 HRESULT WINAPI DirectPlay3WImpl_GetCaps
1948 ( LPDIRECTPLAY3 iface
, LPDPCAPS a
, DWORD b
)
1950 ICOM_THIS(IDirectPlay3Impl
,iface
);
1951 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
1955 HRESULT WINAPI DirectPlay3A_GetGroupData
1956 ( LPDIRECTPLAY3 iface
, DPID a
, LPVOID b
, LPDWORD c
, DWORD d
)
1958 ICOM_THIS(IDirectPlay3Impl
,iface
);
1959 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
);
1963 HRESULT WINAPI DirectPlay3WImpl_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 DirectPlay3A_GetGroupName
1972 ( LPDIRECTPLAY3A iface
, DPID a
, LPVOID b
, LPDWORD c
)
1974 ICOM_THIS(IDirectPlay3Impl
,iface
);
1975 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", This
, a
, b
, c
);
1979 HRESULT WINAPI DirectPlay3WImpl_GetGroupName
1980 ( LPDIRECTPLAY3 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 DirectPlay3A_GetMessageCount
1988 ( LPDIRECTPLAY3A iface
, DPID a
, LPDWORD b
)
1990 ICOM_THIS(IDirectPlay3Impl
,iface
);
1991 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
1995 HRESULT WINAPI DirectPlay3WImpl_GetMessageCount
1996 ( LPDIRECTPLAY3 iface
, DPID a
, LPDWORD b
)
1998 ICOM_THIS(IDirectPlay3Impl
,iface
);
1999 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2003 HRESULT WINAPI DirectPlay3A_GetPlayerAddress
2004 ( LPDIRECTPLAY3A iface
, DPID a
, LPVOID b
, LPDWORD c
)
2006 ICOM_THIS(IDirectPlay3Impl
,iface
);
2007 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", This
, a
, b
, c
);
2011 HRESULT WINAPI DirectPlay3WImpl_GetPlayerAddress
2012 ( LPDIRECTPLAY3 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 DirectPlay3A_GetPlayerCaps
2020 ( LPDIRECTPLAY3A iface
, DPID a
, LPDPCAPS b
, DWORD c
)
2022 ICOM_THIS(IDirectPlay3Impl
,iface
);
2023 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", This
, a
, b
, c
);
2027 HRESULT WINAPI DirectPlay3WImpl_GetPlayerCaps
2028 ( LPDIRECTPLAY3 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 DirectPlay3A_GetPlayerData
2036 ( LPDIRECTPLAY3A iface
, DPID a
, LPVOID b
, LPDWORD c
, DWORD d
)
2038 ICOM_THIS(IDirectPlay3Impl
,iface
);
2039 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
);
2043 HRESULT WINAPI DirectPlay3WImpl_GetPlayerData
2044 ( LPDIRECTPLAY3 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 DirectPlay3A_GetPlayerName
2052 ( LPDIRECTPLAY3 iface
, DPID a
, LPVOID b
, LPDWORD c
)
2054 ICOM_THIS(IDirectPlay3Impl
,iface
);
2055 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p): stub", This
, a
, b
, c
);
2059 HRESULT WINAPI DirectPlay3WImpl_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 DirectPlay3A_GetSessionDesc
2068 ( LPDIRECTPLAY3A iface
, LPVOID a
, LPDWORD b
)
2070 ICOM_THIS(IDirectPlay3Impl
,iface
);
2071 FIXME( dplay
,"(%p)->(%p,%p): stub", This
, a
, b
);
2075 HRESULT WINAPI DirectPlay3WImpl_GetSessionDesc
2076 ( LPDIRECTPLAY3 iface
, LPVOID a
, LPDWORD b
)
2078 ICOM_THIS(IDirectPlay3Impl
,iface
);
2079 FIXME( dplay
,"(%p)->(%p,%p): stub", This
, a
, b
);
2083 HRESULT WINAPI DirectPlay3A_Initialize
2084 ( LPDIRECTPLAY3A iface
, LPGUID a
)
2086 ICOM_THIS(IDirectPlay3Impl
,iface
);
2087 FIXME( dplay
,"(%p)->(%p): stub", This
, a
);
2091 HRESULT WINAPI DirectPlay3WImpl_Initialize
2092 ( LPDIRECTPLAY3 iface
, LPGUID a
)
2094 ICOM_THIS(IDirectPlay3Impl
,iface
);
2095 FIXME( dplay
,"(%p)->(%p): stub", This
, a
);
2100 HRESULT WINAPI DirectPlay3A_Open
2101 ( LPDIRECTPLAY3A iface
, LPDPSESSIONDESC2 a
, DWORD b
)
2103 ICOM_THIS(IDirectPlay3Impl
,iface
);
2104 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
2108 HRESULT WINAPI DirectPlay3WImpl_Open
2109 ( LPDIRECTPLAY3 iface
, LPDPSESSIONDESC2 a
, DWORD b
)
2111 ICOM_THIS(IDirectPlay3Impl
,iface
);
2112 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
2116 HRESULT WINAPI DirectPlay3A_Receive
2117 ( LPDIRECTPLAY3A iface
, LPDPID a
, LPDPID b
, DWORD c
, LPVOID d
, LPDWORD e
)
2119 ICOM_THIS(IDirectPlay3Impl
,iface
);
2120 FIXME( dplay
,"(%p)->(%p,%p,0x%08lx,%p,%p): stub", This
, a
, b
, c
, d
, e
);
2124 HRESULT WINAPI DirectPlay3WImpl_Receive
2125 ( LPDIRECTPLAY3 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 DirectPlay3A_Send
2133 ( LPDIRECTPLAY3A iface
, DPID a
, DPID b
, DWORD c
, LPVOID d
, DWORD e
)
2135 ICOM_THIS(IDirectPlay3Impl
,iface
);
2136 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
2140 HRESULT WINAPI DirectPlay3WImpl_Send
2141 ( LPDIRECTPLAY3 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 DirectPlay3A_SetGroupData
2149 ( LPDIRECTPLAY3A iface
, DPID a
, LPVOID b
, DWORD c
, DWORD d
)
2151 ICOM_THIS(IDirectPlay3Impl
,iface
);
2152 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This
, a
, b
, c
, d
);
2156 HRESULT WINAPI DirectPlay3WImpl_SetGroupData
2157 ( LPDIRECTPLAY3 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 DirectPlay3A_SetGroupName
2165 ( LPDIRECTPLAY3A iface
, DPID a
, LPDPNAME b
, DWORD c
)
2167 ICOM_THIS(IDirectPlay3Impl
,iface
);
2168 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", This
, a
, b
, c
);
2172 HRESULT WINAPI DirectPlay3WImpl_SetGroupName
2173 ( LPDIRECTPLAY3 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 DirectPlay3A_SetPlayerData
2181 ( LPDIRECTPLAY3A iface
, DPID a
, LPVOID b
, DWORD c
, DWORD d
)
2183 ICOM_THIS(IDirectPlay3Impl
,iface
);
2184 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx,0x%08lx): stub", This
, a
, b
, c
, d
);
2188 HRESULT WINAPI DirectPlay3WImpl_SetPlayerData
2189 ( LPDIRECTPLAY3 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 DirectPlay3A_SetPlayerName
2197 ( LPDIRECTPLAY3A iface
, DPID a
, LPDPNAME b
, DWORD c
)
2199 ICOM_THIS(IDirectPlay3Impl
,iface
);
2200 FIXME( dplay
,"(%p)->(0x%08lx,%p,0x%08lx): stub", This
, a
, b
, c
);
2204 HRESULT WINAPI DirectPlay3WImpl_SetPlayerName
2205 ( LPDIRECTPLAY3 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 DirectPlay3A_SetSessionDesc
2213 ( LPDIRECTPLAY3A iface
, LPDPSESSIONDESC2 a
, DWORD b
)
2215 ICOM_THIS(IDirectPlay3Impl
,iface
);
2216 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
2220 HRESULT WINAPI DirectPlay3WImpl_SetSessionDesc
2221 ( LPDIRECTPLAY3 iface
, LPDPSESSIONDESC2 a
, DWORD b
)
2223 ICOM_THIS(IDirectPlay3Impl
,iface
);
2224 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
2228 HRESULT WINAPI DirectPlay3A_AddGroupToGroup
2229 ( LPDIRECTPLAY3A iface
, DPID a
, DPID b
)
2231 ICOM_THIS(IDirectPlay3Impl
,iface
);
2232 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", This
, a
, b
);
2236 HRESULT WINAPI DirectPlay3WImpl_AddGroupToGroup
2237 ( LPDIRECTPLAY3 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 DirectPlay3A_CreateGroupInGroup
2245 ( LPDIRECTPLAY3A iface
, DPID a
, LPDPID b
, LPDPNAME c
, LPVOID d
, DWORD e
, DWORD f
)
2247 ICOM_THIS(IDirectPlay3Impl
,iface
);
2248 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx): stub", This
, a
, b
, c
, d
, e
, f
);
2252 HRESULT WINAPI DirectPlay3WImpl_CreateGroupInGroup
2253 ( LPDIRECTPLAY3 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 DirectPlay3A_DeleteGroupFromGroup
2261 ( LPDIRECTPLAY3A iface
, DPID a
, DPID b
)
2263 ICOM_THIS(IDirectPlay3Impl
,iface
);
2264 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", This
, a
, b
);
2268 HRESULT WINAPI DirectPlay3WImpl_DeleteGroupFromGroup
2269 ( LPDIRECTPLAY3 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 DirectPlay3A_EnumConnections
2277 ( LPDIRECTPLAY3A iface
, LPCGUID a
, LPDPENUMCONNECTIONSCALLBACK b
, LPVOID c
, DWORD d
)
2279 ICOM_THIS(IDirectPlay3Impl
,iface
);
2280 FIXME( dplay
,"(%p)->(%p,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
);
2284 HRESULT WINAPI DirectPlay3WImpl_EnumConnections
2285 ( LPDIRECTPLAY3 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 DirectPlay3A_EnumGroupsInGroup
2293 ( LPDIRECTPLAY3A iface
, DPID a
, LPGUID b
, LPDPENUMPLAYERSCALLBACK2 c
, LPVOID d
, DWORD e
)
2295 ICOM_THIS(IDirectPlay3Impl
,iface
);
2296 FIXME( dplay
,"(%p)->(0x%08lx,%p,%p,%p,0x%08lx): stub", This
, a
, b
, c
, d
, e
);
2300 HRESULT WINAPI DirectPlay3WImpl_EnumGroupsInGroup
2301 ( LPDIRECTPLAY3 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 DirectPlay3A_GetGroupConnectionSettings
2309 ( LPDIRECTPLAY3A iface
, DWORD a
, DPID b
, LPVOID c
, LPDWORD d
)
2311 ICOM_THIS(IDirectPlay3Impl
,iface
);
2312 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This
, a
, b
, c
, d
);
2316 HRESULT WINAPI DirectPlay3WImpl_GetGroupConnectionSettings
2317 ( LPDIRECTPLAY3 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 DirectPlay3A_InitializeConnection
2325 ( LPDIRECTPLAY3A iface
, LPVOID a
, DWORD b
)
2327 ICOM_THIS(IDirectPlay3Impl
,iface
);
2328 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
2332 HRESULT WINAPI DirectPlay3WImpl_InitializeConnection
2333 ( LPDIRECTPLAY3 iface
, LPVOID a
, DWORD b
)
2335 ICOM_THIS(IDirectPlay3Impl
,iface
);
2336 FIXME( dplay
,"(%p)->(%p,0x%08lx): stub", This
, a
, b
);
2340 HRESULT WINAPI DirectPlay3A_SecureOpen
2341 ( LPDIRECTPLAY3A iface
, LPCDPSESSIONDESC2 a
, DWORD b
, LPCDPSECURITYDESC c
, LPCDPCREDENTIALS d
)
2343 ICOM_THIS(IDirectPlay3Impl
,iface
);
2344 FIXME( dplay
,"(%p)->(%p,0x%08lx,%p,%p): stub", This
, a
, b
, c
, d
);
2348 HRESULT WINAPI DirectPlay3WImpl_SecureOpen
2349 ( LPDIRECTPLAY3 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 DirectPlay3A_SendChatMessage
2357 ( LPDIRECTPLAY3A iface
, DPID a
, DPID b
, DWORD c
, LPDPCHAT d
)
2359 ICOM_THIS(IDirectPlay3Impl
,iface
);
2360 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub", This
, a
, b
, c
, d
);
2364 HRESULT WINAPI DirectPlay3WImpl_SendChatMessage
2365 ( LPDIRECTPLAY3 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 DirectPlay3A_SetGroupConnectionSettings
2373 ( LPDIRECTPLAY3A iface
, DWORD a
, DPID b
, LPDPLCONNECTION c
)
2375 ICOM_THIS(IDirectPlay3Impl
,iface
);
2376 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p): stub", This
, a
, b
, c
);
2380 HRESULT WINAPI DirectPlay3WImpl_SetGroupConnectionSettings
2381 ( LPDIRECTPLAY3 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 DirectPlay3A_StartSession
2389 ( LPDIRECTPLAY3A iface
, DWORD a
, DPID b
)
2391 ICOM_THIS(IDirectPlay3Impl
,iface
);
2392 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx): stub", This
, a
, b
);
2396 HRESULT WINAPI DirectPlay3WImpl_StartSession
2397 ( LPDIRECTPLAY3 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 DirectPlay3A_GetGroupFlags
2405 ( LPDIRECTPLAY3A iface
, DPID a
, LPDWORD b
)
2407 ICOM_THIS(IDirectPlay3Impl
,iface
);
2408 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2412 HRESULT WINAPI DirectPlay3WImpl_GetGroupFlags
2413 ( LPDIRECTPLAY3 iface
, DPID a
, LPDWORD b
)
2415 ICOM_THIS(IDirectPlay3Impl
,iface
);
2416 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2420 HRESULT WINAPI DirectPlay3A_GetGroupParent
2421 ( LPDIRECTPLAY3A iface
, DPID a
, LPDPID b
)
2423 ICOM_THIS(IDirectPlay3Impl
,iface
);
2424 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2428 HRESULT WINAPI DirectPlay3WImpl_GetGroupParent
2429 ( LPDIRECTPLAY3 iface
, DPID a
, LPDPID b
)
2431 ICOM_THIS(IDirectPlay3Impl
,iface
);
2432 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2436 HRESULT WINAPI DirectPlay3A_GetPlayerAccount
2437 ( LPDIRECTPLAY3A iface
, DPID a
, DWORD b
, LPVOID c
, LPDWORD d
)
2439 ICOM_THIS(IDirectPlay3Impl
,iface
);
2440 FIXME( dplay
,"(%p)->(0x%08lx,0x%08lx,%p,%p): stub", This
, a
, b
, c
, d
);
2444 HRESULT WINAPI DirectPlay3WImpl_GetPlayerAccount
2445 ( LPDIRECTPLAY3 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 DirectPlay3A_GetPlayerFlags
2453 ( LPDIRECTPLAY3A iface
, DPID a
, LPDWORD b
)
2455 ICOM_THIS(IDirectPlay3Impl
,iface
);
2456 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2460 HRESULT WINAPI DirectPlay3WImpl_GetPlayerFlags
2461 ( LPDIRECTPLAY3 iface
, DPID a
, LPDWORD b
)
2463 ICOM_THIS(IDirectPlay3Impl
,iface
);
2464 FIXME( dplay
,"(%p)->(0x%08lx,%p): stub", This
, a
, b
);
2469 /* Note: Hack so we can reuse the old functions without compiler warnings */
2471 # define XCAST(fun) (typeof(directPlay2WVT.fn##fun))
2473 # define XCAST(fun) (void*)
2476 static ICOM_VTABLE(IDirectPlay2
) directPlay2WVT
= {
2477 DirectPlay2W_QueryInterface
,
2478 XCAST(AddRef
)DirectPlay3WImpl_AddRef
,
2479 XCAST(Release
)DirectPlay3WImpl_Release
,
2480 XCAST(AddPlayerToGroup
)DirectPlay3WImpl_AddPlayerToGroup
,
2481 XCAST(Close
)DirectPlay3WImpl_Close
,
2482 XCAST(CreateGroup
)DirectPlay3WImpl_CreateGroup
,
2483 XCAST(CreatePlayer
)DirectPlay3WImpl_CreatePlayer
,
2484 XCAST(DeletePlayerFromGroup
)DirectPlay3WImpl_DeletePlayerFromGroup
,
2485 XCAST(DestroyGroup
)DirectPlay3WImpl_DestroyGroup
,
2486 XCAST(DestroyPlayer
)DirectPlay3WImpl_DestroyPlayer
,
2487 XCAST(EnumGroupPlayers
)DirectPlay3WImpl_EnumGroupPlayers
,
2488 XCAST(EnumGroups
)DirectPlay3WImpl_EnumGroups
,
2489 XCAST(EnumPlayers
)DirectPlay3WImpl_EnumPlayers
,
2490 XCAST(EnumSessions
)DirectPlay3WImpl_EnumSessions
,
2491 XCAST(GetCaps
)DirectPlay3WImpl_GetCaps
,
2492 XCAST(GetGroupData
)DirectPlay3WImpl_GetGroupData
,
2493 XCAST(GetGroupName
)DirectPlay3WImpl_GetGroupName
,
2494 XCAST(GetMessageCount
)DirectPlay3WImpl_GetMessageCount
,
2495 XCAST(GetPlayerAddress
)DirectPlay3WImpl_GetPlayerAddress
,
2496 XCAST(GetPlayerCaps
)DirectPlay3WImpl_GetPlayerCaps
,
2497 XCAST(GetPlayerData
)DirectPlay3WImpl_GetPlayerData
,
2498 XCAST(GetPlayerName
)DirectPlay3WImpl_GetPlayerName
,
2499 XCAST(GetSessionDesc
)DirectPlay3WImpl_GetSessionDesc
,
2500 XCAST(Initialize
)DirectPlay3WImpl_Initialize
,
2501 XCAST(Open
)DirectPlay3WImpl_Open
,
2502 XCAST(Receive
)DirectPlay3WImpl_Receive
,
2503 XCAST(Send
)DirectPlay3WImpl_Send
,
2504 XCAST(SetGroupData
)DirectPlay3WImpl_SetGroupData
,
2505 XCAST(SetGroupName
)DirectPlay3WImpl_SetGroupName
,
2506 XCAST(SetPlayerData
)DirectPlay3WImpl_SetPlayerData
,
2507 XCAST(SetPlayerName
)DirectPlay3WImpl_SetPlayerName
,
2508 XCAST(SetSessionDesc
)DirectPlay3WImpl_SetSessionDesc
2513 /* Note: Hack so we can reuse the old functions without compiler warnings */
2515 # define XCAST(fun) (typeof(directPlay2AVT.fn##fun))
2517 # define XCAST(fun) (void*)
2520 static ICOM_VTABLE(IDirectPlay2
) directPlay2AVT
= {
2521 DirectPlay2A_QueryInterface
,
2522 XCAST(AddRef
)DirectPlay3WImpl_AddRef
,
2523 XCAST(Release
)DirectPlay3A_Release
,
2524 XCAST(AddPlayerToGroup
)DirectPlay3A_AddPlayerToGroup
,
2525 XCAST(Close
)DirectPlay3A_Close
,
2526 XCAST(CreateGroup
)DirectPlay3A_CreateGroup
,
2527 XCAST(CreatePlayer
)DirectPlay3A_CreatePlayer
,
2528 XCAST(DeletePlayerFromGroup
)DirectPlay3A_DeletePlayerFromGroup
,
2529 XCAST(DestroyGroup
)DirectPlay3A_DestroyGroup
,
2530 XCAST(DestroyPlayer
)DirectPlay3A_DestroyPlayer
,
2531 XCAST(EnumGroupPlayers
)DirectPlay3A_EnumGroupPlayers
,
2532 XCAST(EnumGroups
)DirectPlay3A_EnumGroups
,
2533 XCAST(EnumPlayers
)DirectPlay3A_EnumPlayers
,
2534 XCAST(EnumSessions
)DirectPlay3A_EnumSessions
,
2535 XCAST(GetCaps
)DirectPlay3A_GetCaps
,
2536 XCAST(GetGroupData
)DirectPlay3A_GetGroupData
,
2537 XCAST(GetGroupName
)DirectPlay3A_GetGroupName
,
2538 XCAST(GetMessageCount
)DirectPlay3A_GetMessageCount
,
2539 XCAST(GetPlayerAddress
)DirectPlay3A_GetPlayerAddress
,
2540 XCAST(GetPlayerCaps
)DirectPlay3A_GetPlayerCaps
,
2541 XCAST(GetPlayerData
)DirectPlay3A_GetPlayerData
,
2542 XCAST(GetPlayerName
)DirectPlay3A_GetPlayerName
,
2543 XCAST(GetSessionDesc
)DirectPlay3A_GetSessionDesc
,
2544 XCAST(Initialize
)DirectPlay3A_Initialize
,
2545 XCAST(Open
)DirectPlay3A_Open
,
2546 XCAST(Receive
)DirectPlay3A_Receive
,
2547 XCAST(Send
)DirectPlay3A_Send
,
2548 XCAST(SetGroupData
)DirectPlay3A_SetGroupData
,
2549 XCAST(SetGroupName
)DirectPlay3A_SetGroupName
,
2550 XCAST(SetPlayerData
)DirectPlay3A_SetPlayerData
,
2551 XCAST(SetPlayerName
)DirectPlay3A_SetPlayerName
,
2552 XCAST(SetSessionDesc
)DirectPlay3A_SetSessionDesc
2557 static ICOM_VTABLE(IDirectPlay3
) directPlay3AVT
= {
2558 DirectPlay3A_QueryInterface
,
2559 DirectPlay3WImpl_AddRef
,
2560 DirectPlay3A_Release
,
2561 DirectPlay3A_AddPlayerToGroup
,
2563 DirectPlay3A_CreateGroup
,
2564 DirectPlay3A_CreatePlayer
,
2565 DirectPlay3A_DeletePlayerFromGroup
,
2566 DirectPlay3A_DestroyGroup
,
2567 DirectPlay3A_DestroyPlayer
,
2568 DirectPlay3A_EnumGroupPlayers
,
2569 DirectPlay3A_EnumGroups
,
2570 DirectPlay3A_EnumPlayers
,
2571 DirectPlay3A_EnumSessions
,
2572 DirectPlay3A_GetCaps
,
2573 DirectPlay3A_GetGroupData
,
2574 DirectPlay3A_GetGroupName
,
2575 DirectPlay3A_GetMessageCount
,
2576 DirectPlay3A_GetPlayerAddress
,
2577 DirectPlay3A_GetPlayerCaps
,
2578 DirectPlay3A_GetPlayerData
,
2579 DirectPlay3A_GetPlayerName
,
2580 DirectPlay3A_GetSessionDesc
,
2581 DirectPlay3A_Initialize
,
2583 DirectPlay3A_Receive
,
2585 DirectPlay3A_SetGroupData
,
2586 DirectPlay3A_SetGroupName
,
2587 DirectPlay3A_SetPlayerData
,
2588 DirectPlay3A_SetPlayerName
,
2589 DirectPlay3A_SetSessionDesc
,
2591 DirectPlay3A_AddGroupToGroup
,
2592 DirectPlay3A_CreateGroupInGroup
,
2593 DirectPlay3A_DeleteGroupFromGroup
,
2594 DirectPlay3A_EnumConnections
,
2595 DirectPlay3A_EnumGroupsInGroup
,
2596 DirectPlay3A_GetGroupConnectionSettings
,
2597 DirectPlay3A_InitializeConnection
,
2598 DirectPlay3A_SecureOpen
,
2599 DirectPlay3A_SendChatMessage
,
2600 DirectPlay3A_SetGroupConnectionSettings
,
2601 DirectPlay3A_StartSession
,
2602 DirectPlay3A_GetGroupFlags
,
2603 DirectPlay3A_GetGroupParent
,
2604 DirectPlay3A_GetPlayerAccount
,
2605 DirectPlay3A_GetPlayerFlags
2608 static ICOM_VTABLE(IDirectPlay3
) directPlay3WVT
= {
2609 DirectPlay3WImpl_QueryInterface
,
2610 DirectPlay3WImpl_AddRef
,
2611 DirectPlay3WImpl_Release
,
2612 DirectPlay3WImpl_AddPlayerToGroup
,
2613 DirectPlay3WImpl_Close
,
2614 DirectPlay3WImpl_CreateGroup
,
2615 DirectPlay3WImpl_CreatePlayer
,
2616 DirectPlay3WImpl_DeletePlayerFromGroup
,
2617 DirectPlay3WImpl_DestroyGroup
,
2618 DirectPlay3WImpl_DestroyPlayer
,
2619 DirectPlay3WImpl_EnumGroupPlayers
,
2620 DirectPlay3WImpl_EnumGroups
,
2621 DirectPlay3WImpl_EnumPlayers
,
2622 DirectPlay3WImpl_EnumSessions
,
2623 DirectPlay3WImpl_GetCaps
,
2624 DirectPlay3WImpl_GetGroupData
,
2625 DirectPlay3WImpl_GetGroupName
,
2626 DirectPlay3WImpl_GetMessageCount
,
2627 DirectPlay3WImpl_GetPlayerAddress
,
2628 DirectPlay3WImpl_GetPlayerCaps
,
2629 DirectPlay3WImpl_GetPlayerData
,
2630 DirectPlay3WImpl_GetPlayerName
,
2631 DirectPlay3WImpl_GetSessionDesc
,
2632 DirectPlay3WImpl_Initialize
,
2633 DirectPlay3WImpl_Open
,
2634 DirectPlay3WImpl_Receive
,
2635 DirectPlay3WImpl_Send
,
2636 DirectPlay3WImpl_SetGroupData
,
2637 DirectPlay3WImpl_SetGroupName
,
2638 DirectPlay3WImpl_SetPlayerData
,
2639 DirectPlay3WImpl_SetPlayerName
,
2640 DirectPlay3WImpl_SetSessionDesc
,
2642 DirectPlay3WImpl_AddGroupToGroup
,
2643 DirectPlay3WImpl_CreateGroupInGroup
,
2644 DirectPlay3WImpl_DeleteGroupFromGroup
,
2645 DirectPlay3WImpl_EnumConnections
,
2646 DirectPlay3WImpl_EnumGroupsInGroup
,
2647 DirectPlay3WImpl_GetGroupConnectionSettings
,
2648 DirectPlay3WImpl_InitializeConnection
,
2649 DirectPlay3WImpl_SecureOpen
,
2650 DirectPlay3WImpl_SendChatMessage
,
2651 DirectPlay3WImpl_SetGroupConnectionSettings
,
2652 DirectPlay3WImpl_StartSession
,
2653 DirectPlay3WImpl_GetGroupFlags
,
2654 DirectPlay3WImpl_GetGroupParent
,
2655 DirectPlay3WImpl_GetPlayerAccount
,
2656 DirectPlay3WImpl_GetPlayerFlags