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

Function KbMapMdl

User-Bridge/API/User-Bridge.cpp:533–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531 }
532
533 BOOL WINAPI KbMapMdl(
534 OUT WdkTypes::PVOID* MappedMemory,
535 OPTIONAL UINT64 SrcProcessId,
536 OPTIONAL UINT64 DestProcessId,
537 WdkTypes::PMDL Mdl,
538 BOOLEAN NeedProbeAndLock,
539 WdkTypes::KPROCESSOR_MODE MapToAddressSpace,
540 ULONG Protect,
541 WdkTypes::MEMORY_CACHING_TYPE CacheType,
542 OPTIONAL WdkTypes::PVOID UserRequestedAddress
543 ) {
544 if (!MappedMemory) return FALSE;
545 KB_MAP_MDL_IN Input = {};
546 KB_MAP_MDL_OUT Output = {};
547 Input.SrcProcessId = SrcProcessId;
548 Input.DestProcessId = DestProcessId;
549 Input.Mdl = Mdl;
550 Input.NeedProbeAndLock = NeedProbeAndLock;
551 Input.MapToAddressSpace = MapToAddressSpace;
552 Input.Protect = Protect;
553 Input.CacheType = CacheType;
554 Input.UserRequestedAddress = UserRequestedAddress;
555 BOOL Status = KbSendRequest(Ctls::KbMapMdl, &Input, sizeof(Input), &Output, sizeof(Output));
556 *MappedMemory = Output.BaseAddress;
557 return Status;
558 }
559
560 BOOL WINAPI KbProtectMappedMemory(IN WdkTypes::PMDL Mdl, ULONG Protect)
561 {

Callers

nothing calls this directly

Calls 1

KbSendRequestFunction · 0.85

Tested by

no test coverage detected