NTSTATUS
ObpLookupObjectName(
  IN  HANDLE RootDirectoryHandle OPTIONAL,
  IN  PUNICODE_STRING ObjectName,
  IN  ULONG Attributes,
  IN  POBJECT_TYPE ObjectType,
  IN  KPROCESSOR_MODE AccessMode,
  IN  PVOID ParseContext OPTIONAL,
  IN  PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
  IN  PVOID InsertObject OPTIONAL,
  IN OUT PACCESS_STATE AccessState,
  OUT PBOOLEAN DirectoryLocked,
  OUT PVOID *FoundObject
  );

Routine Description:

    This function will search a given directoroy for a specified
    object name.  It will also create a new object specified by
    InsertObject.

Arguments:

    RootDirectoryHandle - Optionally supplies the directory being
        searched.  If not supplied then this routine searches
        the root directory

    ObjectName - Supplies the name of object to lookup

    Attributes - Specifies the attributes for the lookup (e.g., case
        insensitive)

    ObjectType - Specifies the type of the object to lookup

    AccessMode - Specifies the callers processor mode

    ParseContext - Optionally supplies a parse context that is blindly
        passed to the parse callback routines

    SecurityQos - Optionally supplies a pointer to the passed Security
        Quality of Service parameter that is blindly passed to the parse
        callback routines

    InsertObject - Optionally supplies the object we think will be found.
        This is used if the caller did not give a root directory handle
        and the object name is "\" and the root object directory hasn't
        been created yet.  In other cases where we wind up creating
        a new directory entry this is the object inserted.

    AccessState - Current access state, describing already granted access
        types, the privileges used to get them, and any access types yet to
        be granted.  The access masks may not contain any generic access
        types.

    DirectoryLocked - Receives an indication if this routine has returned
        with the input directory locked

    FoundObject - Receives a pointer to the object body if found

Return Value:

    An appropriate status value