Home » Developing U++ » UppHub » Added SysExec package
Added SysExec package [message #16047] |
Sun, 25 May 2008 09:49 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
A small package with some SysExec() functions to launch external commands and gather their output and error data.
Not the state of the art, but handy sometimes
The provided functions are :
bool SysExec(String const &command, String const &args, const VectorMap<String, String> &Environ, String &OutStr, String &ErrStr);
bool SysExec(String const &command, String const &args, String &OutStr, String &ErrStr);
bool SysExec(String const &command, String const &args, const VectorMap<String, String> &Environ, String &OutStr);
bool SysExec(String const &command, String const &args, String &OutStr);
bool SysExec(String const &command, String const &args);
Parameters are :
command : command executable name
args : a line of arguments, space separated
Environ : a VectorMap containing environment data to pass
OutStr : a reference to a string that will contain command output
ErrStr : a reference to a string that will contain command error output
Commands will return true on success, false otherwise.
Caveats :
1- it will block application if launched command hangs
2- no timeout provided... but could be easily added
3- no mean to have some 'progress' indication of running app, but could be easily added
Path will be searched for command, so a complete path is not necessary.
It "should" work on windows too, but I didn't test it yet.
Ciao
Max
[Updated on: Sun, 25 May 2008 09:50] Report message to a moderator
|
|
|
|
|
Added SysExec package
|
|
|
Re: Added SysExec package
By: koldo on Sat, 09 August 2008 22:29
|
|
|
Re: Added SysExec package
|
|
|
Re: Added SysExec package
By: mdelfede on Fri, 31 October 2008 19:04
|
|
|
Re: Added SysExec package
|
|
|
Re: Added SysExec package
By: koldo on Fri, 31 October 2008 23:38
|
|
|
Re: Added SysExec package
By: mdelfede on Sat, 01 November 2008 15:39
|
|
|
Re: Added SysExec package
By: koldo on Sun, 02 November 2008 12:37
|
|
|
Re: Added SysExec package
By: mdelfede on Sun, 02 November 2008 20:58
|
|
|
Re: Added SysExec package
By: koldo on Mon, 03 November 2008 17:40
|
|
|
Re: Added SysExec package
By: mdelfede on Wed, 05 November 2008 22:45
|
|
|
Re: Added SysExec package
By: captainc on Thu, 06 November 2008 00:38
|
|
|
Re: Added SysExec package
By: mdelfede on Thu, 06 November 2008 15:49
|
|
|
Re: Added SysExec package
By: koldo on Thu, 06 November 2008 18:00
|
|
|
Re: Added SysExec package
By: mdelfede on Tue, 11 November 2008 13:40
|
|
|
Re: Added SysExec package
By: koldo on Thu, 13 November 2008 12:23
|
|
|
Re: Added SysExec package
By: mdelfede on Fri, 14 November 2008 16:51
|
|
|
Re: Added SysExec package
By: koldo on Wed, 19 November 2008 08:05
|
|
|
Re: Added SysExec package
By: mdelfede on Wed, 19 November 2008 09:44
|
|
|
Re: Added SysExec package
By: mdelfede on Fri, 21 January 2011 00:13
|
|
|
Re: Added SysExec package
By: mdelfede on Sun, 23 January 2011 18:36
|
|
|
Re: Added SysExec package
|
|
|
Re: Added SysExec package
By: mdelfede on Mon, 24 January 2011 17:51
|
|
|
Re: Added SysExec package
|
Goto Forum:
Current Time: Mon Apr 29 17:13:23 CEST 2024
Total time taken to generate the page: 0.03143 seconds
|