• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            大規模高性能網絡服務器編程 大型游戲服務器編程


            大規模高性能網絡服務器編程 大型游戲服務器編程 完成端口模型 TCP UDP P2P 網絡編程

                       C++博客 | 首頁 | 發新隨筆 | 發新文章 | 聯系 | 聚合 | 管理

                          

            癥狀:
            MSDN無法正常顯示頁面,目錄顯示正常。提示網頁錯誤!

            cmd到命令行執行如下命令
            regsvr32 "C:\Program Files\Common Files\Microsoft Shared\Help\hxds.dll"
            posted @ 2011-01-13 22:48 iKusamba 閱讀(1229) | 評論 (0)編輯 收藏

            請各位不吝指教,謝謝!

            typeof.h:
             1 /************************************************************************
             2 * Detect a variable's type or kind
             3 * by kusamba@126.com 2010-12-28
             4 */
             5 #pragma once
             6 
             7 #include <typeinfo.h>
             8 #include <string.h>
             9 #include <assert.h>
            10 
            11 #ifdef  __cplusplus
            12 
            13 /** detect static type/class */
            14 #define IS_TYPE_OF(TYPE, variable)    assert( 0 == _stricmp( typeid(TYPE).name(), typeid(variable).name() ) )
            15 
            16 /** detect polymorphic type */
            17 #define IS_KIND_OF(TYPE, ptr)        assert( NULL != dynamic_cast<TYPE*>(ptr) )
            18 
            19 #else
            20 
            21 /** detect static type/class */
            22 #define IS_TYPE_OF(TYPE, variable)    assert( 0 == _stricmp( typeid(TYPE).name(), typeid(variable).name() ) )
            23 
            24 /** detect polymorphic type */
            25 #define IS_KIND_OF(TYPE, ptr)        assert( 0 && "C Not Support Inheritance!" )
            26 
            27 #endif

            containerof.h
             1 /************************************************************************
             2 * Obtain the struct/class address by it's member address
             3 * by Kusamba@126.com 2010-12-28
             4 */
             5 #pragma once
             6 
             7 #include <stddef.h>
             8 
             9 /** Linux Kernel.h GCC Define */
            10 /**
            11 #define container_of(ptr, type, member) ({                    \
            12     const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
            13     (type *)( (char *)__mptr - offsetof(type,member) );})
            14 */
            15 
            16 #ifdef __cplusplus
            17 
            18 #ifdef  _WIN64
            19 #define CONTAINER_OF(ptr, TYPE, MEMBER)    reinterpret_cast<TYPE*>( (ptrdiff_t)( reinterpret_cast<char*>(ptr) - offsetof(TYPE, MEMBER) ) )
            20 #else
            21 #define CONTAINER_OF(ptr, TYPE, MEMBER)    reinterpret_cast<TYPE*>( ( reinterpret_cast<char*>(ptr) - offsetof(TYPE, MEMBER) ) )
            22 #endif
            23 
            24 #else
            25 
            26 #ifdef  _WIN64
            27 #define CONTAINER_OF(ptr, TYPE, MEMBER)    (TYPE*)( (ptrdiff_t)( (char*)(ptr) - offsetof(TYPE, MEMBER) ) )
            28 #else
            29 #define CONTAINER_OF(ptr, TYPE, MEMBER)    (TYPE*)( ( (char*)(ptr) - offsetof(TYPE, MEMBER) ) )
            30 #endif
            31 
            32 #endif    /* __cplusplus */
            33 

            測試代碼:
             1 #include "stdafx.h"
             2 #include "typeof.h"
             3 #include "containerof.h"
             4 
             5 //////////////////////////////////////////////////////////////////////////
             6 // Test Kind/Type of
             7 //////////////////////////////////////////////////////////////////////////
             8 namespace _typeof_
             9 {
            10     class CA {};
            11     class CB {};
            12 
            13     struct SA {};
            14     struct SB {};
            15 
            16     class CP {};
            17     class CC : public CP {};
            18 
            19     void Test()
            20     {
            21         int int_a;
            22         IS_TYPE_OF(int, int_a);
            23         //IS_TYPE_OF(float, int_a);
            24 
            25         int* pint_a;
            26         IS_TYPE_OF(int*, pint_a);
            27         //IS_TYPE_OF(int, pint_a);
            28         //IS_TYPE_OF(float*, pint_a);
            29         //IS_TYPE_OF(float, pint_a);
            30 
            31         CA ca;
            32         CA* pca;
            33         IS_TYPE_OF(CA, ca);
            34         IS_TYPE_OF(CA*, pca);
            35         //IS_TYPE_OF(CA, pca);
            36 
            37         //IS_TYPE_OF(CB, ca);
            38 
            39         IS_KIND_OF(CA, &ca);
            40 
            41         CP parent;
            42         CC child;
            43         IS_TYPE_OF(CP, parent);
            44         //IS_TYPE_OF(CC, parent);
            45         //IS_TYPE_OF(CP, child);
            46         IS_TYPE_OF(CC, child);
            47 
            48         IS_KIND_OF(CP, &parent);
            49         //IS_KIND_OF(CC, &parent);
            50         IS_KIND_OF(CP, &child);
            51         IS_KIND_OF(CC, &child); 
            52 
            53         printf("type_of Done!\n");
            54     }
            55 }//namespace _typeof_
            56 
            57 //////////////////////////////////////////////////////////////////////////
            58 // container of test
            59 //////////////////////////////////////////////////////////////////////////
            60 namespace _container_of_
            61 {
            62     struct SA 
            63     {
            64         int m_iA;
            65     };
            66 
            67     struct SB 
            68     {
            69         int m_iB;
            70         SA  m_sa;
            71     };
            72 
            73     void Test()
            74     {
            75         SB val;
            76 
            77         /**error C2039: 'm_iA' : is not a member of '_container_of_::SB'*/
            78         /**not support nesting*/
            79         //SB* pSB = CONTAINER_OF(&val.m_sa.m_iA, SB, m_iA);
            80         /**end*/
            81 
            82         SB* pSB = CONTAINER_OF(&val.m_iB, SB, m_iB);
            83 
            84         IS_TYPE_OF(SB*, pSB);
            85 
            86         printf("container_of Done!\n");
            87     }
            88 }//_container_of_
            89 
            90 int _tmain(int argc, _TCHAR* argv[])
            91 {
            92     _typeof_::Test();
            93     _container_of_::Test();
            94 
            95     return 0;
            96 }
            97 

            posted @ 2010-12-28 23:51 iKusamba 閱讀(1561) | 評論 (0)編輯 收藏
                 摘要: 本文總結了stl deque常用的規范的使用方法,以及如何避免iterator失效,老鳥勿入!!!  閱讀全文
            posted @ 2010-09-17 17:19 iKusamba 閱讀(1685) | 評論 (0)編輯 收藏
                 摘要: 本文總結了stl vector常用的規范的使用方法,以及如何避免iterator失效,老鳥勿入!!!  閱讀全文
            posted @ 2010-09-16 17:22 iKusamba 閱讀(2392) | 評論 (0)編輯 收藏

            解釋:Alpha,Beta,RC,OEM各個版本


            Alpha:

            是內部測試版,一般不向外部發布,會有很多Bug.一般只有測試人員使用。

            Beta:

            也是測試版,這個階段的版本會一直加入新的功能。在Alpha版之后推出。

            RC:(Release Candidate)

            顧名思義么 ! 用在軟件上就是候選版本。系統平臺上就是發行候選版本。RC版不會再加入新的功能了,主要著重于除錯。

            RTM:(Release to Manufacture)

            是給工廠大量壓片的版本,內容跟正式版是一樣的,不過RTM版也有出限制、評估版的。但是和正式版本的主要程序代碼都是一樣的。

            OEM:
            是給計算機廠商隨著計算機販賣的,也就是隨機版。只能隨機器出貨,不能零售。只能全新安裝,不能從舊有操作系統升級。包裝不像零售版精美,通常只有一面CD和說明書(授權書)。

            RVL:
            號稱是正式版,其實RVL根本不是版本的名稱。它是中文版/英文版文檔破解出來的。

            EVAL:
            而流通在網絡上的EVAL版,與“評估版”類似,功能上和零售版沒有區別。

            RTL:Retail(零售版)
            是真正的正式版,正式上架零售版。在安裝盤的i386文件夾里有一個eula.txt,最后有一行EULAID,就是你的版本。比如簡體中文正式版是 EULAID:WX.4_PRO_RTL_CN,繁體中文正式版是WX.4_PRO_RTL_TW。其中:如果是WX.開頭是正式版,WB.開頭是測試 版。_PRE,代表家庭版;_PRO,代表專業版。


            posted @ 2010-09-10 10:15 iKusamba 閱讀(1329) | 評論 (1)編輯 收藏
            僅列出標題
            共4頁: 1 2 3 4 

            公告

            導航

            隨筆分類

            最新隨筆

            最新評論

            閱讀排行榜

            一本大道久久东京热无码AV| 老司机国内精品久久久久| 久久久久亚洲av成人无码电影| 久久天天日天天操综合伊人av| 综合久久久久久中文字幕亚洲国产国产综合一区首 | 无码人妻少妇久久中文字幕| 蜜桃麻豆www久久国产精品| 人妻丰满AV无码久久不卡 | 久久久一本精品99久久精品66| 久久综合九色综合精品| 怡红院日本一道日本久久 | 欧洲精品久久久av无码电影| 国产精品久久成人影院| 亚洲人成无码久久电影网站| 麻豆亚洲AV永久无码精品久久| 久久久久久青草大香综合精品| 综合网日日天干夜夜久久| 久久www免费人成看国产片| 久久精品国产亚洲AV大全| 人妻无码久久精品| a级毛片无码兔费真人久久| 77777亚洲午夜久久多喷| 欧美成a人片免费看久久| 久久精品国产91久久综合麻豆自制 | 久久99国产精品尤物| 精品久久久久成人码免费动漫| 久久精品国产精品亜洲毛片| …久久精品99久久香蕉国产| 亚洲精品蜜桃久久久久久| 久久久这里有精品中文字幕| 国产精品久久国产精麻豆99网站| 精品熟女少妇AV免费久久| 亚洲天堂久久久| 亚洲人成电影网站久久| 国内精品伊人久久久影院| 午夜精品久久久久久影视riav| 国产福利电影一区二区三区,免费久久久久久久精 | 国产精品久久久久a影院| 久久精品综合网| 亚洲成色WWW久久网站| 久久国产精品无码一区二区三区|