pBuffer = ExAllocatePoolWithTag(PagedPool, PAGE_SIZE, 0);
pMdl = IoAllocateMdl(pBuffer, PAGE_SIZE, FALSE, FALSE, NULL);
MmBuildMdlForNonPagedPool(pMdl);
pMappedFileName = (PUNICODE_STRING) MmMapLockedPagesSpecifyCache(pMdl, UserMode, MmCached, NULL, FALSE, NormalPagePriority);
ntStatus = ZWQueryVirtualMemory(ProcessHandle, BaseAddress, MemoryMappedFilenameInformation, pMappedFileName, PAGE_SIZE, &ReturnSize);
it should work ???
pMdl = IoAllocateMdl(pBuffer, PAGE_SIZE, FALSE, FALSE, NULL);
MmBuildMdlForNonPagedPool(pMdl);
pMappedFileName = (PUNICODE_STRING) MmMapLockedPagesSpecifyCache(pMdl, UserMode, MmCached, NULL, FALSE, NormalPagePriority);
ntStatus = ZWQueryVirtualMemory(ProcessHandle, BaseAddress, MemoryMappedFilenameInformation, pMappedFileName, PAGE_SIZE, &ReturnSize);
it should work ???