RProcess Class Reference

class RProcess : public RHandleBase

A handle to a process.

The process itself is a kernel object.

Inherits from

Public Member Functions
RProcess()
RProcess(TInt)
IMPORT_C TIntCreate(const TDesC &, const TDesC &, TOwnerType)
IMPORT_C TIntCreate(const TDesC &, const TDesC &, const TUidType &, TOwnerType)
IMPORT_C TIntCreateWithStackOverride(const TDesC &, const TDesC &, const TUidType &, TInt, TOwnerType)
IMPORT_C TIntDataCaging(TInt)
IMPORT_C TBoolDefaultDataPaged()
IMPORT_C TAny *ExeExportData(void)
IMPORT_C TExitCategoryNameExitCategory()
IMPORT_C TIntExitReason()
IMPORT_C TExitTypeExitType()
IMPORT_C TFileNameFileName()
IMPORT_C TIntGetMemoryInfo(TModuleMemoryInfo &)
TBool HasCapability(TCapability, const char *)
TBool HasCapability(TCapability, TCapability, const char *)
IMPORT_C TProcessIdId()
TUid Identity()
IMPORT_C TBoolJustInTime()
IMPORT_C voidKill(TInt)
IMPORT_C voidLogon(TRequestStatus &)
IMPORT_C TIntLogonCancel(TRequestStatus &)
IMPORT_C TIntOpen(const TDesC &, TOwnerType)
IMPORT_C TIntOpen(TProcessId, TOwnerType)
TInt Open(const TFindProcess &, TOwnerType)
IMPORT_C voidPanic(const TDesC &, TInt)
IMPORT_C TProcessPriorityPriority()
TInt RenameMe(const TDesC &)
IMPORT_C voidRendezvous(TRequestStatus &)
IMPORT_C voidRendezvous(TInt)
IMPORT_C TIntRendezvousCancel(TRequestStatus &)
IMPORT_C voidResume()
IMPORT_C TIntSecureApi(TInt)
IMPORT_C TSecureIdSecureId()
IMPORT_C voidSetJustInTime(TBool)
IMPORT_C TIntSetParameter(TInt, RHandleBase)
IMPORT_C TIntSetParameter(TInt, const RSubSessionBase &)
IMPORT_C TIntSetParameter(TInt, const TDesC16 &)
IMPORT_C TIntSetParameter(TInt, const TDesC8 &)
IMPORT_C TIntSetParameter(TInt, TInt)
IMPORT_C TIntSetPriority(TProcessPriority)
IMPORT_C voidTerminate(TInt)
IMPORT_C TUidTypeType()
IMPORT_C TVendorIdVendorId()
Private Member Functions
IMPORT_C TBoolDoHasCapability(TCapability, const char *)
IMPORT_C TBoolDoHasCapability(TCapability)
IMPORT_C TBoolDoHasCapability(TCapability, TCapability, const char *)
IMPORT_C TBoolDoHasCapability(TCapability, TCapability)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RHandleBase::SetReturnedHandle(TInt)
RHandleBase::SetReturnedHandle(TInt,RHandleBase &)
Public Member Enumerations
enumTDataCaging { EDataCagingOff, EDataCagingOn, EDataCagingQuery }
enumTSecureApi { ESecureApiOff, ESecureApiOn, ESecureApiQuery }
Inherited Enumerations
RHandleBase:TAttributes
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RProcess()

RProcess()[inline]

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.

RProcess(TInt)

RProcess(TIntaHandle)[inline]

Constructor taking a handle number.

Parameters

TInt aHandleThe handle number to be used to construct this RProcess handle.

Member Functions Documentation

Create(const TDesC &, const TDesC &, TOwnerType)

