Advertisement
piffy

ShellExecute (base)

Aug 23rd, 2014
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <windows.h>
  2. #include <tchar.h>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8. SHELLEXECUTEINFO rSEI ={0};
  9. rSEI.cbSize=sizeof( rSEI );
  10. rSEI.lpVerb= "open";
  11. rSEI.lpFile= "calc.Exe";
  12. rSEI.lpParameters= 0;
  13. rSEI.nShow = SW_NORMAL;
  14. rSEI.fMask = SEE_MASK_NOCLOSEPROCESS;
  15. ShellExecuteEx( &rSEI );
  16. WaitForSingleObject(rSEI.hProcess,INFINITE);
  17. int msgboxID = MessageBox(NULL, "Fai click per proseguire.",
  18.         "Processo terminato", 0x30L );
  19.     return 0;  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement