70 lines
3.5 KiB
C++
70 lines
3.5 KiB
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuProcessSectionView.NT.hpp
|
|
Date: 2022-08-09
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Process
|
|
{
|
|
struct ProcessSectionView : IProcessSectionView
|
|
{
|
|
bool bPanicOnEx { true }; // SysAssert(this->bPanicOnEx) - it's inverted! true -> dont panic
|
|
AuThreadPrimitives::SpinLock spinlock;
|
|
AuList<AuPair<AuUInt, AuUInt>> allocations;
|
|
|
|
void DoVanillaDriverlessExtesionWin7Test();
|
|
|
|
AuUInt GetStart() override;
|
|
|
|
AuUInt GetEnd() override;
|
|
|
|
AuSPtr<IProcessSectionMapView> Allocate(AuUInt uLength) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
AuFS::EFileOpenMode mode,
|
|
AuFS::EFileAdvisoryLockLevel sectionLock) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> MapFileByObject(const AuSPtr<IO::IIOHandle> &pIOHandle,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
AuFS::EFileAdvisoryLockLevel processLockLevel) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> MapIPCMemory(const AuString &handle,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
AuFS::EFileOpenMode mode) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> AllocateEx(AuUInt uLength, AuUInt uOffset) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> AllocateEx2(AuUInt uLength, AuUInt uOffset, PageTable permissions) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> MapFileByPathEx(AuUInt viewOffset,
|
|
const AuString &str,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
Aurora::IO::FS::EFileAdvisoryLockLevel processLockLevel) override;
|
|
|
|
AuSPtr<IProcessSectionMapView> MapFileByObjectEx(AuUInt viewOffset,
|
|
const AuSPtr<IO::IIOHandle> &pIOHandle,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
Aurora::IO::FS::EFileAdvisoryLockLevel processLockLevel) override;
|
|
|
|
|
|
AuSPtr<IProcessSectionMapView> MapIPCMemoryEx(AuUInt viewOffset,
|
|
const AuString &handle,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode) override;
|
|
|
|
AuList<AuPair<AuUInt, AuUInt>> GetAllocations() override;
|
|
};
|
|
} |