dplayx: Cast-qual warnings fix.

This commit is contained in:
Andrew Talbot 2006-09-10 00:14:23 +01:00 committed by Alexandre Julliard
parent ba645eaab1
commit ded7d0bcd5
3 changed files with 12 additions and 13 deletions

View File

@ -691,7 +691,7 @@ HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody,
/* No reply expected */
NS_AddRemoteComputerAsNameServer( lpcMessageHeader,
This->dp2->spData.dwSPHeaderSize,
(LPDPMSG_ENUMSESSIONSREPLY)lpcMessageBody,
lpcMessageBody,
This->dp2->lpNameServerData );
break;
}
@ -742,7 +742,7 @@ HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody,
#if 1
case DPMSGCMD_JUSTENVELOPE:
{
TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08lx\n", lpcMessageHeader, ((LPDWORD)lpcMessageHeader)[1] );
TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08lx\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] );
NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 );
DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize );
}

View File

@ -96,21 +96,20 @@ static DPQ_DECL_COMPARECB( cbUglyPig, GUID )
}
/* Store the given NS remote address for future reference */
/* FIXME: LPDPMSG_ENUMSESSIONSREPLY should be const */
void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr,
DWORD dwHdrSize,
LPDPMSG_ENUMSESSIONSREPLY lpMsg,
LPVOID lpNSInfo )
void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr,
DWORD dwHdrSize,
LPCDPMSG_ENUMSESSIONSREPLY lpcMsg,
LPVOID lpNSInfo )
{
DWORD len;
lpNSCache lpCache = (lpNSCache)lpNSInfo;
lpNSCacheData lpCacheNode;
TRACE( "%p, %p, %p\n", lpcNSAddrHdr, lpMsg, lpNSInfo );
TRACE( "%p, %p, %p\n", lpcNSAddrHdr, lpcMsg, lpNSInfo );
/* See if we can find this session. If we can, remove it as it's a dup */
DPQ_REMOVE_ENTRY_CB( lpCache->first, next, data->guidInstance, cbUglyPig,
lpMsg->sd.guidInstance, lpCacheNode );
lpcMsg->sd.guidInstance, lpCacheNode );
if( lpCacheNode != NULL )
{
@ -140,11 +139,11 @@ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr,
return;
}
CopyMemory( lpCacheNode->data, &lpMsg->sd, sizeof( *lpCacheNode->data ) );
len = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)(lpMsg+1), -1, NULL, 0, NULL, NULL );
CopyMemory( lpCacheNode->data, &lpcMsg->sd, sizeof( *lpCacheNode->data ) );
len = WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)(lpcMsg+1), -1, NULL, 0, NULL, NULL );
if ((lpCacheNode->data->u1.lpszSessionNameA = HeapAlloc( GetProcessHeap(), 0, len )))
{
WideCharToMultiByte( CP_ACP, 0, (LPWSTR)(lpMsg+1), -1,
WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)(lpcMsg+1), -1,
lpCacheNode->data->u1.lpszSessionNameA, len, NULL, NULL );
}

View File

@ -32,7 +32,7 @@ void NS_SetLocalComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo );
void NS_SetRemoteComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo );
void NS_AddRemoteComputerAsNameServer( LPCVOID lpNSAddrHdr,
DWORD dwHdrSize,
LPDPMSG_ENUMSESSIONSREPLY lpMsg,
LPCDPMSG_ENUMSESSIONSREPLY lpcMsg,
LPVOID lpNSInfo );
LPVOID NS_GetNSAddr( LPVOID lpNSInfo );
DWORD NS_GetNsMagic( LPVOID lpNSInfo );