#ifndef _NTOBAPI_H
//
// Objects, handles
//
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtMakeTemporaryObject routine changes the attributes of an object to make it temporary.
*
* @param Handle Handle to an object of any type.
* @return NTSTATUS Successful or errant status.
* @sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-zwmaketemporaryobject
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtMakeTemporaryObject(
_In_ HANDLE Handle
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwMakeTemporaryObject(
_In_ HANDLE Handle
);
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.
Handle
- a handle to a kernel object. The handle must grant DELETE
access.This function undoes the effects of NtMakePermanentObject
and specifying OBJ_PERMANENT
in OBJECT_ATTRIBUTES
.