72 lines
3.8 KiB
C++
72 lines
3.8 KiB
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: IProcessSectionView.hpp
|
|
Date: 2022-08-09
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Process
|
|
{
|
|
struct IProcessSectionMapView;
|
|
|
|
struct IProcessSectionView
|
|
{
|
|
virtual AuUInt GetStart() = 0;
|
|
|
|
virtual AuUInt GetEnd() = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> Allocate(AuUInt uLength) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> AllocateEx(AuUInt uLength,
|
|
AuUInt uOffset) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> AllocateEx2(AuUInt uLength,
|
|
AuUInt uOffset,
|
|
PageTable permissions) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> MapFileByPath(const AuString &str,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
Aurora::IO::FS::EFileAdvisoryLockLevel processLockLevel) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> MapFileByPathEx(AuUInt uViewOffset,
|
|
const AuString &str,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
Aurora::IO::FS::EFileAdvisoryLockLevel processLockLevel) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> MapFileByObject(const AuSPtr<IO::IIOHandle> &pIOHandle,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
Aurora::IO::FS::EFileAdvisoryLockLevel processLockLevel) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> MapFileByObjectEx(AuUInt uViewOffset,
|
|
const AuSPtr<IO::IIOHandle> &pIOHandle,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode,
|
|
Aurora::IO::FS::EFileAdvisoryLockLevel processLockLevel) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> MapIPCMemory(const AuString &handleString,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode) = 0;
|
|
|
|
virtual AuSPtr<IProcessSectionMapView> MapIPCMemoryEx(AuUInt uViewOffset,
|
|
const AuString &handleString,
|
|
AuUInt64 uOffset,
|
|
AuUInt uLength,
|
|
Aurora::IO::FS::EFileOpenMode mode) = 0;
|
|
|
|
virtual AuList<AuPair<AuUInt, AuUInt>> GetAllocations() = 0;
|
|
};
|
|
|
|
AUKN_SYM AuSPtr<IProcessSectionView> GetGlobalProcessSpace();
|
|
|
|
AUKN_SYM AuSPtr<IProcessSectionView> ReserveAddressSpace(AuUInt uLength);
|
|
} |