Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <Tlhelp32.h>
- #include <tchar.h>
- #include <stdio.h>
- int main()
- {
- int FindProcess(char *procName);
- {
- HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- PROCESSENTRY32 proc;
- proc.dwSize = sizeof(proc);
- if(!Process32First(snap, &proc))
- do
- {
- if(!strcmp("Solitaire.exe", proc.szExeFile))
- return proc.th32ProcessID;
- }while(Process32Next(snap, &proc));
- getchar();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement