其它语言,平台中,是如何来使用 多线程的。
是不是也是这个函数

解决方案 »

  1.   

    function BeginThread(SecurityAttributes: Pointer; StackSize: LongWord; ThreadFunc: TThreadFunc; Parameter: Pointer; CreationFlags: LongWord; var ThreadId: LongWord): Integer;帮助中说会设一个标志,做到 HEAP 安全;但 象 某些 函数的静态变量怎么处理就不知道了;
      

  2.   

    ????
    我是问 _beginthreadex  
    是不是通用。。
    在WIN32下,我一直用 createthread.
      

  3.   

    应该不是通用的,记得《WINDOWS核心编程》里面说过,写C/C++的多线程程序,最好用_beginthreadex  ,最好不要用createthread.又说没有_beginthreadex 的话,要用你的编译器厂商提供的类似的函数......
      

  4.   

    我查了一下,在BCB的帮助文档里提到,考虑到线程可能使用C ++ RUNTIME LIBRARY,you must use the CW32MT.LIB or CW32MTI  library insteadThe multithread libraries provide the following functions which you use to create threads:_beginthread
    _beginthreadex
    _beginthreadNTThe multithread libraries also provide the following corresponding functions that terminate threads:_endthread_endthreadex_threadid a global variable that contains the current identification number of the thread also known as the thread ID). 
    The header file stddef.h contains the declaration of _threadid.
    When you compile or link a program that uses multiple threads, you must use the -tWM compiler switch. For example:   BCC32 -tWM THREAD.C
    大概就是这样吧;
      

  5.   

    http://expert.csdn.net/Expert/topic/1983/1983849.xml?temp=.5738642