Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <windows.h>
  2. #include <Tlhelp32.h>
  3. #include <tchar.h>
  4. #include <stdio.h>
  5.  
  6. int main()
  7. {
  8. int FindProcess(char *procName);
  9. {
  10. HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  11. PROCESSENTRY32 proc;
  12. proc.dwSize = sizeof(proc);
  13. if(!Process32First(snap, &proc))
  14. do
  15. {
  16. if(!strcmp("Solitaire.exe", proc.szExeFile))
  17. return proc.th32ProcessID;
  18. }while(Process32Next(snap, &proc));
  19. getchar();
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement