MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / KbMapViewOfSection

Function KbMapViewOfSection

User-Bridge/API/User-Bridge.cpp:1179–1207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1177 }
1178
1179 BOOL WINAPI KbMapViewOfSection(
1180 WdkTypes::HANDLE hSection,
1181 WdkTypes::HANDLE hProcess,
1182 IN OUT WdkTypes::PVOID* BaseAddress,
1183 ULONG CommitSize,
1184 IN OUT OPTIONAL UINT64* SectionOffset,
1185 IN OUT OPTIONAL UINT64* ViewSize,
1186 WdkTypes::SECTION_INHERIT SectionInherit,
1187 ULONG AllocationType,
1188 ULONG Win32Protect
1189 ) {
1190 if (!hSection || !BaseAddress) return FALSE;
1191 KB_MAP_VIEW_OF_SECTION_IN Input = {};
1192 KB_MAP_VIEW_OF_SECTION_OUT Output = {};
1193 Input.hSection = hSection;
1194 Input.hProcess = hProcess;
1195 Input.BaseAddress = *BaseAddress;
1196 Input.CommitSize = CommitSize;
1197 Input.SectionOffset = SectionOffset ? *SectionOffset : 0;
1198 Input.ViewSize = ViewSize ? *ViewSize : 0;
1199 Input.SectionInherit = SectionInherit;
1200 Input.AllocationType = AllocationType;
1201 Input.Win32Protect = Win32Protect;
1202 BOOL Status = KbSendRequest(Ctls::KbMapViewOfSection, &Input, sizeof(Input), &Output, sizeof(Output));
1203 *BaseAddress = Output.BaseAddress;
1204 if (SectionOffset) *SectionOffset = Output.SectionOffset;
1205 if (ViewSize) *ViewSize = Output.ViewSize;
1206 return Status;
1207 }
1208
1209 BOOL WINAPI KbUnmapViewOfSection(
1210 WdkTypes::HANDLE hProcess,

Callers

nothing calls this directly

Calls 1

KbSendRequestFunction · 0.85

Tested by

no test coverage detected