mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
35 lines
583 B
C
35 lines
583 B
C
|
#pragma once
|
||
|
|
||
|
#include <Windows.h>
|
||
|
#include <wdf.h>
|
||
|
#include <IddCx.h>
|
||
|
|
||
|
class CIndirectDeviceContext
|
||
|
{
|
||
|
private:
|
||
|
WDFDEVICE m_wdfDevice;
|
||
|
IDDCX_ADAPTER m_adapter = nullptr;
|
||
|
|
||
|
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);
|