// one.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
using namespace std;
DWORD WINAPI MyThread(void* p)
{
cout<<GetCurrentThreadId()<<endl;
return 3;
}
int _tmain(int argc, _TCHAR* argv[])
{
HANDLE handle;
DWORD dw;
handle = CreateThread(NULL,0,MyThread,NULL,0,&dw);
Sleep(1000);
GetExitCodeThread(handle,&dw);
cout<<dw<<endl;
CloseHandle(handle);
getchar();
return 0;
}