NtMakeTemporaryObject - 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
NtMakeTemporaryObject(
    _In_ HANDLE Handle
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwMakeTemporaryObject(
    _In_ HANDLE Handle
    );

#endif

View code on GitHub

Removes the permanent flag from the object, restoring its lifetime to be dependant on the number of handles. This function is documented in Windows Driver Kit.

Parameters

Remarks

This function undoes the effects of NtMakePermanentObject and specifying OBJ_PERMANENT in OBJECT_ATTRIBUTES.

See also