MCPcopy Create free account
hub / github.com/changeofpace/Self-Remapping-Code / NtCreateSection

Method NtCreateSection

Self-Remapping Code/ntapi.cpp:8–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6// Section Objects
7
8ntapi::NTSTATUS
9NTAPI
10ntapi::NtCreateSection(
11 _Out_ PHANDLE SectionHandle,
12 _In_ ACCESS_MASK DesiredAccess,
13 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
14 _In_opt_ PLARGE_INTEGER MaximumSize,
15 _In_ ULONG SectionPageProtection,
16 _In_ ULONG AllocationAttributes,
17 _In_opt_ HANDLE FileHandle)
18{
19 typedef NTSTATUS(NTAPI* NtCreateSection_t)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PLARGE_INTEGER, ULONG, ULONG, HANDLE);
20 static NtCreateSection_t Fn = NtCreateSection_t(GetProcAddress(hmNtdll, "NtCreateSection"));
21 if (Fn)
22 return Fn(SectionHandle, DesiredAccess, ObjectAttributes, MaximumSize, SectionPageProtection, AllocationAttributes, FileHandle);
23 SetLastError(ERROR_PROC_NOT_FOUND);
24 return STATUS_PROCEDURE_NOT_FOUND;
25}
26
27ntapi::NTSTATUS
28NTAPI

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected