#ifndef _NTMMAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* Creates or extends a paging file.
*
* \param PageFileName The NT path of the paging file to create or extend.
* \param MinimumSize A pointer to the minimum size of the paging file, in bytes.
* \param MaximumSize A pointer to the maximum size of the paging file, in bytes.
* \param Priority The paging file priority.
* \return NTSTATUS Successful or errant status.
* \remarks The caller must have the SeCreatePagefilePrivilege privilege.
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreatePagingFile(
_In_ PCUNICODE_STRING PageFileName,
_In_ PLARGE_INTEGER MinimumSize,
_In_ PLARGE_INTEGER MaximumSize,
_In_ ULONG Priority
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreatePagingFile(
_In_ PCUNICODE_STRING PageFileName,
_In_ PLARGE_INTEGER MinimumSize,
_In_ PLARGE_INTEGER MaximumSize,
_In_ ULONG Priority
);
View code on GitHubNo description available.
Function NtCreatePagingFile is typically used by Control Panel's "System" applet for creating new paged files.
System path to newly created paged file.
Minimum size of paged file, in bytes. This value must be multiply of page size (0x1000 bytes on x86), and must be greater then 2MB (0x02000000 bytes).
Maximum size of paged file, in bytes. Also this value must be multiply of page size. Minimal value accepted is 5MB (0x05000000 bytes).
Optional (and currently unused) parameter.
Privilege: SE_CREATE_PAGEFILE_PRIVILEGE