#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_
#define OBJ_PERMANENT 0x00000010L
View code on GitHubThis OBJECT_ATTRIBUTES flag indicates that the object should be marked as permanent. This flag alters the lifetime of the object, making it independent from reference counting. Creating or marking objects as permanent requires SeCreatePermanentPrivilege. To delete such object, make it temporary first via NtMakeTemporaryObject.
OBJ_PROTECT_CLOSEOBJ_INHERITOBJ_AUDIT_OBJECT_CLOSEOBJ_NO_RIGHTS_UPGRADEOBJ_EXCLUSIVEOBJ_CASE_INSENSITIVEOBJ_OPENIFOBJ_OPENLINKOBJ_KERNEL_HANDLEOBJ_FORCE_ACCESS_CHECKOBJ_IGNORE_IMPERSONATED_DEVICEMAPOBJ_DONT_REPARSETo make an existing object permanent, use NtMakePermanentObject.