_beginthreadex has three additional parameters: initflag, security, threadaddr. The new thread can be created in a suspended state, with a specified security (Windows NT only), and can be accessed using thrdaddr, which is the thread identifier.看见了没有啊???
Windows NT only!!!!!!!

解决方案 »

  1.   

    unsigned long _beginthreadex( void *security, unsigned stack_size, unsigned ( __stdcall *start_address )( void * ), void *arglist, unsigned initflag, unsigned *thrdaddr );这时函数原型,对照着看呗
      

  2.   

    看WINDOWS核心编程一书,里面有NT跟WIN98的对比,里面提到两种内核的安全防护不是一个级别的。在98下你只能使用unsigned long _beginthread( void( __cdecl *start_address )( void * ), unsigned stack_size, void *arglist );
      

  3.   

    应该不是这个原因,我的理解是specified security 在98下自动被忽略,不会不能运行。
    不知道事实如何
      

  4.   

    不同意,joke100(joke100)的第三种说法。应该尽量避免使用_beginthread。
    但是在NT下运行良好,但在98下_beginthreadex(...)返回0?我就不知道为什么了,不知道你是不是把threadaddr设置为NULL了
      

  5.   

    nt:_beginthread 的 threadid 可以设置为null
    98:_beginthread 的 threadid 不可以为null