// Written by Hoon-seung Jeong
// Consultation http://support.microsoft.com/kb/175030/ko
#include <iostream>
#include <windows.h> // For Windows API function
#include <time.h> // For time of day
#include <tlhelp32.h> // For process count of Windows XP
using namespace std;
{
while(1)
{
Process_Count();
}
return 0;
}
{
int number=0; // Initialization 0
time_t now; // Declare time struct
now = time(NULL); // Time function
{
BOOL p_Count; // For count process
PROCESSENTRY32 p_Entry; // Declare process struct
p_Count = Process32First(snap, &p_Entry); // Search a executing process
{
p_Count = Process32Next(snap, &p_Entry); // Repeat to search executing process
number++; // Increase number of executing process
}
}
cout << "\tNumber of executing process : " << number << "\n"; // Print number of executing process
Sleep(1000); // 1000 is 1 second
}
프로그램 제목 : Process Counter
윈도우상에서 컨트롤+알트+델 누르면
윈도우즈 작업관리자가 뜨는데
왼쪽 하단에 현재 실행중인 프로세스 개수가 뜬다.
그걸 콘솔모드(도스모드) 프로그램으로 해본 것...