Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 744 of file dplaysp.c.
{ HRESULT hr; LPDP_SPPLAYERDATA lpPlayerEntry; LPVOID lpPlayerData; IDirectPlaySPImpl *This = (IDirectPlaySPImpl *)iface; /* TRACE( "Called on process 0x%08lx\n", GetCurrentProcessId() ); */ TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx)\n", This, idPlayer, lpData, dwDataSize, dwFlags ); hr = DP_GetSPPlayerData( This->sp->dplay, idPlayer, (LPVOID*)&lpPlayerEntry ); if( FAILED(hr) ) { /* Player must not exist */ return DPERR_INVALIDPLAYER; } lpPlayerData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwDataSize ); CopyMemory( lpPlayerData, lpData, dwDataSize ); if( dwFlags == DPSET_LOCAL ) { lpPlayerEntry->lpPlayerLocalData = lpPlayerData; lpPlayerEntry->dwPlayerLocalDataSize = dwDataSize; } else if( dwFlags == DPSET_REMOTE ) { lpPlayerEntry->lpPlayerRemoteData = lpPlayerData; lpPlayerEntry->dwPlayerRemoteDataSize = dwDataSize; } hr = DP_SetSPPlayerData( This->sp->dplay, idPlayer, lpPlayerEntry ); return hr; }