This class works in conjunction with IEnvironment, which is used to build the environment passed to the new process. Note that, upon construction, an IExternalProcess has no environment. If you want to pass any environment to your new process, you must create an IEnvironment object and call setEnvironment() to set up the new environment. The IEnvironment class has an optional constructor that will fill itself in with the current environment of the calling process, which is most often what you want to do. Once you have a copy of your own environment, you can add or remove or modify entries in it before setting the environment on the external process object.
OS/2 is not capable of passing UNICode environment variables or command line parameters to the new process. All such text will be converted from their IText format into ASCII text before being passed to the new process.
Construct and destructor external process objects
![]() |
public:
~IExternalProcess()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IExternalProcess()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Access member data of an external process object.
![]() |
public:
inline IProcessId getId() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline IPathName getPath() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline IProcessId id() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline void setEnvironment(const IEnvironment& newEnv)
IInvalidRequest | if the process is already started. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline void setPath(const IPathName& newName)
IInvalidRequest | if the process is already started. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Control the external process
![]() |
public:
inline virtual void kill()
IAccessError | if the system API used to implement this method fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool setPriority( INonGUIApplication::PriorityClass priority )
IAccessError | if the system API used to implement this method fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void start()
IInvalidRequest | if the process is already started.
IInvalidParameter if the path currently set is empty or beyond the maximum legal platform length, or does not represent a valid executable file. IResourceExhausted if the internal environment buffer used to pass environment info to the new process is overflowed by too much environmental variable information. IAccessError if the system API used to execute the new process fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual void start(const IPathName& path)
IInvalidRequest | if the process is already started.
IInvalidParameter if the path currently set is empty or beyond the maximum legal platform length, or does not represent a valid executable file. IResourceExhausted if the internal environment buffer used to pass environment info to the new process is overflowed by too much environmental variable information. IAccessError if the system API used to execute the new process fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual void start( const IText* argArray, const unsigned long argCount )
argCount is the count of arguments in the argArray parameter.
IInvalidRequest | if the process is already started.
IInvalidParameter if the path currently set is empty or beyond the maximum legal platform length, or does not represent a valid executable file. IResourceExhausted if the internal environment buffer used to pass environment info to the new process is overflowed by too much environmental variable information. IAccessError if the system API used to execute the new process fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual void start( const IPathName& path, const IText* argArray, const unsigned long argCount )
argArray an array of IText objects which contain the command line parameters to pass
argCount is the count of arguments in the argArray parameter.
IInvalidRequest | if the process is already started.
IInvalidParameter if the path currently set is empty or beyond the maximum legal platform length, or does not represent a valid executable file. IResourceExhausted if the internal environment buffer used to pass environment info to the new process is overflowed by too much environmental variable information. IAccessError if the system API used to execute the new process fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline void stop()
Same |
as kill() |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline virtual bool wait(const long timeout = - 1) const
IAccessError | if the system wait API used to implement this method fails. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Query information about the external process.
![]() |
public:
inline virtual bool exitStatus(unsigned long& status) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual INonGUIApplication::PriorityClass getPriority() const
IAccessError | if the priority cannot be obtained
IInvalidParameter if the priority returned from the system is not mappable to a standard OpenClass process priority class. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline virtual bool isRunning() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
inline bool isStarted() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
static IExtProcImplBase* makeImplObj()