[idd] implement CIVSHMEM and open it

This commit is contained in:
Geoffrey McRae
2023-04-10 05:36:00 +10:00
parent d228ef135e
commit 77ddcfe489
6 changed files with 218 additions and 8 deletions

29
idd/LGIdd/CIVSHMEM.h Normal file
View File

@@ -0,0 +1,29 @@
#pragma once
#include <Windows.h>
#include <SetupAPI.h>
#include <vector>
class CIVSHMEM
{
private:
struct IVSHMEMData
{
SP_DEVINFO_DATA devInfoData;
DWORD64 busAddr;
};
std::vector<struct IVSHMEMData> m_devices;
HANDLE m_handle = INVALID_HANDLE_VALUE;
size_t m_size;
void * m_mem = nullptr;
public:
CIVSHMEM();
~CIVSHMEM();
bool Init();
bool Open();
void Close();
};