diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-80F2A7AC-6E86-54F2-96F0-4417A2AEA017.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-80F2A7AC-6E86-54F2-96F0-4417A2AEA017.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,58 @@ + + + + + +Handle-numbersThis document describes the use of handle-numbers to identify handles. +

A handle is a way in which a thread or process can identify an object that +is owned or managed by another thread or process. Such objects are Kernel +side objects.

+

A handle uses a number, the handle-number, to identify the associated Kernel +side object. The handle, an instance of a RHandleBase derived +class, encapsulates the handle-number.

+

The objects referred to by handles are always instances of CObject derived +classes, i.e. they are reference counting objects. The handle-number is created +when the object is created (or opened, if the object already exists) and added +to an object index.

+

Typically, calling Open() or Create() or +a similarly named function on an RHandleBase derived class +causes the associated object to be created or opened and added to an object +index, owned either by the thread or the process. Adding the object to the +object index creates a handle-number and this is returned to, and encapsulated +by, the handle.

+

For example, RMutex is the handle for a mutex; all user +side interaction with a specific mutex is directed through an instance of RMutex. +The RMutex object exists on the user side; the corresponding +mutex (a DMutex object) exists on the Kernel side.

+ + + +

Here, code running on the user side constructs an RMutex and +calls its Create() member function. This causes the Kernel +to:

+ +... +RMutex m; +m.Create(); +... +

See also:

+ +
\ No newline at end of file