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

Method NtMapViewOfSection

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

Source from the content-addressed store, hash-verified

25}
26
27ntapi::NTSTATUS
28NTAPI
29ntapi::NtMapViewOfSection(
30 _In_ HANDLE SectionHandle,
31 _In_ HANDLE ProcessHandle,
32 _Inout_ PVOID *BaseAddress,
33 _In_ ULONG_PTR ZeroBits,
34 _In_ SIZE_T CommitSize,
35 _Inout_opt_ PLARGE_INTEGER SectionOffset,
36 _Inout_ PSIZE_T ViewSize,
37 _In_ SECTION_INHERIT InheritDisposition,
38 _In_ ULONG AllocationType,
39 _In_ ULONG Win32Protect)
40{
41 typedef NTSTATUS(NTAPI* NtMapViewOfSection_t)(HANDLE, HANDLE, PVOID*, ULONG_PTR, SIZE_T, PLARGE_INTEGER, PSIZE_T, SECTION_INHERIT, ULONG, ULONG);
42 static NtMapViewOfSection_t Fn = NtMapViewOfSection_t(GetProcAddress(hmNtdll, "NtMapViewOfSection"));
43 if (Fn)
44 return Fn(SectionHandle, ProcessHandle, BaseAddress, ZeroBits, CommitSize, SectionOffset, ViewSize, InheritDisposition, AllocationType, Win32Protect);
45 SetLastError(ERROR_PROC_NOT_FOUND);
46 return STATUS_PROCEDURE_NOT_FOUND;
47}
48
49ntapi::NTSTATUS
50NTAPI

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected