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

Function KbCreateSection

User-Bridge/API/User-Bridge.cpp:1137–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135namespace Sections
1136{
1137 BOOL WINAPI KbCreateSection(
1138 OUT WdkTypes::HANDLE* hSection,
1139 OPTIONAL LPCWSTR Name,
1140 UINT64 MaximumSize,
1141 ACCESS_MASK DesiredAccess,
1142 ULONG SecObjFlags, // OBJ_***
1143 ULONG SecPageProtection,
1144 ULONG AllocationAttributes,
1145 OPTIONAL WdkTypes::HANDLE hFile
1146 ) {
1147 if (!hSection) return FALSE;
1148 KB_CREATE_SECTION_IN Input = {};
1149 KB_CREATE_OPEN_SECTION_OUT Output = {};
1150 Input.Name = reinterpret_cast<WdkTypes::LPCWSTR>(Name);
1151 Input.MaximumSize = MaximumSize;
1152 Input.DesiredAccess = DesiredAccess;
1153 Input.SecObjFlags = SecObjFlags;
1154 Input.SecPageProtection = SecPageProtection;
1155 Input.AllocationAttributes = AllocationAttributes;
1156 Input.hFile = hFile;
1157 BOOL Status = KbSendRequest(Ctls::KbCreateSection, &Input, sizeof(Input), &Output, sizeof(Output));
1158 *hSection = Output.hSection;
1159 return Status;
1160 }
1161
1162 BOOL WINAPI KbOpenSection(
1163 OUT WdkTypes::HANDLE* hSection,

Callers

nothing calls this directly

Calls 1

KbSendRequestFunction · 0.85

Tested by

no test coverage detected