Archived

This topic is now archived and is closed to further replies.

n0ob

Process ID from name

Recommended Posts

ALLRIGHT!!! Here''s what I''m doing:

HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
PROCESSENTRY32 proc ;
proc.dwSize = sizeof(proc);
long f = Process32First(hSnap,&proc);

char sname[MAX_PATH]={0};
while(f)
{
strcpy(sname,proc.szExeFile);
cout << sname << endl << flush;
f = Process32Next(hSnap, &proc);
}

As a test. This works!! WOOHOO!! Now all I have to do is get the ID! Thanks!

Kings of Chaos

Share this post


Link to post
Share on other sites