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: AuProcessSectionFileMapView.NT.hpp
|
2022-08-10 09:50:49 +00:00
|
|
|
Date: 2022-08-09
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Process
|
|
|
|
{
|
|
|
|
struct ProcessSectionView;
|
|
|
|
|
|
|
|
struct ProcessSectionFileMapView : IProcessSectionMapView
|
|
|
|
{
|
|
|
|
virtual ~ProcessSectionFileMapView();
|
|
|
|
ProcessSectionFileMapView(AuUInt uAddress, HANDLE hFileSection);
|
|
|
|
|
2023-04-17 14:55:51 +00:00
|
|
|
void Unmap() override;
|
2022-08-10 09:50:49 +00:00
|
|
|
|
2024-04-12 12:12:35 +00:00
|
|
|
bool Flush(AuUInt uOffset, AuUInt uLength) override;
|
2022-08-10 09:50:49 +00:00
|
|
|
|
|
|
|
AuUInt GetBaseAddress() override;
|
2024-04-12 12:12:35 +00:00
|
|
|
AuUInt GetAddress(AuUInt uOffset) override;
|
2022-08-10 09:50:49 +00:00
|
|
|
|
|
|
|
AuUInt8 *GetBasePointer() override;
|
2024-04-12 12:12:35 +00:00
|
|
|
AuUInt8 *GetPointer(AuUInt uOffset) override;
|
|
|
|
|
|
|
|
Memory::MemoryViewWrite ToWriteView() override;
|
|
|
|
Memory::MemoryViewRead ToReadView() override;
|
2022-08-10 09:50:49 +00:00
|
|
|
|
2023-04-17 14:55:51 +00:00
|
|
|
bool LockSwap() override;
|
|
|
|
bool UnlockSwap() override;
|
|
|
|
|
2022-09-30 22:47:18 +00:00
|
|
|
ProcessSectionView *pProcessGlobalHint {};
|
|
|
|
AuSPtr<IProcessSectionView> pSharedSectionHint {};
|
|
|
|
AuUInt uOffset {};
|
|
|
|
AuUInt uLength {};
|
|
|
|
|
2022-08-10 09:50:49 +00:00
|
|
|
private:
|
|
|
|
HANDLE hFileSection {};
|
2024-04-12 12:12:35 +00:00
|
|
|
AuUInt uAddress_ {};
|
|
|
|
AuAUInt32 uInUse_ {};
|
|
|
|
AuMutex mutex_;
|
2022-08-10 09:50:49 +00:00
|
|
|
|
|
|
|
bool bIsDead_ {};
|
|
|
|
};
|
|
|
|
}
|