IMPORT_C TIntCreate(const TDesC &aFileName,
const TDesC &aCommand,
TOwnerTypeaType = 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.

Parameters

const TDesC & aFileNameA descriptor containing the full path name of the executable to be loaded. If this name has no file extension, an extension of .EXE is appended. The length of the resulting full path name must not be greater than KMaxFileName. The length of the file name itself must not be greater than KMaxProcessName. If no path is specified, the system will look in \sys\bin on all drives.
const TDesC & aCommandA descriptor containing data passed as an argument to the thread function of the new process's main thread, when it is first scheduled.
TOwnerType aType = EOwnerProcessDefines the ownership of this process handle. If not specified, EOwnerProcess is the default.

Create(const TDesC &, const TDesC &, const TUidType &, TOwnerType)

IMPORT_C TIntCreate(const TDesC &aFileName,
const TDesC &aCommand,
const TUidType &aUidType,
TOwnerTypeaType = 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.

Parameters

const TDesC & aFileNameA descriptor containing the full path name of the executable to be loaded. If this name has no file extension, an extension of .EXE is appended. The length of the resulting full path name must not be greater than KMaxFileName. The length of the file name itself must not be greater than KMaxProcessName. If no path is specified, the system will look in \sys\bin on all drives.
const TDesC & aCommandA descriptor containing data passed as an argument to the thread function of the new process's main thread, when it is first scheduled.
const TUidType & aUidTypeA UID type (a triplet of UIDs) which the executable must match.
TOwnerType aType = EOwnerProcessDefines the ownership of this process handle. If not specified, EOwnerProcess is the default.

CreateWithStackOverride(const TDesC &, const TDesC &, const TUidType &, TInt, TOwnerType)

IMPORT_C TIntCreateWithStackOverride(const TDesC &aFileName,
const TDesC &aCommand,
const TUidType &aUidType,
TIntaMinStackSize,
TOwnerTypeaType
)

Starts a new process, loading the specified executable which matches the specified UID type and the minimum stack size is the specified value.

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.

Parameters

const TDesC & aFileNameA descriptor containing the full path name of the executable to be loaded. If this name has no file extension, an extension of .EXE is appended. The length of the resulting full path name must not be greater than KMaxFileName. The length of the file name itself must not be greater than KMaxProcessName. If no path is specified, the system will look in \sys\bin on all drives.
const TDesC & aCommandA descriptor containing data passed as an argument to the thread function of the new process's main thread, when it is first scheduled.
const TUidType & aUidTypeA UID type (a triplet of UIDs) which the executable must match.
TInt aMinStackSizeMinimum stack size of the new process. If this is less than than the stack size set in the image header of the executable, the minimum stack size will be set to the image header stack size.
TOwnerType aTypeDefines the ownership of this process handle. If not specified, EOwnerProcess is the default.

DataCaging(TInt)

IMPORT_C TIntDataCaging(TIntaState)

Legacy Platform Security development and migration support No replacement

Parameters

TInt aState

DefaultDataPaged()

IMPORT_C TBoolDefaultDataPaged()const

This can be used to determine whether the data for the process is demand paged by default or not.

DoHasCapability(TCapability, const char *)

IMPORT_C TBoolDoHasCapability(TCapabilityaCapability,
const char *aDiagnostic
)const [private]

Parameters

TCapability aCapability
const char * aDiagnostic

DoHasCapability(TCapability)

IMPORT_C TBoolDoHasCapability(TCapabilityaCapability)const [private]

Parameters

TCapability aCapability

DoHasCapability(TCapability, TCapability, const char *)

IMPORT_C TBoolDoHasCapability(TCapabilityaCapability1,
TCapabilityaCapability2,
const char *aDiagnostic
)const [private]

Parameters

TCapability aCapability1
TCapability aCapability2
const char * aDiagnostic

DoHasCapability(TCapability, TCapability)

IMPORT_C TBoolDoHasCapability(TCapabilityaCapability1,
TCapabilityaCapability2
)const [private]

Parameters

TCapability aCapability1
TCapability aCapability2

ExeExportData(void)

IMPORT_C TAny *ExeExportData(void)[static]

Retrieves pointer to named symbol export data from the current process, i.e. the process calling this function.

Parameters

void

ExitCategory()

IMPORT_C TExitCategoryNameExitCategory()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 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.

RProcess::Kill()

ExitReason()

IMPORT_C TIntExitReason()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 Kill(), then the value is the one supplied by Kill().

If the process has not ended, then the returned value is zero.

RProcess::Kill()

ExitType()

IMPORT_C TExitTypeExitType()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.

FileName()

IMPORT_C TFileNameFileName()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 Create() member function of this RProcess.

RProcess::Create()

GetMemoryInfo(TModuleMemoryInfo &)

IMPORT_C TIntGetMemoryInfo(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.

Parameters

TModuleMemoryInfo & aInfoOn successful return, contains the base address and size of the sections.

HasCapability(TCapability, const char *)

TBool HasCapability(TCapabilityaCapability,
const char *aDiagnostic = 0
)const [inline]

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.

Parameters

TCapability aCapabilityThe capability to test.
const char * aDiagnostic = 0A string that will be emitted along with any diagnostic message that may be issued if the test finds the capability is not present. This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system.

HasCapability(TCapability, TCapability, const char *)

TBool HasCapability(TCapabilityaCapability1,
TCapabilityaCapability2,
const char *aDiagnostic = 0
)const [inline]

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.

Parameters

TCapability aCapability1The first capability to test.
TCapability aCapability2The second capability to test.
const char * aDiagnostic = 0A string that will be emitted along with any diagnostic message that may be issued if the test finds a capability is not present. This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system.

Id()

IMPORT_C TProcessIdId()const

Gets the Id of this process.

Identity()

TUid Identity()const [inline]

Use RProcess::SecureId() instead

JustInTime()

IMPORT_C TBoolJustInTime()const

Tests whether "Just In Time" debugging is enabled or not for this process.

RProcess::SetJustInTime

Kill(TInt)

IMPORT_C voidKill(TIntaReason)

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.

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.
User::SetProcessCritical() User::ProcessCritical()

Parameters

TInt aReasonThe reason to be associated with the ending of this process.

Logon(TRequestStatus &)

IMPORT_C voidLogon(TRequestStatus &aStatus)const

Requests notification when this process dies, normally or otherwise.

A request for notification is an asynchronous request, and completes:

A request for notification requires memory to be allocated; if this is unavailable, then the call to Logon() returns, and the asynchronous request completes immediately.

RProcess::LogonCancel() RProcess::ExitReason()

Parameters

TRequestStatus & aStatusA reference to the request status object. This contains the reason code describing the reason for the termination of the process, i.e. the value returned by a call to RProcess::ExitReason(). Alternatively, this is set to: KErrCancel, if an outstanding request is cancelled; KErrNoMemory, if there is insufficient memory to deal with the request.

LogonCancel(TRequestStatus &)

IMPORT_C TIntLogonCancel(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 Logon().

RProcess::Logon()

Parameters

TRequestStatus & aStatusA reference to the same request status object used in the original call to Logon().

Open(const TDesC &, TOwnerType)

IMPORT_C TIntOpen(const TDesC &aName,
TOwnerTypeaType = 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.

Parameters

const TDesC & aNameA reference to the descriptor containing the name of the process to be opened.
TOwnerType aType = EOwnerProcessAn enumeration whose enumerators define the ownership of this thread handle. If not explicitly specified, EOwnerProcess is taken as default.

Open(TProcessId, TOwnerType)

IMPORT_C TIntOpen(TProcessIdaId,
TOwnerTypeaType = 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.

Parameters

TProcessId aIdThe process Id used to find the process.
TOwnerType aType = EOwnerProcessAn enumeration whose enumerators define the ownership of this process handle. If not explicitly specified, EOwnerProcess is taken as default.

Open(const TFindProcess &, TOwnerType)

TInt Open(const TFindProcess &aFind,
TOwnerTypeaType = EOwnerProcess
)[inline]

Opens a handle to the process found by pattern matching a name.

A TFindProcess 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.

Parameters

const TFindProcess & aFindA reference to the TFindProcess object used to find the process.
TOwnerType aType = EOwnerProcessAn enumeration whose enumerators define the ownership of this process handle. If not explicitly specified, EOwnerProcess is taken as default.

Panic(const TDesC &, TInt)

IMPORT_C voidPanic(const TDesC &aCategory,
TIntaReason
)

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.

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.
User::SetProcessCritical() User::ProcessCritical()

Parameters

const TDesC & aCategoryA reference to the descriptor containing the text which defines the category name for this panic.
TInt aReasonThe panic number.

Priority()

IMPORT_C TProcessPriorityPriority()const

Gets the priority of this process.

RenameMe(const TDesC &)

TInt RenameMe(const TDesC &aName)[static, inline]

Use User::RenameProcess() instead

Parameters

const TDesC & aName

Rendezvous(TRequestStatus &)

IMPORT_C voidRendezvous(TRequestStatus &aStatus)const

Creates a Rendezvous request with the process.

The request is an asynchronous request, and completes:

Note that a request requires memory to be allocated; if this is unavailable, then this call to Rendezvous() returns, and the asynchronous request completes immediately.

RProcess::Rendezvous(TInt aReason) RProcess::RendezvousCancel(TRequestStatus& aStatus)

Parameters

TRequestStatus & aStatusA reference to the request status object. The Rendezvous completes normally when RProcess::Rendezvous(TInt aReason) is called, and this request status object will contain this reason code. If the process exits or panics, then this is the process exit reason value, i.e. the same value returned by RProcess::ExitReason(). Alternatively, this is set to: KErrCancel, if an outstanding request is cancelled; KErrNoMemory, if there is insufficient memory to deal with the request.

Rendezvous(TInt)

IMPORT_C voidRendezvous(TIntaReason)[static]

Completes all Rendezvous' with the current process.

RProcess::Rendezvous(TRequestStatus& aStatus)

Parameters

TInt aReasonThe reason code used to complete all rendezvous requests

RendezvousCancel(TRequestStatus &)

IMPORT_C TIntRendezvousCancel(TRequestStatus &aStatus)const

Cancels a previously requested Rendezvous with the process.

The request completes with the value KErrCancel (if it was still outstanding).

RProcess::Rendezvous(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatusA reference to the same request status object used in the original call to Rendezvous(TRequestStatus& aStatus).

Resume()

IMPORT_C voidResume()

Makes the first thread in the process eligible for execution.

panic
KERN-EXEC 32 if the process is not yet fully loaded.
RThread::Resume()

SecureApi(TInt)

IMPORT_C TIntSecureApi(TIntaState)

Legacy Platform Security development and migration support No replacement

Parameters

TInt aState

SecureId()

IMPORT_C TSecureIdSecureId()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);
		TBool pass = mySidPolicy().CheckPolicy(process);

This has the benefit that the TSecurityPolicy::CheckPolicy 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 aProcess, const char* aDiagnostic) const _LIT_SECURITY_POLICY_S0

SetJustInTime(TBool)

IMPORT_C voidSetJustInTime(TBoolaBoolean)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.

Parameters

TBool aBooleanETrue, to enable just-in-time debugging. EFalse, to disable just-in-time debugging.

SetParameter(TInt, RHandleBase)

IMPORT_C TIntSetParameter(TIntaIndex,
RHandleBaseaHandle
)

Sets the specified handle into the specified environment data slot for this process.

The APPARC framework (class CApaApplication etc.) uses some of the slots internally, so programs that use this framework should ensure that they only use slots available for public use.

panic
KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process, or the handle is not local.
panic
KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.
panic
KERN-EXEC 52 if the specified slot is already in use.
CApaApplication CApaCommandLine::EnvironmentSlotForPublicUse()

Parameters

TInt aIndexAn index that identifies the environment data slot. This is a value relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15.
RHandleBase aHandleThe handle to be passed to this process.

SetParameter(TInt, const RSubSessionBase &)

IMPORT_C TIntSetParameter(TIntaSlot,
const RSubSessionBase &aSession
)

Sets the specfied sub-session into the specified environment data slot for this process.

The APPARC framework (class CApaApplication etc.) uses some of the slots internally, so programs that use this framework should ensure that they only use slots available for public use.

panic
KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.
panic
KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.
panic
KERN-EXEC 52 if the specified slot is already in use.
panic
KERN-EXEC 53 if the length of data passed is negative.
CApaApplication CApaCommandLine::EnvironmentSlotForPublicUse()

Parameters

TInt aSlotAn index that identifies the environment data slot. This is a value relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15.
const RSubSessionBase & aSessionThe sub-session.

SetParameter(TInt, const TDesC16 &)

IMPORT_C TIntSetParameter(TIntaSlot,
const TDesC16 &aDes
)

Sets the specified 16-bit descriptor data into the specified environment data slot for this process.

The APPARC framework (class CApaApplication etc.) uses some of the slots internally, so programs that use this framework should ensure that they only use slots available for public use.

panic
KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.
panic
KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.
panic
KERN-EXEC 52 if the specified slot is already in use.
panic
KERN-EXEC 53 if the length of data passed is negative.
CApaApplication CApaCommandLine::EnvironmentSlotForPublicUse()

Parameters

TInt aSlotAn index that identifies the environment data slot. This is a value relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15.
const TDesC16 & aDesThe 16-bit descriptor containing data be passed to this process.

SetParameter(TInt, const TDesC8 &)

IMPORT_C TIntSetParameter(TIntaSlot,
const TDesC8 &aDes
)

Sets the specified 8-bit descriptor data into the specified environment data slot for this process.

The APPARC framework (class CApaApplication etc.) uses some of the slots internally, so programs that use this framework should ensure that they only use slots available for public use.

panic
KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.
panic
KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.
panic
KERN-EXEC 52 if the specified slot is already in use.
panic
KERN-EXEC 53 if the length of data passed is negative.
CApaApplication CApaCommandLine::EnvironmentSlotForPublicUse()

Parameters

TInt aSlotAn index that identifies the environment data slot. This is a value relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15.
const TDesC8 & aDesThe 8-bit descriptor containing data be passed to this process.

SetParameter(TInt, TInt)

IMPORT_C TIntSetParameter(TIntaSlot,
TIntaData
)

Sets the specfied integer value into the specified environment data slot for this process.

The APPARC framework (class CApaApplication etc.) uses some of the slots internally, so programs that use this framework should ensure that they only use slots available for public use.

panic
KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.
panic
KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.
panic
KERN-EXEC 52 if the specified slot is already in use.
panic
KERN-EXEC 53 if the length of data passed is negative.
CApaApplication CApaCommandLine::EnvironmentSlotForPublicUse()

Parameters

TInt aSlotAn index that identifies the environment data slot. This is a value relative to zero; i.e. 0 is the first item/slot. This can range from 0 to 15.
TInt aDataThe integer value.

SetPriority(TProcessPriority)

IMPORT_C TIntSetPriority(TProcessPriorityaPriority)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.

Parameters

TProcessPriority aPriorityThe priority value.

Terminate(TInt)

IMPORT_C voidTerminate(TIntaReason)

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.

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.
User::SetProcessCritical() User::ProcessCritical()

Parameters

TInt aReasonThe reason to be associated with the ending of this process.

Type()

IMPORT_C TUidTypeType()const

Gets the Uid type associated with the process.

VendorId()

IMPORT_C TVendorIdVendorId()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);
		TBool pass = myVidPolicy().CheckPolicy(process);

This has the benefit that the TSecurityPolicy::CheckPolicy 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 aProcess, const char* aDiagnostic) const _LIT_SECURITY_POLICY_V0

Member Enumerations Documentation

Enum TDataCaging

Legacy Platform Security development and migration support No replacement

Enumerators

EDataCagingOff
EDataCagingOn
EDataCagingQuery

Enum TSecureApi

Legacy Platform Security development and migration support No replacement

Enumerators

ESecureApiOff
ESecureApiOn
ESecureApiQuery