Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
RProcess Class Reference

A handle to a process. More...

#include <e32std.h>

Inheritance diagram for RProcess:
RHandleBase

Public Types

enum  TSecureApi { ESecureApiOff , ESecureApiOn , ESecureApiQuery }
 
enum  TDataCaging { EDataCagingOff , EDataCagingOn , EDataCagingQuery }
 
- Public Types inherited from RHandleBase
enum  TAttributes { EReadAccess =0x1 , EWriteAccess =0x2 , EDirectReadAccess =0x4 , EDirectWriteAccess =0x8 }
 Read/Write attributes for the handle. More...
 

Public Member Functions

 RProcess ()
 Default constructor.
 
IMPORT_C TInt Create (const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess)
 Starts a new process, loading the specified executable.
 
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.
 
IMPORT_C TInt Open (const TDesC &aName, TOwnerType aType=EOwnerProcess)
 Opens a handle to a specifically named process.
 
IMPORT_C TInt Open (TProcessId aId, TOwnerType aType=EOwnerProcess)
 Opens a handle to the process whose process Id matches the specified process ID.
 
IMPORT_C TUidType Type () const
 Gets the Uid type associated with the process.
 
IMPORT_C TProcessId Id () const
 Gets the Id of this process.
 
IMPORT_C void Kill (TInt aReason)
 Ends this process, and all of its threads, specifying a reason code.
 
IMPORT_C void Terminate (TInt aReason)
 Ends this process, and all of its threads, specifying a reason code.
 
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.
 
IMPORT_C void Resume ()
 Makes the first thread in the process 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.
 
IMPORT_C TExitType ExitType () const
 Tests whether the process has ended and, if it has ended, return how it ended.
 
IMPORT_C TInt ExitReason () const
 Gets the specific reason associated with the end of this process.
 
IMPORT_C TExitCategoryName ExitCategory () const
 Gets the name of the category associated with the end of the process.
 
IMPORT_C TProcessPriority Priority () const
 Gets the priority of this process.
 
IMPORT_C TInt SetPriority (TProcessPriority aPriority) const
 Sets the priority of this process to one of the values defined by theTProcessPriority enumeration.
 
IMPORT_C TBool JustInTime () const
 Tests whether "Just In Time" debugging is enabled or not for this process.
 
IMPORT_C void SetJustInTime (TBool aBoolean) const
 Enables or disables "Just In Time" debugging for this process.
 
IMPORT_C void Logon (TRequestStatus &aStatus) const
 Requests notification when this process dies, normally or otherwise.
 
IMPORT_C TInt LogonCancel (TRequestStatus &aStatus) const
 Cancels an outstanding request for notification of the death of this process.
 
IMPORT_C TInt GetMemoryInfo (TModuleMemoryInfo &aInfo) const
 Gets the size and base address of the code and various data sections of the process.
 
TInt Open (const TFindProcess &aFind, TOwnerType aType=EOwnerProcess)
 Opens a handle to the process found by pattern matching a name.
 
IMPORT_C void Rendezvous (TRequestStatus &aStatus) const
 Creates a Rendezvous request with the process.
 
IMPORT_C TInt RendezvousCancel (TRequestStatus &aStatus) const
 Cancels a previously requested Rendezvous with the process.
 
IMPORT_C TBool DefaultDataPaged () const
 This can be used to determine whether the data for the process is demand paged by default or not.
 
IMPORT_C TSecureId SecureId () const
 
IMPORT_C TVendorId VendorId () const
 
TBool HasCapability (TCapability aCapability, const char *aDiagnostic=0) const
 
TBool HasCapability (TCapability aCapability1, TCapability aCapability2, const char *aDiagnostic=0) const
 
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.
 
 RProcess (TInt aHandle)
 Constructor taking a handle number.
 
TUid Identity () const
 
IMPORT_C TInt SecureApi (TInt aState)
 
IMPORT_C TInt DataCaging (TInt aState)
 
IMPORT_C TInt CreateWithStackOverride (const TDesC &aFileName, const TDesC &aCommand, const TUidType &aUidType, TInt aMinStackSize, TOwnerType aType)
 Starts a new process, loading the specified executable which matches the specified UID type and the minimum stack size is the specified value.
 
- Public Member Functions inherited from RHandleBase
 RHandleBase ()
 Default constructor.
 
TInt Handle () const
 Retrieves the handle-number of the object associated with this handle.
 
void SetHandle (TInt aHandle)
 Sets the handle-number of this handle to the specified value.
 
TInt SetReturnedHandle (TInt aHandleOrError)
 Sets the handle-number of this handle to the specified value.
 
IMPORT_C void Close ()
 Closes the handle.
 
