@@ -79,6 +79,10 @@ EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES2 VirtualDisplayDriverEvtIddCxMonitorQueryT
7979EVT_IDD_CX_ADAPTER_COMMIT_MODES2 VirtualDisplayDriverEvtIddCxAdapterCommitModes2;
8080
8181EVT_IDD_CX_MONITOR_SET_GAMMA_RAMP VirtualDisplayDriverEvtIddCxMonitorSetGammaRamp;
82+ EVT_IDD_CX_DEVICE_IO_CONTROL MttVddEvtIoDeviceControl;
83+
84+ // Forward declaration for IOCTL queue setup function
85+ NTSTATUS SetupIoctlQueue (WDFDEVICE Device);
8286
8387struct
8488{
@@ -152,16 +156,7 @@ const char* XorCursorSupportLevelToString(IDDCX_XOR_CURSOR_SUPPORT level) {
152156
153157vector<unsigned char > Microsoft::IndirectDisp::IndirectDeviceContext::s_KnownMonitorEdid; // Changed to support static vector
154158
155- struct IndirectDeviceContextWrapper
156- {
157- IndirectDeviceContext* pContext;
158159
159- void Cleanup ()
160- {
161- delete pContext;
162- pContext = nullptr ;
163- }
164- };
165160void LogQueries (const char * severity, const std::wstring& xmlName) {
166161 if (xmlName.find (L" logging" ) == std::wstring::npos) {
167162 int size_needed = WideCharToMultiByte (CP_UTF8, 0 , xmlName.c_str (), (int )xmlName.size (), NULL , 0 , NULL , NULL );
@@ -634,10 +629,6 @@ void InitializeD3DDeviceAndLogGPU() {
634629 vddlog (" i" , logtext.c_str ());
635630}
636631
637-
638- // This macro creates the methods for accessing an IndirectDeviceContextWrapper as a context for a WDF object
639- WDF_DECLARE_CONTEXT_TYPE (IndirectDeviceContextWrapper);
640-
641632extern " C" BOOL WINAPI DllMain (
642633 _In_ HINSTANCE hInstance,
643634 _In_ UINT dwReason,
@@ -1783,6 +1774,9 @@ NTSTATUS VirtualDisplayDriverDeviceAdd(WDFDRIVER Driver, PWDFDEVICE_INIT pDevice
17831774 IddConfig.EvtIddCxMonitorAssignSwapChain = VirtualDisplayDriverMonitorAssignSwapChain;
17841775 IddConfig.EvtIddCxMonitorUnassignSwapChain = VirtualDisplayDriverMonitorUnassignSwapChain;
17851776
1777+ // Enable IOCTL handling
1778+ IddConfig.EvtIddCxDeviceIoControl = MttVddEvtIoDeviceControl;
1779+
17861780 if (IDD_IS_FIELD_AVAILABLE (IDD_CX_CLIENT_CONFIG, EvtIddCxAdapterQueryTargetInfo))
17871781 {
17881782 IddConfig.EvtIddCxAdapterQueryTargetInfo = VirtualDisplayDriverEvtIddCxAdapterQueryTargetInfo;
0 commit comments