是一个控制台程序用createthread建立线程DWORD WINAPI thread(LPVOID){cout<<"aaa";}
开始可以执行,但将createthread第五个参数改为CREATE_SUSPEND编译后再将其改回
编译程序可运行但命令行上什么也没有难道是永远将线程挂起了????

解决方案 »

  1.   

    哈哈,先CLEAN,再编译运行吧。
      

  2.   

    第五个参数改为CREATE_SUSPEND后,线程便会挂起,直到你调用ResumeThread()函数----摘自msdn
    Specifies additional flags that control the creation of the thread. If the CREATE_SUSPENDED flag is specified, the thread is created in a suspended state, and will not run until the ResumeThread function is called. If this value is zero, the thread runs immediately after creation. At this time, no other values are supported
    --------
      

  3.   

    是永远挂起了,除非你用ResumeThread()
      

  4.   

    唉,来晚了,分数要被"weirdy(软件设计师)"挣走了.