> For the complete documentation index, see [llms.txt](https://www.pinvoke.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pinvoke.dev/ntdll/ntmapviewofsection.md).

# NtMapViewOfSection

```csharp
[DllImport("ntdll.dll", ExactSpelling = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe NTSTATUS NtMapViewOfSection(
    HANDLE SectionHandle,
    HANDLE ProcessHandle,
    void* BaseAddress,
    nuint ZeroBits,
    nuint CommitSize,
    [Optional] long* SectionOffset,
    nuint* ViewSize,
    SECTION_INHERIT InheritDisposition,
    uint AllocationType,
    uint Win32Protect);
```

[SECTION\_INHERIT](/wdk/section_inherit.md)

[VIRTUAL\_ALLOCATION\_TYPE](/memory/virtual_allocation_type.md)

[PAGE\_PROTECTION\_FLAGS](/memory/page_protection_flags.md)
