This document describes how to find a global kernel object by using a handle.
A handle can be opened on an existing global Kernel object.
Global Kernel objects are explicitly named by their creators; the technique
for finding these objects involves using a search pattern to search for objects
with matching full names. The TFindHandleBase provides the
basic behavior.
In practice, each specific type has its own class derived from TFindHandleBase,
for example, semaphores have TFindSemaphore, mutexes have TFindMutex and
so on.
For example, the following code fragment searches for the first global semaphore whose full name ends with the characters "day" and opens a thread-relative handle on that semaphore:
_LIT(KDay,"*day");
...
TFindSemaphore finder(KDay); // derived from TFindHandleBase
TFullName theName;
RSemaphore theSem; // derived from RHandleBase
...
if ((finder.Next(thename))==KErrNone)
{
theSem.Open(finder,EOwnerThread);
...
}
...