亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sessioninfo.cpp

?? VC游戲編程基礎
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
            
            if( m_eType == SERVER )
            {
                // Clients receive all their information from the server,
                // so bundle up the new player's name and flags, and broadcast
                // to the session.
                SendPlayerInfoToAll( pMsg->dpnidPlayer );
                SynchronizeWithPlayer( pMsg->dpnidPlayer );
            }   

            // Invalidate the dialog
            m_bDlgValid = FALSE;

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Create Player: player 0x%x"), 
                        pMsg->dpnidPlayer );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_DESTROY_GROUP:
        {
            DPNMSG_DESTROY_GROUP* pMsg = (DPNMSG_DESTROY_GROUP*) pMsgBuffer;
        
            Lock();
            hr = DestroyGroup( pMsg->dpnidGroup );
            Unlock();
             
            // Invalidate the dialog
            m_bDlgValid = FALSE;

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Destroy Group: group 0x%x"), 
                        pMsg->dpnidGroup );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_DESTROY_PLAYER:
        {
            DPNMSG_DESTROY_PLAYER* pMsg = (DPNMSG_DESTROY_PLAYER*) pMsgBuffer;
        
            Lock();
            hr = DestroyPlayer( pMsg->dpnidPlayer );
            Unlock();   
            
            // Invalidate the dialog
            m_bDlgValid = FALSE;

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Destroy Player: player 0x%x"), 
                        pMsg->dpnidPlayer );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_ENUM_HOSTS_QUERY:
        {
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Enum Hosts Query") );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_ENUM_HOSTS_RESPONSE:
        {
            DPNMSG_ENUM_HOSTS_RESPONSE* pMsg = (DPNMSG_ENUM_HOSTS_RESPONSE*) pMsgBuffer;
        
            // Log the message
            TCHAR szSessionName[200];
            DXUtil_ConvertWideStringToGenericCch( szSessionName, pMsg->pApplicationDescription->pwszSessionName, 200 ); 

            _sntprintf( strMessage, 
                        200, 
                        TEXT("Enum Hosts Response: latency %d ms, session \"%s\""), 
                        pMsg->dwRoundTripLatencyMS, 
                        szSessionName );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_GROUP_INFO:
        {
            DPNMSG_GROUP_INFO* pMsg = (DPNMSG_GROUP_INFO*) pMsgBuffer;
            
            RefreshGroupInfo( pMsg->dpnidGroup );
             
            if( m_eType == SERVER )
                SendGroupInfoToAll( pMsg->dpnidGroup );

            // Invalidate the dialog
            m_bDlgValid = FALSE;
            
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Group Info: group 0x%x"), 
                        pMsg->dpnidGroup );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_HOST_MIGRATE:
        {
            DPNMSG_HOST_MIGRATE* pMsg = (DPNMSG_HOST_MIGRATE*) pMsgBuffer;

            m_dpnidHost = pMsg->dpnidNewHost;
            RefreshPlayerInfo( pMsg->dpnidNewHost );

            // Invalidate the dialog
            m_bDlgValid = FALSE;

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Host Migrate: new host 0x%x"), 
                        pMsg->dpnidNewHost );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_INDICATE_CONNECT:
        {
            DPNMSG_INDICATE_CONNECT* pMsg = (DPNMSG_INDICATE_CONNECT*) pMsgBuffer;
        
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                    #ifdef _WIN64
                        TEXT("Indicate Connect: player context 0x%I64x"), 
                        (ULONGLONG) pMsg->pvPlayerContext );
                    #else
                        TEXT("Indicate Connect: player context 0x%x"), 
                        (DWORD) pMsg->pvPlayerContext );
                    #endif // _WIN64
                        

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_INDICATED_CONNECT_ABORTED:
        {
            DPNMSG_INDICATED_CONNECT_ABORTED* pMsg = (DPNMSG_INDICATED_CONNECT_ABORTED*) pMsgBuffer;
        
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                    #ifdef _WIN64
                        TEXT("Indicated Connect Aborted: player context 0x%I64x"), 
                        (ULONGLONG) pMsg->pvPlayerContext );
                    #else
                        TEXT("Indicated Connect Aborted: player context 0x%x"), 
                        (DWORD) pMsg->pvPlayerContext );
                    #endif // _WIN64

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_PEER_INFO:
        {
            DPNMSG_PEER_INFO* pMsg = (DPNMSG_PEER_INFO*) pMsgBuffer;
            OnDpInfoChange( pMsg->dpnidPeer );

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Peer Info: peer 0x%x"), 
                        pMsg->dpnidPeer );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_RECEIVE:
        {
            DPNMSG_RECEIVE* pMsg = (DPNMSG_RECEIVE*) pMsgBuffer;
            
            if( pMsg->dwSize < sizeof(SI_MSG) )
                break;
            
            SI_MSG* pSIMsg = (SI_MSG*) pMsg->pReceiveData;

            switch( pSIMsg->dwMsgID )
            {
                case SI_MSGID_PLAYERINFO:
                {
                    if( pMsg->dwReceiveDataSize < sizeof(SI_MSG_PLAYERINFO) )
                        break;

                    SI_MSG_PLAYERINFO* pPlayerInfo = (SI_MSG_PLAYERINFO*) pMsg->pReceiveData;

                    // Verify the message is properly sized
                    if( pMsg->dwReceiveDataSize != sizeof(SI_MSG_PLAYERINFO) +
                        ( sizeof(WCHAR) * ( pPlayerInfo->dwNameLength + 1 ) ) )
                        break;
                    
                    // Pass the data off to the message handler function
                    OnPlayerInfoReceive( pPlayerInfo );

                    // Attempt to get additional information about the player
                    RefreshPlayerInfo( pPlayerInfo->dpnID );
                    
                    // Invalidate the dialog
                    m_bDlgValid = FALSE;

                    return TRUE;
                }

                case SI_MSGID_GROUPINFO:
                {
                    if( pMsg->dwReceiveDataSize < sizeof(SI_MSG_GROUPINFO) )
                        break;

                    SI_MSG_GROUPINFO* pGroupInfo = (SI_MSG_GROUPINFO*) pMsg->pReceiveData;

                    if( pMsg->dwReceiveDataSize != sizeof(SI_MSG_GROUPINFO) +
                        ( sizeof(WCHAR) * ( pGroupInfo->dwNameLength + 1 ) ) )
                    {
                        break;
                    }

                    // Pass the data off to the message handler function
                    OnGroupInfoReceive( pGroupInfo );

                    // Invalidate the dialog
                    m_bDlgValid = FALSE;

                    return TRUE;
                }
            }

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Receive: sender 0x%x, data size %d bytes"), 
                        pMsg->dpnidSender, 
                        pMsg->dwReceiveDataSize );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_REMOVE_PLAYER_FROM_GROUP:
        {
            DPNMSG_REMOVE_PLAYER_FROM_GROUP* pMsg = (DPNMSG_REMOVE_PLAYER_FROM_GROUP*) pMsgBuffer;
        
            Lock();
            hr = RemovePlayerFromGroup( pMsg->dpnidPlayer, pMsg->dpnidGroup );
            Unlock();
            
            // Invalidate the dialog
            m_bDlgValid = FALSE;

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Remove Player From Group: player 0x%x, group 0x%x"), 
                        pMsg->dpnidPlayer, 
                        pMsg->dpnidGroup );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_RETURN_BUFFER:
        {
            DPNMSG_RETURN_BUFFER* pMsg = (DPNMSG_RETURN_BUFFER*) pMsgBuffer;
            
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                    #ifdef _WIN64
                        TEXT("Return Buffer: user context 0x%I64x, result 0x%x"), 
                        (ULONGLONG) pMsg->pvUserContext,
                    #else
                        TEXT("Return Buffer: user context 0x%x, result 0x%x"), 
                        (DWORD) pMsg->pvUserContext,
                    #endif // _WIN64
                        pMsg->hResultCode );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_SEND_COMPLETE:
        {
            DPNMSG_SEND_COMPLETE* pMsg = (DPNMSG_SEND_COMPLETE*) pMsgBuffer;
            
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Send Complete: handle 0x%x, result 0x%x, send time %d ms"), 
                        pMsg->hAsyncOp, 
                        pMsg->hResultCode, 
                        pMsg->dwSendTime );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }
        
        case DPN_MSGID_SERVER_INFO:
        {
            DPNMSG_SERVER_INFO* pMsg = (DPNMSG_SERVER_INFO*) pMsgBuffer;
            OnDpInfoChange( pMsg->dpnidServer );

            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Server Info: server 0x%x"), 
                        pMsg->dpnidServer );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        case DPN_MSGID_TERMINATE_SESSION:
        {
            DPNMSG_TERMINATE_SESSION* pMsg = (DPNMSG_TERMINATE_SESSION*) pMsgBuffer;
            
            // Log the message
            _sntprintf( strMessage, 
                        200, 
                        TEXT("Terminate Session: result 0x%x"), 
                        pMsg->hResultCode );

            strMessage[ 200 ] = TEXT('\0');
            break;
        }

        
    }

    CMessageList* pMsgList = NULL;
    int nDlgID = 0;

    // Add the message string to the stored list
    switch( dwMessageId )
    {
        case DPN_MSGID_RECEIVE:
        case DPN_MSGID_SEND_COMPLETE:
        {
            pMsgList = &m_AppMessages;
            nDlgID = IDC_SI_APPMSG;
            break; 
        }

        default:
        {
            pMsgList = &m_DPlayMessages;
            nDlgID = IDC_SI_DPLAYMSG;
            break;   
        }
    }
    
    // Lock the message list
    pMsgList->Lock();

    // If the message queue is already full, remove the bottom item from the dialog box 
    if( pMsgList->IsFull() )
        SendMessage( GetDlgItem( m_hDlgMessages, nDlgID ), LB_DELETESTRING, SI_MAX_MESSAGES-1, 0 );

    // Add the message to the stored list
    TCHAR* strTimeStamped = pMsgList->AddMessage( strMessage );

    // Unlock the message list
    pMsgList->Unlock();

    // Post the new string to the top of the list box
    if( m_hDlgMessages )
        SendMessage( GetDlgItem( m_hDlgMessages, nDlgID ), LB_INSERTSTRING, 0, (LPARAM) strTimeStamped );

    // Return false to indicate that either the message was not handled, or the
    // handled message should also be sent to the application message handler.
    return FALSE;
}




