| 89 | } |
| 90 | |
| 91 | HRESULT STDMETHODCALLTYPE D3D11DeviceContext::QueryInterface(REFIID riid, void **ppvObj) |
| 92 | { |
| 93 | if (ppvObj == nullptr) |
| 94 | return E_POINTER; |
| 95 | |
| 96 | if (check_and_upgrade_interface(riid)) |
| 97 | { |
| 98 | AddRef(); |
| 99 | *ppvObj = this; |
| 100 | return S_OK; |
| 101 | } |
| 102 | |
| 103 | // Interface ID to query the original object from a proxy object |
| 104 | if (riid == IID_UnwrappedObject) |
| 105 | { |
| 106 | _orig->AddRef(); |
| 107 | *ppvObj = _orig; |
| 108 | return S_OK; |
| 109 | } |
| 110 | |
| 111 | // Unimplemented interfaces: |
| 112 | // ID3D11VideoContext {61F21C45-3C0E-4a74-9CEA-67100D9AD5E4} |
| 113 | // ID3D11VideoContext1 {A7F026DA-A5F8-4487-A564-15E34357651E} |
| 114 | // ID3D11VideoContext2 {C4E7374C-6243-4D1B-AE87-52B4F740E261} |
| 115 | // ID3D11VideoContext3 {A9E2FAA0-CB39-418F-A0B7-D8AAD4DE672E} |
| 116 | |
| 117 | return _orig->QueryInterface(riid, ppvObj); |
| 118 | } |
| 119 | ULONG STDMETHODCALLTYPE D3D11DeviceContext::AddRef() |
| 120 | { |
| 121 | // The immediate device context is tightly coupled with its device, so simply use the device reference count |
no test coverage detected