2023-04-09 19:36:00 +00:00
|
|
|
#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;
|
2023-04-10 04:02:47 +00:00
|
|
|
size_t m_size = 0;
|
|
|
|
void * m_mem = nullptr;
|
2023-04-09 19:36:00 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
CIVSHMEM();
|
|
|
|
~CIVSHMEM();
|
|
|
|
|
|
|
|
bool Init();
|
|
|
|
bool Open();
|
|
|
|
void Close();
|
2023-04-10 04:02:47 +00:00
|
|
|
|
|
|
|
size_t GetSize() { return m_size; }
|
|
|
|
void * GetMem () { return m_mem; }
|
2023-04-09 19:36:00 +00:00
|
|
|
};
|
|
|
|
|