//-----------------------------------------------------------------------------
// Name: OnPlayerInfoReceive()
// Desc: Handles the extraction and storage of incoming player data
//-----------------------------------------------------------------------------
HRESULT CSessionInfo::OnPlayerInfoReceive( SI_MSG_PLAYERINFO* pPlayerInfo )
{
    HRESULT hr = S_OK;

    // Extract the player name
    LPWSTR pStrName = (LPWSTR) (pPlayerInfo + 1);
    pStrName[ pPlayerInfo->dwNameLength ] = 0;

    Lock();
      
    // Search for the player with the given ID
    CSIPlayer* pPlayer = FindPlayer( pPlayerInfo->dpnID ); 

    // If not found, create a new player
    if( NULL == pPlayer )
    {
        hr = CreatePlayer( pPlayerInfo->dpnID );
        if( FAILED(hr) )
            goto LCleanReturn;
            
        pPlayer = FindPlayer( pPlayerInfo->dpnID );
    }

    // Set updated information
    pPlayer->bIsHost = pPlayerInfo->dwFlags & DPNPLAYER_HOST;
    
    DXUtil_ConvertWideStringToGenericCch( pPlayer->strName, pStrName, 256 ); 
    
    if( pPlayerInfo->dwFlags & DPNPLAYER_LOCAL )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆国产欧美一区二区三区| 中文字幕电影一区| 精品国产乱码久久久久久浪潮| 精品国产欧美一区二区| 国产人成一区二区三区影院| 亚洲欧美国产毛片在线| 亚洲成人tv网| 国产精品996| 色视频欧美一区二区三区| 91精品国产91久久久久久一区二区 | 99精品欧美一区二区三区综合在线| 欧美在线999| 精品国产乱码久久久久久久久 | 成人黄色777网| 欧美精品日韩一区| 国产日韩欧美一区二区三区乱码 | 欧美中文一区二区三区| 精品日韩在线一区| 亚洲欧美激情一区二区| 精一区二区三区| 91国产丝袜在线播放| 久久久激情视频| 亚洲成人免费影院| 成人在线视频一区| 91精品国产色综合久久ai换脸| 欧美激情中文不卡| 日本不卡一二三| 91丨porny丨户外露出| 欧美大白屁股肥臀xxxxxx| 一区二区在线免费观看| 国产经典欧美精品| 69av一区二区三区| 一区二区三区国产| 成人性视频网站| 欧美成人女星排行榜| 亚洲自拍都市欧美小说| 国产成人免费视频网站高清观看视频 | 国产午夜亚洲精品羞羞网站| 亚洲成a人v欧美综合天堂下载 | 夜夜嗨av一区二区三区四季av| 国产激情一区二区三区| 欧美人妇做爰xxxⅹ性高电影 | 在线观看www91| 国产精品女人毛片| 国产一区二区不卡在线| 欧美一区国产二区| 亚洲综合无码一区二区| 91在线国产观看| 国产欧美久久久精品影院| 麻豆中文一区二区| 欧美日韩高清一区二区三区| 亚洲素人一区二区| 成人性生交大片免费看在线播放| 日韩欧美一区二区在线视频| 亚洲一区二区影院| 在线观看亚洲一区| 综合久久一区二区三区| 成人av网址在线| 国产精品私人自拍| 成熟亚洲日本毛茸茸凸凹| 国产欧美中文在线| 国产激情一区二区三区四区| www国产亚洲精品久久麻豆| 久久精品国产亚洲一区二区三区| 欧美三级电影网| 亚洲综合视频在线| 欧美色男人天堂| 亚洲国产视频直播| 欧美三级电影网| 午夜精品久久一牛影视| 欧美理论片在线| 五月天激情小说综合| 欧美日韩免费在线视频| 亚洲国产精品久久久久秋霞影院| 欧美亚洲动漫另类| 午夜亚洲福利老司机| 欧美日韩成人在线一区| 三级久久三级久久久| 69堂亚洲精品首页| 另类小说综合欧美亚洲| 精品国产伦一区二区三区观看方式 | 国产一区二区导航在线播放| 国产亚洲欧美在线| 丁香一区二区三区| 亚洲视频在线一区观看| 色老汉一区二区三区| 一区二区三区欧美日韩| 欧美亚洲综合另类| 日本午夜一本久久久综合| 日韩欧美你懂的| 国产大片一区二区| 亚洲人成在线观看一区二区| 在线一区二区三区四区五区| 亚洲成人高清在线| 免费精品视频最新在线| 精品毛片乱码1区2区3区| 国产成人在线观看免费网站| 国产精品久久99| 在线亚洲免费视频| 蜜桃av一区二区在线观看| 精品国产1区二区| 成人av在线一区二区| 亚洲电影激情视频网站| 日韩亚洲欧美中文三级| 风间由美一区二区av101| 亚洲精品国产无天堂网2021| 欧美一区二区三区喷汁尤物| 国产河南妇女毛片精品久久久| 日韩一区在线看| 在线成人av影院| 国产福利视频一区二区三区| 亚洲精选视频在线| 欧美一二三四在线| 99久久久精品| 日本美女一区二区| 国产精品久久一卡二卡| 欧美日韩1区2区| 国产成人在线观看| 三级不卡在线观看| 欧美激情一区二区三区蜜桃视频| 日本道色综合久久| 国产伦精品一区二区三区在线观看 | 久久精品国产精品青草| 综合激情成人伊人| 精品国产123| 色婷婷综合久色| 国产乱人伦偷精品视频免下载| 又紧又大又爽精品一区二区| 欧美一区永久视频免费观看| 成人精品视频网站| 日本欧美一区二区| 亚洲欧美日韩中文播放| 精品av综合导航| 欧美无砖专区一中文字| 成人手机在线视频| 蜜桃久久av一区| 一区二区三区精品| 中文字幕乱码一区二区免费| 欧美久久久久免费| 99久久久国产精品免费蜜臀| 蜜桃精品在线观看| 亚洲国产成人av好男人在线观看| 久久精品夜色噜噜亚洲aⅴ| 678五月天丁香亚洲综合网| 91网站在线播放| 国产精品自在在线| 青娱乐精品视频在线| 亚洲人成伊人成综合网小说| 国产日产欧美一区| 欧美大片日本大片免费观看| 欧美日韩一级二级三级| 91网站在线观看视频| 国产91在线观看丝袜| 九九九久久久精品| 日本少妇一区二区| 午夜在线成人av| 亚洲精品你懂的| 欧美激情一二三区| 精品sm捆绑视频| 日韩欧美黄色影院| 91精品国产综合久久精品app| 91免费在线看| 99国产欧美另类久久久精品| 韩国成人在线视频| 另类中文字幕网| 蜜乳av一区二区| 日产欧产美韩系列久久99| 欧美日本一区二区三区四区 | 欧美天天综合网| 91一区一区三区| 成人高清伦理免费影院在线观看| 国产成人无遮挡在线视频| 国产美女视频一区| 精品午夜久久福利影院| 男男成人高潮片免费网站| 亚洲成人精品一区二区| 亚洲444eee在线观看| 午夜激情久久久| 亚洲国产成人va在线观看天堂| 一区二区三区欧美在线观看| 亚洲精品国产无天堂网2021| 亚洲男同性视频| 亚洲精品国产高清久久伦理二区| 亚洲另类中文字| 一区二区三区在线观看网站| 亚洲精品免费视频| 伊人婷婷欧美激情| 午夜精品久久久久久久蜜桃app| 午夜精品久久久久影视| 日韩国产一二三区| 久久丁香综合五月国产三级网站| 久久97超碰色| 国产九色精品成人porny | 中文字幕乱码日本亚洲一区二区 | 懂色av一区二区三区蜜臀| 国产91高潮流白浆在线麻豆| 成人一区二区三区中文字幕| 成人a区在线观看| 色素色在线综合| 欧美一区国产二区|