Training
×

Object Directory

Object directories are used to share objects between threads, in the same or in different processes. The use of object directories can avoid synchronization problems during initialization.
The number of entries in a process's object directory is specified when the process is created.
The name under which an object is cataloged can be up to 12 bytes. The name is specified in a C string and is case-sensitive. If you try to catalog an object under a name that has already been used in that object directory, an E_CONTEXT exception code will be returned.
A byte-by-byte comparison is done with LookupRtHandle. If the name is not found in the object directory, the thread goes to sleep for the specified amount of time. If the name is not cataloged within that time, the thread is woken up with an E_TIME exception code.
To remove an entry from an object directory, use UncatalogRtHandle. When an object that has been cataloged is deleted (explicitly or when its process is deleted), the corresponding cataloged entry is NOT removed.