#ifndef _NTOBAPI_H
//
// Objects, handles
//
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtSetInformationObject routine changes various kinds of information about a object.
*
* @param Handle The handle of the object for which information is being changed.
* @param ObjectInformationClass The type of information, supplied in the buffer pointed to by ObjectInformation, to set for the object.
* @param ObjectInformation Pointer to a buffer that contains the information to set for the object.
* @param ObjectInformationLength The size of the buffer pointed to by the ObjectInformation parameter, in bytes.
* @return NTSTATUS Successful or errant status.
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationObject(
_In_ HANDLE Handle,
_In_ OBJECT_INFORMATION_CLASS ObjectInformationClass,
_In_reads_bytes_(ObjectInformationLength) PVOID ObjectInformation,
_In_ ULONG ObjectInformationLength
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetInformationObject(
_In_ HANDLE Handle,
_In_ OBJECT_INFORMATION_CLASS ObjectInformationClass,
_In_reads_bytes_(ObjectInformationLength) PVOID ObjectInformation,
_In_ ULONG ObjectInformationLength
);
View code on GitHub
Adjusts various information common to all types of kernel handles.
Handle
- a handle to set information on. The handle does not need to grant any specific access.ObjectInformationClass
- the type of information to set.ObjectInformation
- a pointer to the buffer with the data specific to the request.ObjectInformationLength
- the size of the provided buffer in bytes.For the list of supported information classes, see OBJECT_INFORMATION_CLASS
.