/* (C) 2003-2007 Willem Jan Hengeveld * Web: http://www.xs4all.nl/~itsme/ * http://wiki.xda-developers.com/ * * $Id$ */ #include #include #include #include #include #include "stringutils.h" #include "debug.h" #include "csidlpaths.h" #include "checkdll.h" #include "dllversion.h" #include "itsutils.h" // todo: // DONE: add '-w' option to wait ( a maximum ) time for the execution to finish // ... implement this by calling itsutils.dll ITRunProcess // ... which should WaitForSingleObject on the process handle // // add '-e' option to use 'shellExecute' to 'open' the parameter // add '-b VERB' to specify the shellexecute verb DWORD ITWaitForProcess(DWORD dwProcessHandle); // ... windows quoting rules are a bit foggy, hope i get it right here. std::string quote(const std::string& str) { std::string qstr = "\""; for (size_t i=0 ; idwProcessHandle= dwProcessHandle; HRESULT res= ItsutilsInvoke("ITWaitForProcess", insize, (BYTE*)inbuf, &outsize, NULL); return res; }