Commit bc08f327 authored by Sami Aario's avatar Sami Aario Committed by Alexandre Julliard

Fix some return values of dplayx API calls.

parent 5c922669
......@@ -1853,6 +1853,11 @@ static HRESULT WINAPI DP_IF_DestroyPlayer
FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n",
This, lpMsgHdr, idPlayer, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
{
return DPERR_UNINITIALIZED;
}
if( DP_FindPlayer( This, idPlayer ) == NULL )
{
return DPERR_INVALIDPLAYER;
......@@ -1950,6 +1955,11 @@ static HRESULT WINAPI DP_IF_EnumGroupPlayers
This, idGroup, lpguidInstance, lpEnumPlayersCallback2,
lpContext, dwFlags, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
{
return DPERR_UNINITIALIZED;
}
/* Find the group */
if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL )
{
......@@ -2609,6 +2619,11 @@ static HRESULT WINAPI DP_IF_GetPlayerData
TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx,%u)\n",
This, idPlayer, lpData, lpdwDataSize, dwFlags, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
{
return DPERR_UNINITIALIZED;
}
if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL )
{
return DPERR_INVALIDPLAYER;
......@@ -2750,6 +2765,11 @@ static HRESULT WINAPI DP_GetSessionDesc
TRACE( "(%p)->(%p,%p,%u)\n", This, lpData, lpdwDataSize, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
{
return DPERR_UNINITIALIZED;
}
if( ( lpData == NULL ) && ( lpdwDataSize == NULL ) )
{
return DPERR_INVALIDPARAMS;
......@@ -2930,6 +2950,11 @@ static HRESULT WINAPI DP_IF_Receive
FIXME( "(%p)->(%p,%p,0x%08lx,%p,%p,%u): stub\n",
This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
{
return DPERR_UNINITIALIZED;
}
if( dwFlags == 0 )
{
dwFlags = DPRECEIVE_ALL;
......@@ -3213,6 +3238,11 @@ static HRESULT WINAPI DP_SetSessionDesc
TRACE( "(%p)->(%p,0x%08lx,%u,%u)\n",
This, lpSessDesc, dwFlags, bInitial, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
{
return DPERR_UNINITIALIZED;
}
if( dwFlags )
{
return DPERR_INVALIDPARAMS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment