Object Structure
Each object managed by the Object Manager has a header and a body; the header contains state information used by Object Manager, whereas the body contains the object-specific data and the services it exposes. An object header contains certain data, exposed as Properties
, such as Object Name
(which identifies the object), Object Directory
(the category the object belongs to), Security Descriptors
(the access rights for an object), Quota Charges
(the resource usage information for the object), Open handle count
(the number of times a handle, an identifier to the object, has been opened), Open handle list
(the list of processes which has a live reference to the object), its Reference count
(the number of live references to the object), and the Type
(an object that identifies the structure of the object body) of the object.
A Type
object contains properties unique to the type of the object as well as static methods that implement the services offered by the object. Objects managed by Object Manager must at least provide a predefined set of services: Close
(which closes a handle to an object), Duplicate
(create another handle to the object with which another process can gain shared access to the object), Query object
(gather information about its attributes and properties), Query security
(get the security descriptor of the object), Set security
(change the security access), and Wait
(to synchronize with one or more objects via certain events). Type objects also have some common attributes, including the type name, whether they are to be allocated in non-paged memory, access rights, and synchronization information. All instances of the same type share the same type object, and the type object is instantiated only once. A new object type can be created by endowing an object with Properties to expose its state and methods to expose the services it offers.
Object name
is used to give a descriptive identity to an object, to aid in object lookup. Object Manager maintains the list of names already assigned to objects being managed, and maps the names to the instances. Since most object accesses occur via handles, it is not always necessary to look up the name to resolve into the object reference. Lookup is only performed when an object is created (to make sure the new object has a unique name), or a process accesses an object by its name explicitly. Object directories
are used to categorize them according to the types. Predefined directories include \??
(device names), \BaseNamedObjects
(Mutexes, events, semaphores, waitable timers, and section objects), \Callback
(callback functions), \Device
, \Drivers
, \FileSystem
, \KnownDlls
, \Nls
(language tables), \ObjectTypes
(type objects), \RPC Controls
(RPC ports), \Security
(security subsystem objects), and \Window
(windowing subsystem objects). Objects also belong to a Namespace. Each user session is assigned a different namespace. Objects shared between all sessions are in the GLOBAL namespace, and session-specific objects are in the specific session namespaces
OBJECT_ATTRIBUTES structure:
typedef struct _OBJECT_ATTRIBUTES{ ULONG Length; HANDLE RootDirectory; PUNICODE_STRING ObjectName; ULONG Attributes; PSECURITY_DESCRIPTOR SecurityDescriptor; PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService; }The Attributes member can be zero, or a combination of the following flags:
OBJ_INHERIT OBJ_PERMANANT OBJ_EXCLUSIVE OBJ_CASE_INSENSITIVE OBJ_OPENIF OBJ_OPENLINK OBJ_KERNEL_HANDLE OBJ_FORCE_ACCESS_CHECKRead more about this topic: Object Manager (Windows), Architecture
Famous quotes containing the words object and/or structure:
“Our object in the construction of the state is the greatest happiness of the whole, and not that of any one class.”
—Plato (c. 427347 B.C.)
“Each structure and institution here was so primitive that you could at once refer it to its source; but our buildings commonly suggest neither their origin nor their purpose.”
—Henry David Thoreau (18171862)