#include <windows.h>
#include <stdio.h>
//线程函数
DWORD WINAPI ThreadProc(LPVOID lpParam)
{
int i = 0;
while(i < 20)
{
printf("I am from a thread,count = %d\n",i++);
}
return 0;
}
int main(int argc, char* argv[])
{
HANDLE hThread;
DWORD dwThreadId;
//创建一个新线程
hThread = CreateThread(
NULL, //默认安全属性
NULL, 阅读全文>
发表于 @ 2008年10月08日 14:44:00|评论(loading...)|收藏