hth1 = (HANDLE)_beginthreadex( NULL,         // security  
                                   0,            // stack size  
                                   ThreadX::ThreadStaticEntryPoint,  
                                   o1,           // arg list  
                                   CREATE_SUSPENDED,  // so we can later call ResumeThread()  
                                   &uiThread1ID );  换成_beginthreadex看看!

解决方案 »

  1.   

    monitorProgress是静态函数,要访问winform的成员变量的话,在CreateThread的第四个参数将当前对象的指针当成参数传递进去,然后在monitorProgress函数将传的参数转化成对象指针,通过对象指针访问其内成员
    t_thread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)monitorProgress,this,0,NULL);static DWORD WINAPI monitorProgress(LPVOID lpParameter)
    {
    winform* obj = (winform*) lpParameter;
    lpParameter->m_xx;
    }或者
    static DWORD WINAPI monitorProgress(LPVOID lpParameter)
    {
    winform* obj = (winform*) lpParameter;
    lpParameter->run();
    }int winform::run(){
      m_xx = ...;
    }
      

  2.   

    感觉很奇怪,您为啥不用C++.NET的原生函数却用Win32的线程创建函数。