2022-08-10 09:50:49 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
File: AuProcessSectionView.NT.hpp
|
2022-08-10 09:50:49 +00:00
|
|
|
Date: 2022-08-09
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Process
|
|
|
|
{
|
|
|
|
struct ProcessSectionView : IProcessSectionView
|
|
|
|
{
|
2023-06-08 08:52:53 +00:00
|
|
|
bool bPanicOnEx { true }; // SysAssert(this->bPanicOnEx) - it's inverted! true -> dont panic
|
2022-09-30 22:47:18 +00:00
|
|
|
AuThreadPrimitives::SpinLock spinlock;
|
|
|
|
AuList<AuPair<AuUInt, AuUInt>> allocations;
|
|
|
|
|
2023-06-08 08:52:53 +00:00
|
|
|
void DoVanillaDriverlessExtesionWin7Test();
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
AuUInt GetStart() override;
|
|
|
|
|
|
|
|
AuUInt GetEnd() override;
|
|
|
|
|
2022-09-30 22:47:18 +00:00
|
|
|
AuSPtr<IProcessSectionMapView> Allocate(AuUInt uLength) override;
|
2022-08-10 09:50:49 +00:00
|
|
|
|
|
|
|
AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,
|
2022-09-30 22:47:18 +00:00
|
|
|
AuUInt64 uOffset,
|
|
|
|
AuUInt uLength,
|
2022-08-10 09:50:49 +00:00
|
|
|
AuFS::EFileOpenMode mode,
|
|
|
|
AuFS::EFileAdvisoryLockLevel sectionLock) override;
|
|
|
|
|
2023-07-29 08:02:55 +00:00
|
|
|
AuSPtr<IProcessSectionMapView> MapFileByObject(const AuSPtr<IO::IIOHandle> &pIOHandle,
|
2022-09-30 22:47:18 +00:00
|
|
|
AuUInt64 uOffset,
|
|
|
|
AuUInt uLength,
|
2022-08-10 09:50:49 +00:00
|
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
|
|
AuFS::EFileAdvisoryLockLevel processLockLevel) override;
|
|
|
|
|
|
|
|
AuSPtr<IProcessSectionMapView> MapIPCMemory(const AuString &handle,
|
2022-09-30 22:47:18 +00:00
|
|
|
AuUInt64 uOffset,
|
|
|
|
AuUInt uLength,
|
2022-08-10 09:50:49 +00:00
|
|
|
AuFS::EFileOpenMode mode) override;
|
|
|
|
|
2022-09-30 22:47:18 +00:00
|
|
|
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,
|
2023-07-29 08:02:55 +00:00
|
|
|
const AuSPtr<IO::IIOHandle> &pIOHandle,
|
2022-09-30 22:47:18 +00:00
|
|
|
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;
|
2022-08-10 09:50:49 +00:00
|
|
|
};
|
|
|
|
}
|