InitializeObjectAttributes

VOID
    InitializeObjectAttributes(

        OUT POBJECT_ATTRIBUTES  InitializedAttributes,
        IN PUNICODE_STRING  ObjectName,
        IN ULONG  Attributes,
        IN HANDLE  RootDirectory,
        IN PSECURITY_DESCRIPTOR  SecurityDescriptor
        );

InitializeObjectAttributes sets up a parameter of type OBJECT_ATTRIBUTES for a subsequent call to a ZwCreateXxx or ZwOpenXxx routine.

Parameters

InitializedAttributes
Is a pointer to the initialized attributes for the object on return from InitializeObjectAttributes.
ObjectName
Is the full path name for the object.
Attributes
Is the set of attributes for the object, which can be a combination (ORed) of the following system-defined values:

OBJ_INHERIT
OBJ_PERMANENT
OBJ_EXCLUSIVE
OBJ_CASE_INSENSITIVE
OBJ_OPENIF

The validity of these values depends on the object type.

RootDirectory
Is a handle for the root directory in which the created object should be placed, in which an object to be opened is contained, or NULL.
SecurityDescriptor
Is an initialized absolute security descriptor for the object or NULL.

Comments

Callers of InitializeObjectAttributes must be running at IRQL PASSIVE_LEVEL.

See Also

ZwCreateDirectoryObject, ZwCreateFile, ZwCreateKey, ZwOpenKey, ZwOpenSection