2000-08-25 23:58:05 +02:00
|
|
|
/* This contains the implementation of the interface Service
|
2002-06-01 01:06:46 +02:00
|
|
|
* Providers require to communicate with Direct Play
|
2000-08-25 23:58:05 +02:00
|
|
|
*
|
2003-09-29 22:12:05 +02:00
|
|
|
* Copyright 2000 Peter Hunnisett
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2000-08-25 23:58:05 +02:00
|
|
|
*/
|
|
|
|
|
2001-01-26 21:43:40 +01:00
|
|
|
#include <string.h>
|
2000-08-25 23:58:05 +02:00
|
|
|
#include "winerror.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2008-07-22 21:23:05 +02:00
|
|
|
#include "wine/dplaysp.h"
|
2000-08-25 23:58:05 +02:00
|
|
|
#include "dplay_global.h"
|
|
|
|
#include "name_server.h"
|
|
|
|
#include "dplayx_messages.h"
|
|
|
|
|
|
|
|
#include "dplayx_global.h" /* FIXME: For global hack */
|
|
|
|
|
|
|
|
/* FIXME: Need to add interface locking inside procedures */
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dplay);
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
typedef struct IDirectPlaySPImpl
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-05 00:00:03 +02:00
|
|
|
IDirectPlaySP IDirectPlaySP_iface;
|
2013-09-04 23:50:58 +02:00
|
|
|
LONG ref;
|
2013-09-04 23:59:07 +02:00
|
|
|
void *remote_data;
|
|
|
|
DWORD remote_data_size;
|
|
|
|
void *local_data;
|
|
|
|
DWORD local_data_size;
|
|
|
|
IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */
|
|
|
|
} IDirectPlaySPImpl;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2000-10-19 22:20:58 +02:00
|
|
|
/* This structure is passed to the DP object for safe keeping */
|
|
|
|
typedef struct tagDP_SPPLAYERDATA
|
|
|
|
{
|
|
|
|
LPVOID lpPlayerLocalData;
|
|
|
|
DWORD dwPlayerLocalDataSize;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2000-10-19 22:20:58 +02:00
|
|
|
LPVOID lpPlayerRemoteData;
|
|
|
|
DWORD dwPlayerRemoteDataSize;
|
|
|
|
} DP_SPPLAYERDATA, *LPDP_SPPLAYERDATA;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static inline IDirectPlaySPImpl *impl_from_IDirectPlaySP( IDirectPlaySP *iface )
|
|
|
|
{
|
2013-09-05 00:00:03 +02:00
|
|
|
return CONTAINING_RECORD( iface, IDirectPlaySPImpl, IDirectPlaySP_iface );
|
2013-09-04 23:49:25 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 23:47:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_QueryInterface( IDirectPlaySP *iface, REFIID riid,
|
2013-09-04 23:50:58 +02:00
|
|
|
void **ppv )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:50:58 +02:00
|
|
|
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid( riid ), ppv );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
if ( IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IDirectPlaySP, riid ) )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:50:58 +02:00
|
|
|
*ppv = iface;
|
|
|
|
IDirectPlaySP_AddRef( iface );
|
|
|
|
return S_OK;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
FIXME( "Unsupported interface %s\n", debugstr_guid( riid ) );
|
|
|
|
*ppv = NULL;
|
|
|
|
return E_NOINTERFACE;
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:47:25 +02:00
|
|
|
static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2013-09-04 23:50:58 +02:00
|
|
|
ULONG ref = InterlockedIncrement( &This->ref );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
TRACE( "(%p) ref=%d\n", This, ref );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
return ref;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 23:47:25 +02:00
|
|
|
static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2013-09-04 23:50:58 +02:00
|
|
|
ULONG ref = InterlockedDecrement( &This->ref );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
TRACE( "(%p) ref=%d\n", This, ref );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
if( !ref )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:59:07 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, This->remote_data );
|
|
|
|
HeapFree( GetProcessHeap(), 0, This->local_data );
|
2000-08-25 23:58:05 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, This );
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:50:58 +02:00
|
|
|
return ref;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry( IDirectPlaySP *iface, LPCWSTR lpSection,
|
|
|
|
LPCWSTR lpKey, const void *lpData, DWORD dwDataSize, DWORD dwMaxEntries )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
/* Should be able to call the comctl32 undocumented MRU routines.
|
|
|
|
I suspect that the interface works appropriately */
|
2006-10-10 01:07:17 +02:00
|
|
|
FIXME( "(%p)->(%p,%p%p,0x%08x,0x%08x): stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, lpSection, lpKey, lpData, dwDataSize, dwMaxEntries );
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress( IDirectPlaySP *iface, REFGUID guidSP,
|
|
|
|
REFGUID guidDataType, const void *lpData, DWORD dwDataSize, void *lpAddress,
|
|
|
|
DWORD *lpdwAddressSize )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
FIXME( "(%p)->(%s,%s,%p,0x%08x,%p,%p): stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, debugstr_guid(guidSP), debugstr_guid(guidDataType),
|
|
|
|
lpData, dwDataSize, lpAddress, lpdwAddressSize );
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress( IDirectPlaySP *iface,
|
|
|
|
LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, const void *lpAddress, DWORD dwAddressSize,
|
|
|
|
void *lpContext )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
TRACE( "(%p)->(%p,%p,0x%08x,%p)\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
|
|
|
|
|
|
|
|
DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_EnumMRUEntries( IDirectPlaySP *iface, LPCWSTR lpSection,
|
|
|
|
LPCWSTR lpKey, LPENUMMRUCALLBACK lpEnumMRUCallback, void *lpContext )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
/* Should be able to call the comctl32 undocumented MRU routines.
|
|
|
|
I suspect that the interface works appropriately */
|
2002-06-01 01:06:46 +02:00
|
|
|
FIXME( "(%p)->(%p,%p,%p,%p,): stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, lpSection, lpKey, lpEnumMRUCallback, lpContext );
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags( IDirectPlaySP *iface, DPID idPlayer,
|
|
|
|
DWORD *lpdwPlayerFlags )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
FIXME( "(%p)->(0x%08x,%p): stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, idPlayer, lpdwPlayerFlags );
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData( IDirectPlaySP *iface, DPID idPlayer,
|
|
|
|
void **lplpData, DWORD *lpdwDataSize, DWORD dwFlags )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-10-19 22:20:58 +02:00
|
|
|
HRESULT hr;
|
|
|
|
LPDP_SPPLAYERDATA lpPlayerData;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, idPlayer, lplpData, lpdwDataSize, dwFlags );
|
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerData );
|
2000-10-19 22:20:58 +02:00
|
|
|
|
|
|
|
if( FAILED(hr) )
|
|
|
|
{
|
|
|
|
TRACE( "Couldn't get player data: %s\n", DPLAYX_HresultToString(hr) );
|
|
|
|
return DPERR_INVALIDPLAYER;
|
|
|
|
}
|
|
|
|
|
2000-09-27 01:11:48 +02:00
|
|
|
/* What to do in the case where there is nothing set yet? */
|
2000-10-19 22:20:58 +02:00
|
|
|
if( dwFlags == DPSET_LOCAL )
|
|
|
|
{
|
|
|
|
*lplpData = lpPlayerData->lpPlayerLocalData;
|
|
|
|
*lpdwDataSize = lpPlayerData->dwPlayerLocalDataSize;
|
|
|
|
}
|
|
|
|
else if( dwFlags == DPSET_REMOTE )
|
|
|
|
{
|
|
|
|
*lplpData = lpPlayerData->lpPlayerRemoteData;
|
|
|
|
*lpdwDataSize = lpPlayerData->dwPlayerRemoteDataSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( *lplpData == NULL )
|
|
|
|
{
|
|
|
|
hr = DPERR_GENERIC;
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
2000-10-19 22:20:58 +02:00
|
|
|
|
|
|
|
return hr;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage( IDirectPlaySP *iface, void *lpMessageBody,
|
|
|
|
DWORD dwMessageBodySize, void *lpMessageHeader )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SENDENVELOPE lpMsg = lpMessageBody;
|
2000-08-25 23:58:05 +02:00
|
|
|
HRESULT hr = DPERR_GENERIC;
|
2000-08-30 01:55:06 +02:00
|
|
|
WORD wCommandId;
|
|
|
|
WORD wVersion;
|
2001-04-12 23:10:54 +02:00
|
|
|
DPSP_REPLYDATA data;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
FIXME( "(%p)->(%p,0x%08x,%p): mostly stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, lpMessageBody, dwMessageBodySize, lpMessageHeader );
|
|
|
|
|
2000-08-30 01:55:06 +02:00
|
|
|
wCommandId = lpMsg->wCommandId;
|
|
|
|
wVersion = lpMsg->wVersion;
|
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
TRACE( "Incoming message has envelope of 0x%08x, %u, %u\n",
|
2000-08-30 01:55:06 +02:00
|
|
|
lpMsg->dwMagic, wCommandId, wVersion );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
if( lpMsg->dwMagic != DPMSGMAGIC_DPLAYMSG )
|
|
|
|
{
|
2006-10-10 01:07:17 +02:00
|
|
|
ERR( "Unknown magic 0x%08x!\n", lpMsg->dwMagic );
|
2001-04-12 23:10:54 +02:00
|
|
|
return DPERR_GENERIC;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
#if 0
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
const LPDWORD lpcHeader = lpMessageHeader;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
TRACE( "lpMessageHeader = [0x%08lx] [0x%08lx] [0x%08lx] [0x%08lx] [0x%08lx]\n",
|
|
|
|
lpcHeader[0], lpcHeader[1], lpcHeader[2], lpcHeader[3], lpcHeader[4] );
|
|
|
|
}
|
|
|
|
#endif
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
/* Pass everything else to Direct Play */
|
|
|
|
data.lpMessage = NULL;
|
|
|
|
data.dwMessageSize = 0;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
/* Pass this message to the dplay interface to handle */
|
2013-09-04 23:59:07 +02:00
|
|
|
hr = DP_HandleMessage( This->dplay, lpMessageBody, dwMessageBodySize, lpMessageHeader,
|
|
|
|
wCommandId, wVersion, &data.lpMessage, &data.dwMessageSize );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
if( FAILED(hr) )
|
|
|
|
{
|
|
|
|
ERR( "Command processing failed %s\n", DPLAYX_HresultToString(hr) );
|
|
|
|
}
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
/* Do we want a reply? */
|
|
|
|
if( data.lpMessage != NULL )
|
|
|
|
{
|
|
|
|
data.lpSPMessageHeader = lpMessageHeader;
|
|
|
|
data.idNameServer = 0;
|
|
|
|
data.lpISP = iface;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
hr = This->dplay->dp2->spData.lpCB->Reply( &data );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
if( FAILED(hr) )
|
2000-08-30 01:55:06 +02:00
|
|
|
{
|
2001-04-12 23:10:54 +02:00
|
|
|
ERR( "Reply failed %s\n", DPLAYX_HresultToString(hr) );
|
2000-08-30 01:55:06 +02:00
|
|
|
}
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2001-04-12 23:10:54 +02:00
|
|
|
return hr;
|
|
|
|
|
2000-08-25 23:58:05 +02:00
|
|
|
#if 0
|
|
|
|
HRESULT hr = DP_OK;
|
|
|
|
HANDLE hReceiveEvent = 0;
|
2006-11-07 00:37:42 +01:00
|
|
|
/* FIXME: Acquire some sort of interface lock */
|
2000-08-25 23:58:05 +02:00
|
|
|
/* FIXME: Need some sort of context for this callback. Need to determine
|
|
|
|
* how this is actually done with the SP
|
|
|
|
*/
|
2000-08-30 01:55:06 +02:00
|
|
|
/* FIXME: Who needs to delete the message when done? */
|
2000-08-25 23:58:05 +02:00
|
|
|
switch( lpMsg->dwType )
|
|
|
|
{
|
|
|
|
case DPSYS_CREATEPLAYERORGROUP:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_CREATEPLAYERORGROUP msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
if( msg->dwPlayerType == DPPLAYERTYPE_PLAYER )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
hr = DP_IF_CreatePlayer( This, lpMessageHeader, msg->dpId,
|
|
|
|
&msg->dpnName, 0, msg->lpData,
|
2000-08-25 23:58:05 +02:00
|
|
|
msg->dwDataSize, msg->dwFlags, ... );
|
|
|
|
}
|
|
|
|
else if( msg->dwPlayerType == DPPLAYERTYPE_GROUP )
|
|
|
|
{
|
|
|
|
/* Group in group situation? */
|
|
|
|
if( msg->dpIdParent == DPID_NOPARENT_GROUP )
|
|
|
|
{
|
2002-06-01 01:06:46 +02:00
|
|
|
hr = DP_IF_CreateGroup( This, lpMessageHeader, msg->dpId,
|
|
|
|
&msg->dpnName, 0, msg->lpData,
|
2000-08-25 23:58:05 +02:00
|
|
|
msg->dwDataSize, msg->dwFlags, ... );
|
|
|
|
}
|
|
|
|
else /* Group in Group */
|
|
|
|
{
|
|
|
|
hr = DP_IF_CreateGroupInGroup( This, lpMessageHeader, msg->dpIdParent,
|
2002-06-01 01:06:46 +02:00
|
|
|
&msg->dpnName, 0, msg->lpData,
|
2000-08-25 23:58:05 +02:00
|
|
|
msg->dwDataSize, msg->dwFlags, ... );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else /* Hmmm? */
|
|
|
|
{
|
|
|
|
ERR( "Corrupt msg->dwPlayerType for DPSYS_CREATEPLAYERORGROUP\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_DESTROYPLAYERORGROUP:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_DESTROYPLAYERORGROUP msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
if( msg->dwPlayerType == DPPLAYERTYPE_PLAYER )
|
|
|
|
{
|
|
|
|
hr = DP_IF_DestroyPlayer( This, msg->dpId, ... );
|
|
|
|
}
|
|
|
|
else if( msg->dwPlayerType == DPPLAYERTYPE_GROUP )
|
|
|
|
{
|
|
|
|
hr = DP_IF_DestroyGroup( This, msg->dpId, ... );
|
|
|
|
}
|
|
|
|
else /* Hmmm? */
|
|
|
|
{
|
|
|
|
ERR( "Corrupt msg->dwPlayerType for DPSYS_DESTROYPLAYERORGROUP\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_ADDPLAYERTOGROUP:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_ADDPLAYERTOGROUP msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
hr = DP_IF_AddPlayerToGroup( This, msg->dpIdGroup, msg->dpIdPlayer, ... );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_DELETEPLAYERFROMGROUP:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_DELETEPLAYERFROMGROUP msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
hr = DP_IF_DeletePlayerFromGroup( This, msg->dpIdGroup, msg->dpIdPlayer,
|
|
|
|
... );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_SESSIONLOST:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SESSIONLOST msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_SESSIONLOST not handled\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_HOST:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_HOST msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_HOST not handled\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_SETPLAYERORGROUPDATA:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SETPLAYERORGROUPDATA msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
if( msg->dwPlayerType == DPPLAYERTYPE_PLAYER )
|
|
|
|
{
|
|
|
|
hr = DP_IF_SetPlayerData( This, msg->dpId, msg->lpData, msg->dwDataSize, DPSET_REMOTE, ... );
|
|
|
|
}
|
|
|
|
else if( msg->dwPlayerType == DPPLAYERTYPE_GROUP )
|
|
|
|
{
|
|
|
|
hr = DP_IF_SetGroupData( This, msg->dpId, msg->lpData, msg->dwDataSize,
|
|
|
|
DPSET_REMOTE, ... );
|
|
|
|
}
|
|
|
|
else /* Hmmm? */
|
|
|
|
{
|
|
|
|
ERR( "Corrupt msg->dwPlayerType for LPDPMSG_SETPLAYERORGROUPDATA\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_SETPLAYERORGROUPNAME:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SETPLAYERORGROUPNAME msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
if( msg->dwPlayerType == DPPLAYERTYPE_PLAYER )
|
|
|
|
{
|
|
|
|
hr = DP_IF_SetPlayerName( This, msg->dpId, msg->dpnName, ... );
|
|
|
|
}
|
|
|
|
else if( msg->dwPlayerType == DPPLAYERTYPE_GROUP )
|
|
|
|
{
|
|
|
|
hr = DP_IF_SetGroupName( This, msg->dpId, msg->dpnName, ... );
|
|
|
|
}
|
|
|
|
else /* Hmmm? */
|
|
|
|
{
|
|
|
|
ERR( "Corrupt msg->dwPlayerType for LPDPMSG_SETPLAYERORGROUPDATA\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_SETSESSIONDESC;
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SETSESSIONDESC msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
hr = DP_IF_SetSessionDesc( This, &msg->dpDesc );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_ADDGROUPTOGROUP:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_ADDGROUPTOGROUP msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
hr = DP_IF_AddGroupToGroup( This, msg->dpIdParentGroup, msg->dpIdGroup,
|
|
|
|
... );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_DELETEGROUPFROMGROUP:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_DELETEGROUPFROMGROUP msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
hr = DP_IF_DeleteGroupFromGroup( This, msg->dpIdParentGroup,
|
|
|
|
msg->dpIdGroup, ... );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_SECUREMESSAGE:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SECUREMESSAGE msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_SECUREMESSAGE not implemented\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_STARTSESSION:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_STARTSESSION msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_STARTSESSION not implemented\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_CHAT:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_CHAT msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_CHAT not implemeneted\n" );
|
|
|
|
|
|
|
|
break;
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
case DPSYS_SETGROUPOWNER:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SETGROUPOWNER msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_SETGROUPOWNER not implemented\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case DPSYS_SENDCOMPLETE:
|
|
|
|
{
|
2009-01-16 09:53:59 +01:00
|
|
|
LPDPMSG_SENDCOMPLETE msg = lpMsg;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
FIXME( "DPSYS_SENDCOMPLETE not implemented\n" );
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
/* NOTE: This should be a user defined type. There is nothing that we
|
|
|
|
* need to do with it except queue it.
|
|
|
|
*/
|
|
|
|
TRACE( "Received user message type(?) 0x%08lx through SP.\n",
|
|
|
|
lpMsg->dwType );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FIXME( "Queue message in the receive queue. Need some context data!\n" );
|
|
|
|
|
|
|
|
if( FAILED(hr) )
|
|
|
|
{
|
|
|
|
ERR( "Unable to perform action for msg type 0x%08lx\n", lpMsg->dwType );
|
|
|
|
}
|
2001-05-18 23:01:38 +02:00
|
|
|
/* If a receive event was registered for this player, invoke it */
|
2000-08-25 23:58:05 +02:00
|
|
|
if( hReceiveEvent )
|
|
|
|
{
|
|
|
|
SetEvent( hReceiveEvent );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, DPID idPlayer,
|
|
|
|
void *lpData, DWORD dwDataSize, DWORD dwFlags )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-10-19 22:20:58 +02:00
|
|
|
HRESULT hr;
|
|
|
|
LPDP_SPPLAYERDATA lpPlayerEntry;
|
2002-06-01 01:06:46 +02:00
|
|
|
LPVOID lpPlayerData;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:54:27 +02:00
|
|
|
TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, idPlayer, lpData, dwDataSize, dwFlags );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerEntry );
|
2000-10-19 22:20:58 +02:00
|
|
|
if( FAILED(hr) )
|
|
|
|
{
|
|
|
|
/* Player must not exist */
|
|
|
|
return DPERR_INVALIDPLAYER;
|
|
|
|
}
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2000-10-19 22:20:58 +02:00
|
|
|
lpPlayerData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwDataSize );
|
|
|
|
CopyMemory( lpPlayerData, lpData, dwDataSize );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2000-10-19 22:20:58 +02:00
|
|
|
if( dwFlags == DPSET_LOCAL )
|
|
|
|
{
|
|
|
|
lpPlayerEntry->lpPlayerLocalData = lpPlayerData;
|
|
|
|
lpPlayerEntry->dwPlayerLocalDataSize = dwDataSize;
|
|
|
|
}
|
|
|
|
else if( dwFlags == DPSET_REMOTE )
|
|
|
|
{
|
|
|
|
lpPlayerEntry->lpPlayerRemoteData = lpPlayerData;
|
|
|
|
lpPlayerEntry->dwPlayerRemoteDataSize = dwDataSize;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
hr = DP_SetSPPlayerData( This->dplay, idPlayer, lpPlayerEntry );
|
2000-10-19 22:20:58 +02:00
|
|
|
|
|
|
|
return hr;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress( IDirectPlaySP *iface,
|
|
|
|
const DPCOMPOUNDADDRESSELEMENT *lpElements, DWORD dwElementCount, void *lpAddress,
|
|
|
|
DWORD *lpdwAddressSize )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
FIXME( "(%p)->(%p,0x%08x,%p,%p): stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, lpElements, dwElementCount, lpAddress, lpdwAddressSize );
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void **lplpData,
|
|
|
|
DWORD *lpdwDataSize, DWORD dwFlags )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-10-19 22:20:58 +02:00
|
|
|
HRESULT hr = DP_OK;
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2013-09-04 23:54:27 +02:00
|
|
|
TRACE( "(%p)->(%p,%p,0x%08x)\n", This, lplpData, lpdwDataSize, dwFlags );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* This is what the documentation says... */
|
2000-10-19 22:20:58 +02:00
|
|
|
if( dwFlags != DPSET_REMOTE )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
|
|
|
return DPERR_INVALIDPARAMS;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
/* ... but most service providers call this with 1 */
|
|
|
|
/* Guess that this is using a DPSET_LOCAL or DPSET_REMOTE type of
|
|
|
|
* thing?
|
|
|
|
*/
|
2000-10-19 22:20:58 +02:00
|
|
|
if( dwFlags != DPSET_REMOTE )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2006-10-10 01:07:17 +02:00
|
|
|
TRACE( "Undocumented dwFlags 0x%08x used\n", dwFlags );
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-09-27 01:11:48 +02:00
|
|
|
/* FIXME: What to do in the case where this isn't initialized yet? */
|
|
|
|
|
2000-08-25 23:58:05 +02:00
|
|
|
/* Yes, we're supposed to return a pointer to the memory we have stored! */
|
|
|
|
if( dwFlags == DPSET_REMOTE )
|
|
|
|
{
|
2013-09-04 23:59:07 +02:00
|
|
|
*lpdwDataSize = This->remote_data_size;
|
|
|
|
*lplpData = This->remote_data;
|
2000-10-19 22:20:58 +02:00
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
if( !This->remote_data )
|
2000-10-19 22:20:58 +02:00
|
|
|
hr = DPERR_GENERIC;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
else if( dwFlags == DPSET_LOCAL )
|
|
|
|
{
|
2013-09-04 23:59:07 +02:00
|
|
|
*lpdwDataSize = This->local_data_size;
|
|
|
|
*lplpData = This->local_data;
|
2000-10-19 22:20:58 +02:00
|
|
|
|
2013-09-04 23:59:07 +02:00
|
|
|
if( !This->local_data )
|
2000-10-19 22:20:58 +02:00
|
|
|
hr = DPERR_GENERIC;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2000-10-19 22:20:58 +02:00
|
|
|
return hr;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *lpData,
|
|
|
|
DWORD dwDataSize, DWORD dwFlags )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
LPVOID lpSpData;
|
|
|
|
|
2013-09-04 23:54:27 +02:00
|
|
|
TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", This, lpData, dwDataSize, dwFlags );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* This is what the documentation says... */
|
2000-10-19 22:20:58 +02:00
|
|
|
if( dwFlags != DPSET_REMOTE )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
|
|
|
return DPERR_INVALIDPARAMS;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
/* ... but most service providers call this with 1 */
|
|
|
|
/* Guess that this is using a DPSET_LOCAL or DPSET_REMOTE type of
|
|
|
|
* thing?
|
|
|
|
*/
|
2000-10-19 22:20:58 +02:00
|
|
|
if( dwFlags != DPSET_REMOTE )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2006-10-10 01:07:17 +02:00
|
|
|
TRACE( "Undocumented dwFlags 0x%08x used\n", dwFlags );
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-10-19 22:20:58 +02:00
|
|
|
lpSpData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwDataSize );
|
2000-08-25 23:58:05 +02:00
|
|
|
CopyMemory( lpSpData, lpData, dwDataSize );
|
|
|
|
|
|
|
|
/* If we have data already allocated, free it and replace it */
|
|
|
|
if( dwFlags == DPSET_REMOTE )
|
|
|
|
{
|
2013-09-04 23:59:07 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, This->remote_data );
|
|
|
|
This->remote_data_size = dwDataSize;
|
|
|
|
This->remote_data = lpSpData;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
else if ( dwFlags == DPSET_LOCAL )
|
|
|
|
{
|
2013-09-04 23:59:07 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, This->local_data );
|
|
|
|
This->local_data = lpSpData;
|
|
|
|
This->local_data_size = dwDataSize;
|
2000-08-25 23:58:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return DP_OK;
|
|
|
|
}
|
|
|
|
|
2013-09-04 23:49:25 +02:00
|
|
|
static void WINAPI IDirectPlaySPImpl_SendComplete( IDirectPlaySP *iface, void *unknownA,
|
|
|
|
DWORD unknownB )
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:49:25 +02:00
|
|
|
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
|
2000-08-25 23:58:05 +02:00
|
|
|
|
2006-10-10 01:07:17 +02:00
|
|
|
FIXME( "(%p)->(%p,0x%08x): stub\n",
|
2000-08-25 23:58:05 +02:00
|
|
|
This, unknownA, unknownB );
|
|
|
|
}
|
|
|
|
|
2005-06-01 21:57:42 +02:00
|
|
|
static const IDirectPlaySPVtbl directPlaySPVT =
|
2000-08-25 23:58:05 +02:00
|
|
|
{
|
2013-09-04 23:47:25 +02:00
|
|
|
IDirectPlaySPImpl_QueryInterface,
|
|
|
|
IDirectPlaySPImpl_AddRef,
|
|
|
|
IDirectPlaySPImpl_Release,
|
2000-08-25 23:58:05 +02:00
|
|
|
IDirectPlaySPImpl_AddMRUEntry,
|
|
|
|
IDirectPlaySPImpl_CreateAddress,
|
|
|
|
IDirectPlaySPImpl_EnumAddress,
|
|
|
|
IDirectPlaySPImpl_EnumMRUEntries,
|
|
|
|
IDirectPlaySPImpl_GetPlayerFlags,
|
|
|
|
IDirectPlaySPImpl_GetSPPlayerData,
|
|
|
|
IDirectPlaySPImpl_HandleMessage,
|
|
|
|
IDirectPlaySPImpl_SetSPPlayerData,
|
|
|
|
IDirectPlaySPImpl_CreateCompoundAddress,
|
|
|
|
IDirectPlaySPImpl_GetSPData,
|
|
|
|
IDirectPlaySPImpl_SetSPData,
|
|
|
|
IDirectPlaySPImpl_SendComplete
|
|
|
|
};
|
2000-10-19 22:20:58 +02:00
|
|
|
|
2013-09-05 00:01:20 +02:00
|
|
|
HRESULT dplaysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp )
|
|
|
|
{
|
|
|
|
IDirectPlaySPImpl *obj;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE( "(%s, %p)\n", debugstr_guid( riid ), ppv );
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
obj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *obj ) );
|
|
|
|
if ( !obj )
|
|
|
|
return DPERR_OUTOFMEMORY;
|
|
|
|
|
|
|
|
obj->IDirectPlaySP_iface.lpVtbl = &directPlaySPVT;
|
|
|
|
obj->ref = 1;
|
|
|
|
obj->dplay = dp;
|
|
|
|
|
|
|
|
hr = IDirectPlaySP_QueryInterface( &obj->IDirectPlaySP_iface, riid, ppv );
|
|
|
|
IDirectPlaySP_Release( &obj->IDirectPlaySP_iface );
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
2000-10-19 22:20:58 +02:00
|
|
|
|
|
|
|
/* DP external interfaces to call into DPSP interface */
|
|
|
|
|
|
|
|
/* Allocate the structure */
|
2008-05-21 22:50:32 +02:00
|
|
|
LPVOID DPSP_CreateSPPlayerData(void)
|
2000-10-19 22:20:58 +02:00
|
|
|
{
|
|
|
|
TRACE( "Creating SPPlayer data struct\n" );
|
2002-06-01 01:06:46 +02:00
|
|
|
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
|
2000-10-19 22:20:58 +02:00
|
|
|
sizeof( DP_SPPLAYERDATA ) );
|
|
|
|
}
|