Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <sstream>
  3. #include <iostream>
  4.  
  5. int main(int argc, char* argv[])
  6. {
  7. std::wostringstream stream;
  8.  
  9. for (unsigned int i = 1; i < argc; ++i) {
  10. stream << argv[i] << L" ";
  11. }
  12.  
  13. std::wstring string = stream.str().c_str();
  14. std::wcout << L"git-remote-bzr.exe invoked with arguments: \"" << string << L"\"." << std::endl;
  15.  
  16. SHELLEXECUTEINFO info;
  17. info.cbSize = sizeof(info);
  18. info.fMask = SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE;
  19. info.lpVerb = L"open";
  20. info.lpFile = L"git-remote-bzr.py";
  21. info.lpParameters = string.c_str();
  22. info.lpDirectory = 0;
  23. info.lpIDList = 0;
  24. info.lpClass = 0;
  25.  
  26. std::wcout << ShellExecuteEx(&info);
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement