LookingGlass/idd/LGIdd/CIndirectDeviceContext.h

37 lines
632 B
C
Raw Normal View History

#pragma once
#include <Windows.h>
#include <wdf.h>
#include <IddCx.h>
2023-04-09 19:36:00 +00:00
#include "CIVSHMEM.h"
class CIndirectDeviceContext
{
private:
WDFDEVICE m_wdfDevice;
IDDCX_ADAPTER m_adapter = nullptr;
2023-04-09 19:36:00 +00:00
CIVSHMEM m_ivshmem;
public:
CIndirectDeviceContext(_In_ WDFDEVICE wdfDevice) :
m_wdfDevice(wdfDevice) {};
virtual ~CIndirectDeviceContext() {};
void InitAdapter();
void FinishInit(UINT connectorIndex);
};
struct CIndirectDeviceContextWrapper
{
CIndirectDeviceContext* context;
void Cleanup()
{
delete context;
context = nullptr;
}
};
WDF_DECLARE_CONTEXT_TYPE(CIndirectDeviceContextWrapper);