// tmpMu.cpp : Defines the entry point for the console application.
//#include "stdafx.h"
#include "process.h"
#include <windows.h>
#include "stdio.h"BOOL repeat = TRUE;
DWORD WINAPI MyThread1(LPVOID lpParameter)
{
while(repeat)
{
printf("how are you");
Sleep(1);
}
DWORD exitCode;
ExitThread(exitCode); return 0;
}
DWORD WINAPI MyThread2(LPVOID lpParameter)
{
while(repeat)
{
printf("Very Well\n");
Sleep(1);
}
DWORD exitCode;
ExitThread(exitCode); return 0;
}
DWORD WINAPI KillThread(LPVOID lpParameter)
{
repeat = FALSE;
return 0;
}
int main(int argc, char* argv[])
{
HANDLE handle1,handle2,handle3;
    DWORD dw1,dw2,dw3;
handle1 = CreateThread(NULL,0,MyThread1,NULL,0,&dw1); if(handle1 == NULL)
{
printf("Create Thread 1 Failed!\n");
return -1;
}

handle2 = CreateThread(NULL,0,MyThread2,NULL,0,&dw2);
if(handle2 == NULL)
{
printf("Create Thread 2 Failed!\n");
return -1;
} handle3 = CreateThread(NULL,0,KillThread,NULL,0,&dw3);
if(handle3 == NULL)
{
printf("Create Thread 3 Failed!\n");
return -1;
}
 
CloseHandle(handle1);
CloseHandle(handle2);
CloseHandle(handle3);
return 0;
}