34 lines
820 B
C++
34 lines
820 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuIPCMemory.NT.hpp
|
|
Date: 2022-4-15
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include <Source/IO/IPC/IPC.hpp>
|
|
#include <Source/IO/IPC/AuIPCHandle.hpp>
|
|
|
|
namespace Aurora::IO::IPC
|
|
{
|
|
struct IPCSharedMemoryImpl : IPCSharedMemory
|
|
{
|
|
IPCSharedMemoryImpl(HANDLE handle,
|
|
void *pBase,
|
|
const IPC::IPCHandle &ipcHandle);
|
|
~IPCSharedMemoryImpl();
|
|
|
|
virtual Memory::MemoryViewWrite GetMemory() override;
|
|
virtual AuUInt GetLength() override;
|
|
|
|
virtual AuString ExportToString() override;
|
|
|
|
private:
|
|
IPC::IPCHandle ipcHandle_;
|
|
HANDLE handle_ {};
|
|
void *pBase_ {};
|
|
AuUInt uLen_ {};
|
|
bool bOwns_;
|
|
};
|
|
} |