Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
K

kuibing

@kuibing
About
Posts
7
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Any design pattern to manage HTTP request?
    K kuibing

    Hi guys, I'm working at a WebServer project that it receives a lot of HTTP requests,Yet these requests are not belong to a family. Each HTTP request requires deal with a lot of string, e.g."GET /HELLO%20WORLD/ HTTP 1.1", HELLO%20WORLD/ is some info I really need.But then each request might have a lot of different data which has different formats. So I wanna know is there some good design patterns or architectures to manage these requests? Any suggestions are welcome.

    C / C++ / MFC design regex architecture question

  • How to retrofit C++ app to support B/S?
    K kuibing

    Hi everyone, Right now, I'm working at a project that change it to support B/S mode. That is, user can do something by WebBrowser to invoke some functionality of C++ app, and I don' wanna make too complicated. The original C++ app don't support B/S, Is there any thirtd-party library to do that?Anyone tell me how to do that in more earier way? If using SOCKET, I think that need to make a parser to analysizing middle-protocol, but this progress will spend much more time and quite complicated. Any suggestion? Thanks.

    C / C++ / MFC c++ tutorial question

  • Who can explain this code for me?about virtual function
    K kuibing

    /////////////////////////////////////////////// // CIOMessageMap.h class __declspec(novtable) CIOMessageMap { public: virtual bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize) = 0; }; #define BEGIN_IO_MSG_MAP() \ public: \ bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize = 0) \ { \ bool bRet = false; #define IO_MESSAGE_HANDLER(msg, func) \ if (msg == clientIO) \ bRet = func(pContext, dwSize); #define END_IO_MSG_MAP() \ return bRet; \ } Why class CIOMessageMap should be declared by declspec(novtable)? The macros implements the member function of CIOMessageMap --ProcessIOMessage();But in other places of project,there no any inheritances of CIOMessageMap. Who can tell me the advantages about this coding style? There are will best in detail.;)

    C / C++ / MFC question

  • STL map = Hashtable, what about STL multimap?
    K kuibing

    MFC's CMap = HashTable. STL map = Red-Black Tree.

    Managed C++/CLI c++ html com question

  • How to pass a struct to worker thread? [modified]
    K kuibing

    thanks a lot~

    C / C++ / MFC tutorial question

  • Different Right menu for different area
    K kuibing

    你可以为每一种邮件添加一个资源菜单,根据不同的item,load相应的resource ID POINT point; UINT uFlags; //得到当前鼠标坐标 GetCursorPos(&point); //转换成客户区坐标 m_ctrlTree.ScreenToClient(&point); //获取选中的Item的句柄 HTREEITEM hItem = m_ctrlTree.HitTest(point,&uFlags); //若句柄不为空,则弹出右键菜单 if(hItem) { hTreeCurrent = hItem; ClientToScreen(&point); VERIFY(menu.LoadMenu(IDR_TREERCLK)); pPopUp = menu.GetSubMenu(0); //IDR_TREERCLK就是你建立的资源 }

    C / C++ / MFC tutorial c++ design data-structures help

  • How to pass a struct to worker thread? [modified]
    K kuibing

    void func() { struct SInfo SOCKINFO; SOCKINFO.pThis = this; SOCKINFO.ClientSocket = sockClient; strcpy(SOCKINFO.szClientIP, szClientIP); memset(SOCKINFO.szMessage, 0, BUFFER_SIZE); hThread = (HANDLE)_beginthreadex(NULL, 0, WorkThread, (LPVOID)&SOCKINFO, 0, NULL); } but,when WorkThread() is running,I'm worried about func() have been finished result in "struct SInfo SOCKINFO" be released.That's WorkThread() must be obtain a correct "struct SInfo SOCKINFO"? UINT CServerSocket::WorkThread(LPVOID pParam) { struct SInfo Param; struct SInfo *lpParam = (struct SInfo*)pParam; // ...etc } -- modified at 23:16 Sunday 14th October, 2007

    C / C++ / MFC tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups