Location:
e32std.h
Link against: euser.lib
RHandleBase
Supported from 5.0
Handle to an object.
The class encapsulates the basic behaviour of a
handle, hiding the handle-number which identifies the object which the handle
represents. While a number of functions are publicly exported from the header
file, only Close()
, Duplicate()
, Handle()
, SetHandle()
and the copy constructor are part of the public API.
The class is abstract in the sense that a RHandleBase
object is never explicitly instantiated. It always a base class to a concrete
handle class; for example, RSemaphore
, RThread
,
RProcess
, RCriticalSection
etc.
Defined in RHandleBase
:
Close()
, Duplicate()
, Handle()
, RHandleBase()
, SetHandle()
RHandleBase(const RHandleBase& aHandle);
Copy constructor.
It constructs this handle from an existing one. Specifically, the handle-number encapsulated by the specified handle is copied to this handle.
void Close();
Closes the handle.
This has the effect of closing the associated object.
As the associated object is a reference counting object, it is destroyed if there are no other open references to it.
TInt Duplicate(const RThread& aSrc,TOwnerType aType=EOwnerProcess);
Creates a valid handle to the Kernel object to which the specified thread already has a handle.
The function assumes that this handle has been copy constructed from an existing handle (or the handle-number has been explicitly copied through calls to Handle()
and SetHandle()
).
By default, ownership of this handle representing the object is vested in the current process, but can be vested in the current
thread by passing EOwnerThread
as the second parameter to this function.
|
|
void SetHandle(TInt aHandle);
Use this function to set the handle-number of this handle to the specified value.
|
TInt Handle() const;
Retrieves the handle-number of the object associated with this handle.
|