NtMakePermanentObject - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTOBAPI_H
// Objects, handles
#if (PHNT_MODE != PHNT_MODE_KERNEL)

NTSYSCALLAPI
NTSTATUS
NTAPI
NtMakePermanentObject(
    _In_ HANDLE Handle
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwMakePermanentObject(
    _In_ HANDLE Handle
    );

#endif

View code on GitHub

Marks an object as permanent, extending its lifetime past the last closed handle. Calling this function requires having SeCreatePermanentPrivilege enabled. To undo the operation, use NtMakeTemporaryObject.

Parameters

Remarks

To make new objects have permanent state from their creation, include OBJ_PERMANENT in OBJECT_ATTRIBUTES.

See also