#ifndef _NTMMAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
#if (PHNT_VERSION >= PHNT_WINDOWS_10)
NTSYSCALLAPI
NTSTATUS
NTAPI
NtManagePartition(
_In_ HANDLE TargetHandle,
_In_opt_ HANDLE SourceHandle,
_In_ PARTITION_INFORMATION_CLASS PartitionInformationClass,
_Inout_updates_bytes_(PartitionInformationLength) PVOID PartitionInformation,
_In_ ULONG PartitionInformationLength
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwManagePartition(
_In_ HANDLE TargetHandle,
_In_opt_ HANDLE SourceHandle,
_In_ PARTITION_INFORMATION_CLASS PartitionInformationClass,
_Inout_updates_bytes_(PartitionInformationLength) PVOID PartitionInformation,
_In_ ULONG PartitionInformationLength
);
View code on GitHub// wdm.h
__kernel_entry NTSYSCALLAPI NTSTATUS NtManagePartition(
[in] HANDLE TargetHandle,
[in, optional] HANDLE SourceHandle,
[in] PARTITION_INFORMATION_CLASS PartitionInformationClass,
[in, out] PVOID PartitionInformation,
[in] ULONG PartitionInformationLength
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The NtManagePartition function gets and sets information for a partition.
TargetHandle [in]Supplies a handle to a partition.
SourceHandle [in, optional]Optionally supplies a handle to a source partition. This handle is only used for particular information classes.
PartitionInformationClass [in]Supplies the partition object information class which is to be managed.
PartitionInformation [in, out]Supplies a pointer to a buffer which contains the specified information. The format and content of the buffer depends on the partition class.
PartitionInformationLength [in]Supplies the length, in bytes, of the partition information buffer.
Returns an appropriate NTSTATUS value.