#ifndef _NTOBAPI_H
// Objects, handles
#if (PHNT_MODE != PHNT_MODE_KERNEL)
NTSYSCALLAPI
NTSTATUS
NTAPI
NtMakePermanentObject(
_In_ HANDLE Handle
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwMakePermanentObject(
_In_ HANDLE Handle
);
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
.
Handle
- a handle to a kernel object. The handle does not need to grant any specific access.To make new objects have permanent state from their creation, include OBJ_PERMANENT
in OBJECT_ATTRIBUTES
.