IMPORT_C TName Name () const
 Gets the name of the handle.
 
IMPORT_C TFullName FullName () const
 Gets the full name of the handle.
 
IMPORT_C void FullName (TDes &aName) const
 Gets the full name of the handle.
 
IMPORT_C void SetHandleNC (TInt aHandle)
 Sets the handle-number of this handle to the specified value, and marks it as not closable.
 
IMPORT_C TInt Duplicate (const RThread &aSrc, TOwnerType aType=EOwnerProcess)
 Creates a valid handle to the kernel object for which the specified thread already has a handle.
 
IMPORT_C void HandleInfo (THandleInfo *anInfo)
 Gets information about the handle.
 
IMPORT_C TUint Attributes () const
 
IMPORT_C TInt BTraceId () const
 Returns a unique object identifier for use with BTrace.
 
IMPORT_C void NotifyDestruction (TRequestStatus &aStatus)
 Internal technology API.
 

Static Public Member Functions

static TInt RenameMe (const TDesC &aName)
 
static IMPORT_C void Rendezvous (TInt aReason)
 Completes all Rendezvous' with the current process.
 
static IMPORT_C TAny * ExeExportData (void)
 Retrieves pointer to named symbol export data from the current process, i.e.
 
- Static Public Member Functions inherited from RHandleBase
static void DoExtendedClose ()
 

Additional Inherited Members

- Protected Member Functions inherited from RHandleBase
 RHandleBase (TInt aHandle)
 Copy constructor.
 
IMPORT_C TInt Open (const TFindHandleBase &aHandle, TOwnerType aType)
 Opens a handle to a kernel side object found using a find-handle object.
 
TInt OpenByName (const TDesC &aName, TOwnerType aOwnerType, TInt aObjectType)
 Implementation for RXxxxx::Open/OpenGlocbal(const TDesC &aName,,TOwnerType aType) functions.
 
- Static Protected Member Functions inherited from RHandleBase
static TInt SetReturnedHandle (TInt aHandleOrError, RHandleBase &aHandle)
 
- Protected Attributes inherited from RHandleBase
TInt iHandle
 

Detailed Description

A handle to a process.

The process itself is a kernel object.

API status
Published to all clients. Released API.

Definition at line 4334 of file e32std.h.

Member Enumeration Documentation

◆ TDataCaging

Legacy Platform Security development and migration support
@deprecated No replacement
API status
Internal API.
Enumerator
EDataCagingOff 
EDataCagingOn 
EDataCagingQuery 

Definition at line 4545 of file e32std.h.

◆ TSecureApi

Legacy Platform Security development and migration support
@deprecated No replacement
API status
Internal API.
Enumerator
ESecureApiOff 
ESecureApiOn 
ESecureApiQuery 

Definition at line 4527 of file e32std.h.

Constructor & Destructor Documentation

◆ RProcess() [1/2]

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.

(generated from Symbian Developer Library)

◆ RProcess() [2/2]

RProcess::RProcess ( TInt  aHandle)
inline

Constructor taking a handle number.

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

(generated from Symbian Developer Library)

Member Function Documentation

◆ Create() [1/2]

IMPORT_C TInt RProcess::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.

Parameters
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.
aCommandA descriptor containing data passed as an argument to the thread function of the new process's main thread, when it is first scheduled.
aUidTypeA UID type (a triplet of UIDs) which the executable must match.
aTypeDefines the ownership of this process handle. If not specified, EOwnerProcess is the default.

(generated from Symbian Developer Library)

◆ Create() [2/2]

IMPORT_C TInt RProcess::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.

Parameters
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.
aCommandA descriptor containing data passed as an argument to the thread function of the new process's main thread, when it is first scheduled.
aTypeDefines the ownership of this process handle. If not specified, EOwnerProcess is the default.

(generated from Symbian Developer Library)

◆ CreateWithStackOverride()

IMPORT_C TInt RProcess::CreateWithStackOverride ( const TDesC &  aFileName,
const TDesC &  aCommand,
const TUidType &  aUidType,
TInt  aMinStackSize,
TOwnerType  aType 
)

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
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.
aCommandA descriptor containing data passed as an argument to the thread function of the new process's main thread, when it is first scheduled.
aUidTypeA UID type (a triplet of UIDs) which the executable must match.
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.
aTypeDefines the ownership of this process handle. If not specified, EOwnerProcess is the default.

(generated from Symbian Developer Library)

◆ DataCaging()

IMPORT_C TInt RProcess::DataCaging ( TInt  aState)
Legacy Platform Security development and migration support
@deprecated No replacement
API status
Internal API.

◆ DefaultDataPaged()

