Section contents
ce32base.oxh
this& = NewProcess&:
Creates a rectangle object and returns a handle which allows the object to be manipulated.
this& |
An value which represents the created process |
If the object could not be created then an error is generated
which should be trapped by an ONERR
handler.
LOCAL this& this& = NewProcess&: DeleteProcess:(this&)
DeleteProcess:(BYREF this&)
Destroys the process object.
this& |
A handle to a process object |
LOCAL this& this& = NewProcess&: DeleteProcess:(this&)
cmdline$ = ProcessCommandLine$:(this&)
Use this function to fetch a copy of the data which is passed as an argument to the thread function of the new process's main thread when it is first scheduled to run.
This is the command line which is passed to the ProcessCreate%:() member function of this process object.
this& |
A handle to a process object |
cmdline$ |
The command line |
result% = ProcessCreate%:(this&,filename$,command$)
Use this function to start a new process.
The string command$ contains
the full path name of the executable to be loaded; this can be in
ROM or RAM. If the full path name has no file extension, an
extension of .EXE
is appended. The length of the
resulting full path name must be less than or equal to
KMaxfileName%. The length of the file name itself must always be
less than or equal to KMaxOsName%.
this& |
A handle to a process object |
filename$ |
Full path name of the executable to be loaded |
command$ |
Data to be passed to the main thread of the new process when it is first scheduled. |
result% |
category$ = ProcessExitCategory$:(this&)
Use this function to find the name of the category associated with the end of the process. The category name together with the reason number is a way of distinguishing between different causes of process termination.
If the process has panicked, the category name is the panic category name; for example, E32USER-CBase or KERN-EXEC. If the process has ended as a result of a call to Kill(), then the category name is Kill.
If the process has not ended, then the category name is empty, i.e. the length of the category name is zero.
this& |
A handle to a process object |
category$ |
The category associated with the end of the process. |
ProcessExitReason, ProcessExitType, ProcessKill, ProcessPanic
reason& = ProcessExitReason&:(this&)
Use this function to find the specific reason associated with the end of this process. The reason number together with the category name is a way of distinguishing between different causes of process termination.
If the process has panicked, this value is the panic number. If the process has ended as a result of a call to ProcessKill:(), then the value is the one supplied by ProcessKill:().
If the process has not ended, then the returned value is zero.
this& |
A handle to a process object |
reason& |
The reason associated with the end of the process. |
ProcessExitCategory, ProcessExitType, ProcessKill, ProcessPanic
type% = ProcessExitType%:(this&)
Use this function to find out whether or not the process has ended and, if it has ended, how it ended.
This information allows the caller to distinguish between controlled termination and a panic.
this& |
A handle to a process object |
type% |
An exit type which describe how the process has ended. |
ProcessExitCategory, ProcessExitReason, ProcessKill, ProcessPanic
name$ = ProcessFileName$:(this&)
Use this function to fetch a copy of the full path name of the loaded executable on which this process is based.
This is the file name which is passed to the ProcessCreate:%() function of this process object.
this& |
A handle to a process object |
name$ |
Full path name of the file. |
ProcessGetRamSizes:(this&,BYREF code&,BYREF
constData&,BYREF initializedData&,BYREF
uninitializedData&)
Use this function to get the size of an executable's sections.
The function fetches the:
If the process's executable is running from ROM, then the size of both the binary code and the constant data are zero.
this& |
A handle to a process object |
BYREF code& |
On return from this function, contains the size of the executable's binary. |
BYREF constData& |
On return from this function, contains the size of the executable's constant data section. |
BYREF initializedData& |
On return from this function, contains the size of the executable's initialized data section. |
BYREF uninitializedData& |
On return from this function, contains the size of the executable's uninitialized data section. |
ProcessKill:(this&,reason&)
Use this function to end this process specifying the reason code reason&.
this& |
A handle to a process object |
reason& |
The reason to be associated with the ending of this process. |
bool% = ProcessLoadedFromRam%:(this&)
Use this function to determine whether the executable for this process was loaded from RAM or was found in ROM.
this& |
A handle to a process object |
bool% |
Return KTrue%(-1) if the executable was
loaded from RAM, otherwise it returns KFalse%(0) |
result% = ProcessOpenFind:(this&,pattern$,count%)
Use this function to open a handle to the process found using a pattern to be matched.
this& |
A handle to a process object |
pattern$ |
|
count% |
result% |
result% = ProcessOpenName:(this&,name$)
Use this function to open a handle to an existing process which has the same name as that contained in the string name$
this& |
A handle to a process object |
name$ |
Name of the process to be opened. |
result% |
result% = ProcessOwner:(this&,BYREF that&)
Use this function to get a handle to the process which owns this process.
this& |
A handle to a process object |
BYREF owner& |
On successful return from this function, this is a
fully constructed handle. to the owning process. Note:
This this handle must be destroyed by a call to |
result% |
ProcessPanic:(this&,category$,reason&)
Use this function to panic the process and all of its owned threads, specifying the panic category name in the string category$ and the panic number defined by reason.
this& |
A handle to a process object |
category$ |
A string containing the text which defines the category name for this panic. |
reason& |
The panic number |
result% |
priority% = ProcessPriority%:(this&)
Use this function to fetch the priority of this process.
this& |
A handle to a process object |
priority% |
The process prority of this process |
bool% = ProcessProtected%:(this&)
Use this function to determine whether this process is protected.
The protected state prevents any other process from setting the priority, ending or panicking this process.
this& |
A handle to a process object |
bool% |
KTrue%(-1) , if the process is protected;
KFalse%(0) , otherwise |
result% = ProcessRename%:(this&,name$)
Use this function to assign a new name to this process, replacing any existing name.
When a process is created, its default name is the name portion of the filename from which the executable is loaded.
Any attempt to rename a process which is protected and is different from the process invoking this function, causes the rename operation to fail. A process can call ProcessRename%:() on itself whether it is protected or not.
The new name must be a valid name and it must also be such that the process's new fullname remains unique amongst processes.
this& |
A handle to a process object |
name$ |
New name of the process |
result% |
ProcessResume:(this&)
Use this function to make the first thread (the main thread) in the process eligible for execution.
this& |
A handle to a process object |
ProcessSetOwner:(this&,process&)
Use this function to make the process with handle aProcess, the owner of this process.
this& |
A handle to a process object |
process& |
A handle to the owner process object which is to own this process |
ProcessSetPriority:(this&,priority&)
Use this function to set the priority of this process
this& |
A handle to a process object |
priority& |
The process priority to be set |
ProcessSetProtected:(this&,protected%)
Use this function to set the process into a protected state.
The protected state prevents any other process from setting the priority, ending or panicking this process.
this& |
A handle to a process object |
protected% |
KTrue%(-1) , if the process is to be
protected; KFalse%(0) , otherwise. |
ProcessSetUIDType:(this&,uid1&,uid2&,uid3&)
Use this function to set the process type.
this& |
A handle to a process object |
uid1& |
|
uid2& |
|
uid3& |
ProcessUIDType:(this&,BYREF uid1&,BYREF uid2&,BYREF
uid3&)
<TBS>
this& |
A handle to a process object |
BYREF uid1& |
|
BYREF uid2& |
|
BYREF uid3& |