|
||
class RProcess : public RHandleBase;
A handle to a process.
The process itself is a kernel object.
RHandleBase
- A handle to an object.
RProcess
- A handle to a process.
Defined in RProcess
:
Create(const TDesC &,const TDesC &,TOwnerType)
Starts a new process, loading the specified executable.Create(const TDesC &,const TDesC &,const TUidType &,TOwnerType)
Starts a new process, loading the specified executable which matches the specifi...CreateWithStackOverride(const TDesC &,const TDesC &,const TUidType &,TInt,TOwnerType)
CR0885ExitCategory()const
Gets the name of the category associated with the end of the process.ExitReason()const
Gets the specific reason associated with the end of this process.ExitType()const
Tests whether the process has ended and, if it has ended, return how it ended.FileName()const
Gets a copy of the full path name of the loaded executable on which this process...GetMemoryInfo(TModuleMemoryInfo &)const
Gets the size and base address of the code and various data sections of the proc...HasCapability(TCapability,TCapability,const char *)const
Check if the process has both of the given capabilitiesHasCapability(TCapability,const char *)const
Check if the process has a given capabilityId()const
Gets the Id of this process.Identity()const
JustInTime()const
Tests whether "Just In Time" debugging is enabled or not for this proc...Kill(TInt)
Ends this process, and all of its threads, specifying a reason code.Logon(TRequestStatus &)const
Requests notification when this process dies, normally or otherwise.LogonCancel(TRequestStatus &)const
Cancels an outstanding request for notification of the death of this process.Open(TProcessId,TOwnerType)
Opens a handle to the process whose process Id matches the specified process ID.Open(const TDesC &,TOwnerType)
Opens a handle to a specifically named process.Open(const TFindProcess &,TOwnerType)
Opens a handle to the process found by pattern matching a name.Panic(const TDesC &,TInt)
Panics the process and all of its owned threads, specifying the panic category n...Priority()const
Gets the priority of this process.RProcess()
Default constructor.RProcess(TInt)
Constructor taking a handle number.RenameMe(const TDesC &)
Rendezvous(TInt)
Completes all Rendezvous' with the current process.Rendezvous(TRequestStatus &)const
Creates a Rendezvous request with the process.RendezvousCancel(TRequestStatus &)const
Cancels a previously requested Rendezvous with the process.Resume()
Makes the first thread in the process eligible for execution.SecureId()const
Return the Secure ID of the process.SetJustInTime(TBool)const
Enables or disables "Just In Time" debugging for this process. This wi...SetParameter(TInt,RHandleBase)
Sets the specified handle into the specified environment data slot for this proc...SetParameter(TInt,TInt)
Sets the specfied integer value into the specified environment data slot for thi...SetParameter(TInt,const RSubSessionBase &)
Sets the specfied sub-session into the specified environment data slot for this ...SetParameter(TInt,const TDesC16 &)
Sets the specified 16-bit descriptor data into the specified environment data sl...SetParameter(TInt,const TDesC8 &)
Sets the specified 8-bit descriptor data into the specified environment data slo...SetPriority(TProcessPriority)const
Sets the priority of this process to one of the values defined by theTProcessPri...Terminate(TInt)
Ends this process, and all of its threads, specifying a reason code.Type()const
Gets the Uid type associated with the process.VendorId()const
Return the Vendor ID of the process.Inherited from RHandleBase
:
Attributes()const
BTraceId()const
Returns a unique object identifier for use with BTrace
Close()
Closes the handle.Duplicate(const RThread &,TOwnerType)
Creates a valid handle to the kernel object for which the specified thread alrea...FullName()const
Gets the full name of the handle.FullName(TDes &)const
Gets the full name of the handle.Handle()const
Retrieves the handle-number of the object associated with this handle.HandleInfo(THandleInfo *)
Gets information about the handle.Name()const
Gets the name of the handle.Open(const TFindHandleBase &,TOwnerType)
Opens a handle to a kernel side object found using a find-handle object.RHandleBase(TInt)
Copy constructor.SetHandle(TInt)
Sets the handle-number of this handle to the specified value.SetHandleNC(TInt)
Sets the handle-number of this handle to the specified value, and marks it as no...SetReturnedHandle(TInt)
Sets the handle-number of this handle to the specified value.iHandle
inline RProcess();
Default constructor.
The constructor exists to initialise private data within this handle; it does not create the process object.
Specifically, it sets the handle-number to the value KCurrentProcessHandle. In effect, the constructor creates a default process handle.
inline RProcess(TInt aHandle);
Constructor taking a handle number.
|
IMPORT_C TInt Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);
Starts a new process, loading the specified executable.
The executable can be in ROM or RAM.
By default, ownership of this process handle is vested in the current process, but can be vested in the current thread by specifying EOwnerThread as the third parameter to this function.
|
|
IMPORT_C TInt Create(const TDesC &aFileName, const TDesC &aCommand, const TUidType &aUidType, TOwnerType aType=EOwnerProcess);
Starts a new process, loading the specified executable which matches the specified UID type.
The executable can be in ROM or RAM.
By default, ownership of this process handle is vested in the current process, but can be vested in the current thread by specifying EOwnerThread as the fourth parameter.
|
|
IMPORT_C TInt Open(const TDesC &aName, TOwnerType aType=EOwnerProcess);
Opens a handle to a specifically named process.
By default, ownership of this process handle is vested in the current process, but can be vested in the current thread by passing EOwnerThread as the second parameter to this function.
|
|
IMPORT_C TInt Open(TProcessId aId, TOwnerType aType=EOwnerProcess);
Opens a handle to the process whose process Id matches the specified process ID.
By default, ownership of this process handle is vested in the current process, but can be vested in the current thread by passing EOwnerThread as the second parameter to this function.
|
|
IMPORT_C TUidType Type() const;
Gets the Uid type associated with the process.
|
IMPORT_C TProcessId Id() const;
Gets the Id of this process.
|
Interface status: | deprecated | Use User::RenameProcess() instead |
static inline TInt RenameMe(const TDesC &aName);
|
|
Capability: | PowerMgmt | except when one of the following situations is true: 1. the process calling this function is the same as the process to be terminated. 2. the process calling this function created the process to be terminated, but has not yet resumed that process. |
IMPORT_C void Kill(TInt aReason);
Ends this process, and all of its threads, specifying a reason code.
This function is intended to be used if a process is exiting under normal conditions.
If the process is system permanent, the entire system is rebooted.
|
User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...User::ProcessCritical()
Gets the critical state associated with the current process.Capability: | PowerMgmt | except when one of the following situations is true: 1. the process calling this function is the same as the process to be terminated. 2. the process calling this function created the process to be terminated, but has not yet resumed that process. |
IMPORT_C void Terminate(TInt aReason);
Ends this process, and all of its threads, specifying a reason code.
This function is intended to be used if a process is exiting under abnormal conditions, for example if an error condition has been detected.
If the process is system critical or system permanent, the entire system is rebooted.
|
User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...User::ProcessCritical()
Gets the critical state associated with the current process.Capability: | PowerMgmt | except when one of the following situations is true: 1. the process calling this function is the same as the process to be terminated. 2. the process calling this function created the process to be terminated, but has not yet resumed that process. |
IMPORT_C void Panic(const TDesC &aCategory, TInt aReason);
Panics the process and all of its owned threads, specifying the panic category name and reason code.
The length of the category name should be no greater than 16; any name with a length greater than 16 is truncated to 16.
If the process is system critical or system permanent, the entire system is rebooted.
|
User::SetProcessCritical(TCritical)
Sets up or changes the effect that termination of subsequently created threads w...User::ProcessCritical()
Gets the critical state associated with the current process.IMPORT_C void Resume();
Makes the first thread in the process eligible for execution.
|
RThread::Resume()const
Makes the thread eligible for execution.IMPORT_C TFileName FileName() const;
Gets 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 RProcess::Create(const TDesC &,const TDesC &,TOwnerType)
member function of this RProcess.
|
RProcess::Create(const TDesC &,const TDesC &,TOwnerType)
Starts a new process, loading the specified executable.IMPORT_C TExitType ExitType() const;
Tests whether the process has ended and, if it has ended, return how it ended.
This information allows the caller to distinguish between normal termination and a panic.
|
IMPORT_C TInt ExitReason() const;
Gets 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 RProcess::Kill(TInt)
, then the value is the one supplied by RProcess::Kill(TInt)
.
If the process has not ended, then the returned value is zero.
|
RProcess::Kill(TInt)
Ends this process, and all of its threads, specifying a reason code.IMPORT_C TExitCategoryName ExitCategory() const;
Gets 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 RProcess::Kill(TInt)
, 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.
|
RProcess::Kill(TInt)
Ends this process, and all of its threads, specifying a reason code.IMPORT_C TProcessPriority Priority() const;
Gets the priority of this process.
|
IMPORT_C void SetPriority(TProcessPriority aPriority) const;
Sets the priority of this process to one of the values defined by theTProcessPriority enumeration. The priority can be set to one of the four values:
EPriorityLow
EPriorityBackground
EPriorityForeground
EPriorityHigh
The absolute priority of all threads owned by the process (and all threads owned by those threads etc.) are re-calculated.
Notes:
The priority values EPriorityWindowServer, EPriorityFileServer, EPriorityRealTimeServer and EPrioritySupervisor are internal to Symbian OS and any attempt to explicitly set any of these priority values causes a KERN-EXEC 14 panic to be raised.
Any attempt to set the priority of a process which is protected and is different from the process owning the thread which invokes this function, causes a KERN-EXEC 1 panic to be raised.
A process can set its own priority whether it is protected or not.
|
IMPORT_C TBool JustInTime() const;
Tests whether "Just In Time" debugging is enabled or not for this process.
|
RProcess::SetJustInTime(TBool)const
Enables or disables "Just In Time" debugging for this process. This wi...IMPORT_C void SetJustInTime(TBool aBoolean) const;
Enables or disables "Just In Time" debugging for this process. This will only have an effect when running on the emulator.
"Just In Time" debugging catches a thread just before it executes a panic or exception routine. Capturing a thread early, before it is terminated, allows the developer to more closely inspect what went wrong, before the kernel removes the thread. In some cases, the developer can modify context, program counter, and variables to recover the thread. This is only possible on the emulator.
By default, "Just In Time" debugging is enabled.
|
IMPORT_C void Logon(TRequestStatus &aStatus) const;
Requests notification when this process dies, normally or otherwise.
A request for notification is an asynchronous request, and completes:
when the process terminates
if the outstanding request is cancelled by a call to RProcess::LogonCancel(TRequestStatus &)const
.
A request for notification requires memory to be allocated; if this is unavailable, then the call to RProcess::Logon(TRequestStatus &)const
returns, and the asynchronous request completes immediately.
|
RProcess::LogonCancel(TRequestStatus &)const
Cancels an outstanding request for notification of the death of this process.RProcess::ExitReason()const
Gets the specific reason associated with the end of this process.IMPORT_C TInt LogonCancel(TRequestStatus &aStatus) const;
Cancels an outstanding request for notification of the death of this process.
A request for notification must previously have been made, otherwise the function returns KErrGeneral.
The caller passes a reference to the same request status object as was passed in the original call to RProcess::Logon(TRequestStatus &)const
.
|
|
RProcess::Logon(TRequestStatus &)const
Requests notification when this process dies, normally or otherwise.IMPORT_C TInt GetMemoryInfo(TModuleMemoryInfo &aInfo) const;
Gets the size and base address of the code and various data sections of the process.
The run addresses are also returned.
|
|
inline TInt Open(const TFindProcess &aFind, TOwnerType aType=EOwnerProcess);
Opens a handle to the process found by pattern matching a name.
ATFindProcess
object is used to find all processes whose full names match a specified pattern.
By default, ownership of this process handle is vested in the current process, but can be vested in the current thread by passing EOwnerThread as the second parameter to this function.
|
|
IMPORT_C void Rendezvous(TRequestStatus &aStatus) const;
Creates a Rendezvous request with the process.
The request is an asynchronous request, and completes:
when a call is made to RProcess::Rendezvous(TInt)
.
if the outstanding request is cancelled by a call to RProcess::RendezvousCancel(TRequestStatus &)const
if the process exits
if the process panics.
Note that a request requires memory to be allocated; if this is unavailable, then this call to RProcess::Rendezvous(TRequestStatus &)const
returns, and the asynchronous request completes immediately.
|
RProcess::Rendezvous(TInt)
Completes all Rendezvous' with the current process.IMPORT_C TInt RendezvousCancel(TRequestStatus &aStatus) const;
Cancels a previously requested Rendezvous with the process.
The request completes with the value KErrCancel (if it was still outstanding).
|
|
IMPORT_C static void Rendezvous(TInt aReason);
Completes all Rendezvous' with the current process.
|
IMPORT_C TSecureId SecureId() const;
Return the Secure ID of the process.
If an intended use of this method is to check that the Secure ID is a given value, then the use of a TSecurityPolicy
object should be considered. E.g. Instead of something like:
RProcess& process;
TInt error = process.SecureId()==KRequiredSecureId ? KErrNone : KErrPermissionDenied;
this could be used;
RProcess& process;
static _LIT_SECURITY_POLICY_S0(mySidPolicy, KRequiredSecureId);
TInt error = mySidPolicy().CheckPolicy(process);
This has the benefit that the TSecurityPolicy::CheckPolicy(RProcess,const char *)const
methods are configured by the system wide Platform Security configuration. I.e. are capable of emitting diagnostic messages
when a check fails and/or the check can be forced to always pass.
|
TSecurityPolicy::CheckPolicy(RProcess,const char *)const
Checks this policy against the platform security attributes of aProcess.IMPORT_C TVendorId VendorId() const;
Return the Vendor ID of the process.
If an intended use of this method is to check that the Vendor ID is a given value, then the use of a TSecurityPolicy
object should be considered. E.g. Instead of something like:
RProcess& process;
TInt error = process.VendorId()==KRequiredVendorId ? KErrNone : KErrPermissionDenied;
this could be used;
RProcess& process;
static _LIT_SECURITY_POLICY_V0(myVidPolicy, KRequiredVendorId);
TInt error = myVidPolicy().CheckPolicy(process);
This has the benefit that the TSecurityPolicy::CheckPolicy(RProcess,const char *)const
methods are configured by the system wide Platform Security configuration. I.e. are capable of emitting diagnostic messages
when a check fails and/or the check can be forced to always pass.
|
TSecurityPolicy::CheckPolicy(RProcess,const char *)const
Checks this policy against the platform security attributes of aProcess.inline TBool HasCapability(TCapability aCapability, const char *aDiagnostic=0) const;
Check if the process has a given capability
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will return ETrue even though the check failed.
|
|
inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, const char *aDiagnostic=0) const;
Check if the process has both of the given capabilities
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will return ETrue even though the check failed.
|
|
IMPORT_C TInt SetParameter(TInt aIndex, RHandleBase aHandle);
Sets the specified handle into the specified environment data slot for this process.
|
|
|
IMPORT_C TInt SetParameter(TInt aSlot, const RSubSessionBase &aSession);
Sets the specfied sub-session into the specified environment data slot for this process.
|
|
|
IMPORT_C TInt SetParameter(TInt aSlot, const TDesC16 &aDes);
Sets the specified 16-bit descriptor data into the specified environment data slot for this process.
|
|
|
IMPORT_C TInt SetParameter(TInt aSlot, const TDesC8 &aDes);
Sets the specified 8-bit descriptor data into the specified environment data slot for this process.
|
|
|
IMPORT_C TInt SetParameter(TInt aSlot, TInt aData);
Sets the specfied integer value into the specified environment data slot for this process.
|
|
|
Interface status: | deprecated | Use RProcess::SecureId() instead |
inline TUid Identity() const;
|
IMPORT_C TInt CreateWithStackOverride(const TDesC &aFileName, const TDesC &aCommand, const TUidType &aUidType, TInt aMinStackSize,
TOwnerType aType);
CR0885
|
|