IMPORT_C TBool RProcess::DefaultDataPaged ( ) const

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

(generated from Symbian Developer Library)

◆ ExeExportData()

static IMPORT_C TAny * RProcess::ExeExportData ( void  )
static

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

the process calling this function.

(generated from Symbian Developer Library)

◆ ExitCategory()

IMPORT_C TExitCategoryName RProcess::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 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()

(generated from Symbian Developer Library)

◆ ExitReason()

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

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

RProcess::Kill()

(generated from Symbian Developer Library)

◆ ExitType()

IMPORT_C TExitType RProcess::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.

(generated from Symbian Developer Library)

◆ FileName()

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

RProcess::Create()

(generated from Symbian Developer Library)

◆ GetMemoryInfo()

IMPORT_C TInt RProcess::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.

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

(generated from Symbian Developer Library)

◆ HasCapability() [1/2]

TBool RProcess::HasCapability ( TCapability  aCapability,
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.

@param aCapability The capability to test.
@param aDiagnostic A 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.
@return ETrue if the process has the capability, EFalse otherwise.
API status
Published to all clients. Released API.
Parameters
aCapabilityThe capability to test.
aDiagnosticA 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.

(generated from Symbian Developer Library)

◆ HasCapability() [2/2]

TBool RProcess::HasCapability ( TCapability  aCapability1,
TCapability  aCapability2,
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.

@param aCapability1 The first capability to test.
@param aCapability2 The second capability to test.
@param aDiagnostic A 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.
@return ETrue if the process has both the capabilities, EFalse otherwise.
API status
Published to all clients. Released API.
Parameters
aCapability1The first capability to test.
aCapability2The second capability to test.
aDiagnosticA 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.

(generated from Symbian Developer Library)

◆ Id()

IMPORT_C TProcessId RProcess::Id ( ) const

Gets the Id of this process.

(generated from Symbian Developer Library)

◆ Identity()

TUid RProcess::Identity ( ) const
inline
Deprecated:
Use RProcess::SecureId() instead

Definition at line 4518 of file e32std.h.

◆ JustInTime()

IMPORT_C TBool RProcess::JustInTime ( ) const

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

RProcess::SetJustInTime

(generated from Symbian Developer Library)

◆ Kill()

IMPORT_C void RProcess::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.

Parameters
aReasonThe reason to be associated with the ending of this 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.

(generated from Symbian Developer Library)

◆ Logon()

IMPORT_C void RProcess::Logon ( 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
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.

(generated from Symbian Developer Library)

◆ LogonCancel()

IMPORT_C TInt RProcess::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 Logon().

RProcess::Logon()

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

(generated from Symbian Developer Library)

◆ Open() [1/3]

IMPORT_C TInt RProcess::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.

Parameters
aNameA reference to the descriptor containing the name of the process to be opened.
aTypeAn enumeration whose enumerators define the ownership of this thread handle. If not explicitly specified, EOwnerProcess is taken as default.

(generated from Symbian Developer Library)

◆ Open() [2/3]

TInt RProcess::Open ( const TFindProcess &  aFind,
TOwnerType  aType = 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
aFindA reference to the TFindProcess object used to find the process.
aTypeAn enumeration whose enumerators define the ownership of this process handle. If not explicitly specified, EOwnerProcess is taken as default.

(generated from Symbian Developer Library)

◆ Open() [3/3]

IMPORT_C TInt RProcess::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.

Parameters
aIdThe process Id used to find the process.
aTypeAn enumeration whose enumerators define the ownership of this process handle. If not explicitly specified, EOwnerProcess is taken as default.

(generated from Symbian Developer Library)

◆ Panic()

IMPORT_C void RProcess::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.

Parameters
aCategoryA reference to the descriptor containing the text which defines the category name for this panic.
aReasonThe panic number.
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.

(generated from Symbian Developer Library)

◆ Priority()

IMPORT_C TProcessPriority RProcess::Priority ( ) const

Gets the priority of this process.

(generated from Symbian Developer Library)

◆ RenameMe()

static TInt RProcess::RenameMe ( const TDesC &  aName)
inlinestatic
@deprecated Use User::RenameProcess() instead
API status
Published to all clients.

◆ Rendezvous() [1/2]

static IMPORT_C void RProcess::Rendezvous ( TInt  aReason)
static

Completes all Rendezvous' with the current process.

RProcess::Rendezvous(TRequestStatus& aStatus)

Parameters
aReasonThe reason code used to complete all rendezvous requests

(generated from Symbian Developer Library)

◆ Rendezvous() [2/2]

IMPORT_C void RProcess::Rendezvous ( 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
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.

(generated from Symbian Developer Library)

◆ RendezvousCancel()

IMPORT_C TInt RProcess::RendezvousCancel ( 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
aStatusA reference to the same request status object used in the original call to Rendezvous(TRequestStatus& aStatus).

(generated from Symbian Developer Library)

◆ Resume()

IMPORT_C void RProcess::Resume ( )

Makes the first thread in the process eligible for execution.

Panic condition: KERN-EXEC 32 if the process is not yet fully loaded.

(generated from Symbian Developer Library)

◆ SecureApi()

IMPORT_C TInt RProcess::SecureApi ( TInt  aState)
Legacy Platform Security development and migration support
@deprecated No replacement
API status
Internal API.

◆ SecureId()

IMPORT_C TSecureId RProcess::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:

@code
RProcess & process;
TInt error =
    process.SecureId() == KRequiredSecureId ? KErrNone : KErrPermissionDenied;
@endcode

this could be used;

@code
RProcess & process;
static _LIT_SECURITY_POLICY_S0(mySidPolicy, KRequiredSecureId);
TBool pass = mySidPolicy().CheckPolicy(process);
@endcode

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.

@see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic) const
@see _LIT_SECURITY_POLICY_S0

@return The Secure ID.
API status
Published to all clients. Released API.

◆ SetJustInTime()

IMPORT_C void RProcess::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.

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

(generated from Symbian Developer Library)

◆ SetParameter() [1/5]

IMPORT_C TInt RProcess::SetParameter ( TInt  aIndex,
RHandleBase  aHandle 
)

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.

Parameters
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.
aHandleThe handle to be passed to this process.

Panic condition: 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 condition: KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.

Panic condition: KERN-EXEC 52 if the specified slot is already in use.

(generated from Symbian Developer Library)

◆ SetParameter() [2/5]

IMPORT_C TInt RProcess::SetParameter ( TInt  aSlot,
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.

Parameters
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.
aSessionThe sub-session.

Panic condition: KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.

Panic condition: KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.

Panic condition: KERN-EXEC 52 if the specified slot is already in use.

Panic condition: KERN-EXEC 53 if the length of data passed is negative.

(generated from Symbian Developer Library)

◆ SetParameter() [3/5]

IMPORT_C TInt RProcess::SetParameter ( TInt  aSlot,
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.

Parameters
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.
aDesThe 16-bit descriptor containing data be passed to this process.

Panic condition: KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.

Panic condition: KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.

Panic condition: KERN-EXEC 52 if the specified slot is already in use.

Panic condition: KERN-EXEC 53 if the length of data passed is negative.

(generated from Symbian Developer Library)

◆ SetParameter() [4/5]

IMPORT_C TInt RProcess::SetParameter ( TInt  aSlot,
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.

Parameters
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.
aDesThe 8-bit descriptor containing data be passed to this process.

Panic condition: KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.

Panic condition: KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.

Panic condition: KERN-EXEC 52 if the specified slot is already in use.

Panic condition: KERN-EXEC 53 if the length of data passed is negative.

(generated from Symbian Developer Library)

◆ SetParameter() [5/5]

IMPORT_C TInt RProcess::SetParameter ( TInt  aSlot,
TInt  aData 
)

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.

Parameters
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.
aDataThe integer value.

Panic condition: KERN-EXEC 46 if this function is called by a thread running in a process that is not the creator of this process.

Panic condition: KERN-EXEC 51 if aSlot is negative or is greater than or equal to the value of KArgIndex.

Panic condition: KERN-EXEC 52 if the specified slot is already in use.

Panic condition: KERN-EXEC 53 if the length of data passed is negative.

(generated from Symbian Developer Library)

◆ SetPriority()

IMPORT_C TInt RProcess::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.

Parameters
aPriorityThe priority value.

(generated from Symbian Developer Library)

◆ Terminate()

IMPORT_C void RProcess::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.

Parameters
aReasonThe reason to be associated with the ending of this 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.

(generated from Symbian Developer Library)

◆ Type()

IMPORT_C TUidType RProcess::Type ( ) const

Gets the Uid type associated with the process.

(generated from Symbian Developer Library)

◆ VendorId()

IMPORT_C TVendorId RProcess::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:

@code
RProcess & process;
TInt error =
    process.VendorId() == KRequiredVendorId ? KErrNone : KErrPermissionDenied;
@endcode

this could be used;

@code
RProcess & process;
static _LIT_SECURITY_POLICY_V0(myVidPolicy, KRequiredVendorId);
TBool pass = myVidPolicy().CheckPolicy(process);
@endcode

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.

@see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic) const
@see _LIT_SECURITY_POLICY_V0

@return The Vendor ID.
API status
Published to all clients. Released API.

The documentation for this class was generated from the following files: