Process Hacker Discussion Forum

 
440bx
Member
Posts: 65
Joined: 02 Jul 2021 23:33

NtManagePartition

13 Sep 2021 05:02

NtManagePartition number of parameters declared in ntmmapi.h does not match the number of parameters in the wdm.h defintion.

in wdm.h, the prototype is as follows:
_Must_inspect_result_
__kernel_entry 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
    );


whereas in ntmmapi.h the prototype is :
NTSYSCALLAPI
NTSTATUS
NTAPI
NtManagePartition(
    _In_ MEMORY_PARTITION_INFORMATION_CLASS PartitionInformationClass,
    _In_ PVOID PartitionInformation,
    _In_ ULONG PartitionInformationLength
    );

The wdm.h prototype shows 5 parameters whereas the ntmmapi.h prototype shows only 3. Disassembly shows the function does indeed take 5 parameters.
 
User avatar
dmex
Admin
Posts: 1695
Joined: 17 Jan 2011 05:43

Re: NtManagePartition

19 Oct 2021 21:51

This function was changed in recent Windows 10 patches. The type was already updated (see other post with PR link)