kevin55

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
#include <windows.h>
#include <IOSTREAM.H>

DWORD WINAPI FuncProc1( LPVOID lpParameter//thread data
);

int index = 0;

int main()
{
HANDLE hThread1;
hThread1 = CreateThread(NULL,
0,
FuncProc1,
NULL,
0,
NULL);

CloseHandle(hThread1);
while (index++ < 1000)
{
cout << "main thread is running" << endl;
}

return 0 ;
}

DWORD WINAPI FuncProc1(LPVOID lpParameter //thread data
)
{
while(index++ < 1000)
{
cout << "thread1 is running" << endl;
}

return 0;

};

 

  

posted on 2012-03-11 16:42  kernel_main  阅读(409)  评论(4编辑  收藏  举报