MCPcopy Create free account
hub / github.com/crosire/reshade / QueryInterface

Method QueryInterface

source/d3d9/d3d9_device.cpp:133–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133HRESULT STDMETHODCALLTYPE Direct3DDevice9::QueryInterface(REFIID riid, void **ppvObj)
134{
135 if (ppvObj == nullptr)
136 return E_POINTER;
137
138 if (check_and_upgrade_interface(riid))
139 {
140 AddRef();
141 *ppvObj = this;
142 return S_OK;
143 }
144
145 // Interface ID to query the original object from a proxy object
146 if (riid == IID_UnwrappedObject)
147 {
148 _orig->AddRef();
149 *ppvObj = _orig;
150 return S_OK;
151 }
152
153 if (riid == __uuidof(IDirect3DDevice9On12))
154 {
155 if (_d3d9on12_device != nullptr)
156 return _d3d9on12_device->QueryInterface(riid, ppvObj);
157 }
158
159 // Unimplemented interfaces:
160 // IDirect3DDevice9Video {26DC4561-A1EE-4ae7-96DA-118A36C0EC95}
161
162 return _orig->QueryInterface(riid, ppvObj);
163}
164ULONG STDMETHODCALLTYPE Direct3DDevice9::AddRef()
165{
166 _orig->AddRef();

Callers 15

WinMainFunction · 0.45
on_vr_submit_d3d11Function · 0.45
on_vr_submit_d3d12Function · 0.45
d2d1.cppFile · 0.45
D2D1CreateFactoryFunction · 0.45
StretchRectMethod · 0.45
SetRenderTargetMethod · 0.45
get_propertyMethod · 0.45

Calls 1

AddRefMethod · 0.45

Tested by 1

WinMainFunction · 0.36