主题:GetExitCodeThread失败
想调用GetExitCodeThread获取线程返回值,调用方法为
m_pLoad = AfxBeginThread(LoadData, this);
WaitForSingleObject(m_pLoad->m_hThread, INFINITE);
DWORD exitcode = ULONG_MAX;
BOOL ret = GetExitCodeThread(m_pLoad->m_hThread, &exitcode);
结果ret为0,GetLastError为6提示句柄无效,谁知道是怎么回事,如何解决?急急急
m_pLoad = AfxBeginThread(LoadData, this);
WaitForSingleObject(m_pLoad->m_hThread, INFINITE);
DWORD exitcode = ULONG_MAX;
BOOL ret = GetExitCodeThread(m_pLoad->m_hThread, &exitcode);
结果ret为0,GetLastError为6提示句柄无效,谁知道是怎么回事,如何解决?急急急