#include <ace/Process.h>
class ACE_Process_Options {
public:enum{ DEFAULT_COMMAND_LINE_BUF_LEN = 1024, #if defined ( ACE_WIN32) NO_EXEC = 0 #else NO_EXEC = 1 #endif };protected:MAX_ENVIRONMENT_ARGS = 128 }; public: ACE_Process_Options ( int inherit_environment = 1, int command_line_buf_len = DEFAULT_COMMAND_LINE_BUF_LEN, int env_buf_len = ENVIRONMENT_BUFFER, int max_env_args = MAX_ENVIRONMENT_ARGS );~ACE_Process_Options (void);= These operations are used by applications to portably set int set_handles ( ACE_HANDLE std_in, ACE_HANDLE std_out = ACE_INVALID_HANDLE, ACE_HANDLE std_err = ACE_INVALID_HANDLE );int setenv (LPCTSTR format, ...);int setenv (LPCTSTR variable_name, LPCTSTR format, ...);int setenv (LPTSTR envp[]);void working_directory (LPCTSTR wd);int command_line (LPCTSTR format, ...);int command_line (LPTSTR argv[]);u_long creation_flags (void) const;void creation_flags (u_long);= These operations are used by ACE_Process to retrieve options LPTSTR working_directory ( void );LPTSTR command_line_buf (void);LPTSTR env_buf (void);STARTUPINFO *startup_info (void);const LPSECURITY_ATTRIBUTES get_process_attributes (void) const;LPSECURITY_ATTRIBUTES set_process_attributes (void);const LPSECURITY_ATTRIBUTES get_thread_attributes (void) const;LPSECURITY_ATTRIBUTES set_thread_attributes (void);int handle_inheritence (void);void handle_inheritence (int);char * const *command_line_argv (void);char * const *env_argv (void);ACE_HANDLE get_stdin (void);ACE_HANDLE get_stdout (void);ACE_HANDLE get_stderr (void);int setenv_i (LPTSTR assignment, int len);int inherit_environment_;u_long creation_flags_;void inherit_environment (void);int environment_inherited_;STARTUPINFO startup_info_;BOOL handle_inheritence_;LPSECURITY_ATTRIBUTES process_attributes_;LPSECURITY_ATTRIBUTES thread_attributes_;SECURITY_ATTRIBUTES security_buf1_;SECURITY_ATTRIBUTES security_buf2_;ACE_HANDLE stdin_;ACE_HANDLE stdout_;ACE_HANDLE stderr_;int set_handles_called_;int environment_buf_index_;int environment_argv_index_;LPTSTR environment_buf_;int environment_buf_len_;LPTSTR* environment_argv_;int max_environment_args_;int max_environ_argv_index_;TCHAR working_directory_[MAXPATHLEN + 1];int command_line_argv_calculated_;LPTSTR command_line_buf_;LPTSTR command_line_argv_[MAX_COMMAND_LINE_OPTIONS];};
CreateProcess (or fork
and exec).
Notice that on Windows CE, creating a process merely means
instantiating a new process. You can't set the handles (since
there's no stdin, stdout and stderr,) specify process/thread
options, set environment,... So, basically, this class only
set the command line and nothing else.
STARTUPINFO *startup_info (void);
const LPSECURITY_ATTRIBUTES get_process_attributes (void) const;
LPSECURITY_ATTRIBUTES set_process_attributes (void);
const LPSECURITY_ATTRIBUTES get_thread_attributes (void) const;
LPSECURITY_ATTRIBUTES set_thread_attributes (void);
int handle_inheritence (void);
void handle_inheritence (int);
char * const *command_line_argv (void);
char * const *env_argv (void);
ACE_HANDLE get_stdin (void);
ACE_HANDLE get_stdout (void);
ACE_HANDLE get_stderr (void);
harrison@cs.wustl.edu