Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked Listar Procesos [C/C++]


Expermicid

Recommended Posts

Utilizacion: Apis Process32First y Process32Next.

 

[lenguaje=cpp]#include

#include

#include

 

void main() {

HANDLE Proc;

PROCESSENTRY32 Proceso;

int total;

 

total = 0;

 

Proc = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

Process32First(Proc,&Proceso);

 

while(Process32Next(Proc,&Proceso)) {

printf("%s\t%d\t%d\n", Proceso.szExeFile, Proceso.th32ProcessID, Proceso.th32ParentProcessID);

total++;

}

 

CloseHandle(Proc);

 

printf("\nTotal de procesos abiertos: %i\n", total);

getchar();

}[/lenguaje]

 

Saludos

Edited by Expermicid
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.