Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. STARTUPINFO si;
  2. PROCESS_INFORMATION pi;
  3. char bff[512];
  4.  
  5. //init the STARTUPINFO struct
  6. memset(&si,0,sizeof(si));
  7. si.cb=sizeof(si);
  8.  
  9. //setup the command line arguments
  10. sprintf(bff,"");
  11.  
  12. //create the proc with those args
  13. if(!CreateProcess("C:\\Program Files\\Internet Explorer\\iexplore.exe",bff,NULL,NULL,0,0,NULL,NULL,&si,&pi))
  14. {
  15. printf("ERROR");
  16. getchar();
  17. return 0;
  18. }
  19.  
  20. //wait till the proc ends
  21. WaitForSingleObject(pi.hProcess,INFINITE);
  22.  
  23. //close all
  24. CloseHandle(pi.hProcess);
  25. CloseHandle(pi.hThread);
  26. getchar();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement