af062818b47340eef15700d2f0211576ba3506eevboxsync * IDirect3DQuery9 implementation
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright 2002-2003 Raphael Junqueira
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright 2002-2003 Jason Edmeades
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright 2005 Oliver Stieber
af062818b47340eef15700d2f0211576ba3506eevboxsync * This library is free software; you can redistribute it and/or
af062818b47340eef15700d2f0211576ba3506eevboxsync * modify it under the terms of the GNU Lesser General Public
af062818b47340eef15700d2f0211576ba3506eevboxsync * License as published by the Free Software Foundation; either
af062818b47340eef15700d2f0211576ba3506eevboxsync * version 2.1 of the License, or (at your option) any later version.
af062818b47340eef15700d2f0211576ba3506eevboxsync * This library is distributed in the hope that it will be useful,
af062818b47340eef15700d2f0211576ba3506eevboxsync * but WITHOUT ANY WARRANTY; without even the implied warranty of
af062818b47340eef15700d2f0211576ba3506eevboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * Lesser General Public License for more details.
af062818b47340eef15700d2f0211576ba3506eevboxsync * You should have received a copy of the GNU Lesser General Public
af062818b47340eef15700d2f0211576ba3506eevboxsync * License along with this library; if not, write to the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * a choice of LGPL license versions is made available with the language indicating
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * that LGPLv2 or any later version may be used, or where a choice of which version
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * of the LGPL is applied is otherwise unspecified.
af062818b47340eef15700d2f0211576ba3506eevboxsync/* IDirect3DQuery9 IUnknown parts follow: */
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(LPDIRECT3DQUERY9 iface, REFIID riid, LPVOID* ppobj) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
5112e32d7072e280613921c982a6672f2c859cf3vboxsync TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj);
af062818b47340eef15700d2f0211576ba3506eevboxsync WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic ULONG WINAPI IDirect3DQuery9Impl_AddRef(LPDIRECT3DQUERY9 iface) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
5112e32d7072e280613921c982a6672f2c859cf3vboxsync TRACE("%p increasing refcount to %u.\n", iface, ref);
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic ULONG WINAPI IDirect3DQuery9Impl_Release(LPDIRECT3DQUERY9 iface) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
5112e32d7072e280613921c982a6672f2c859cf3vboxsync TRACE("%p decreasing refcount to %u.\n", iface, ref);
af062818b47340eef15700d2f0211576ba3506eevboxsync if (ref == 0) {
af062818b47340eef15700d2f0211576ba3506eevboxsync/* IDirect3DQuery9 Interface follow: */
5112e32d7072e280613921c982a6672f2c859cf3vboxsyncstatic HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface, IDirect3DDevice9 **device)
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(LPDIRECT3DQUERY9 iface) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic DWORD WINAPI IDirect3DQuery9Impl_GetDataSize(LPDIRECT3DQUERY9 iface) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
af062818b47340eef15700d2f0211576ba3506eevboxsync ret = IWineD3DQuery_GetDataSize(This->wineD3DQuery);
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic HRESULT WINAPI IDirect3DQuery9Impl_Issue(LPDIRECT3DQUERY9 iface, DWORD dwIssueFlags) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
5112e32d7072e280613921c982a6672f2c859cf3vboxsync TRACE("iface %p, flags %#x.\n", iface, dwIssueFlags);
af062818b47340eef15700d2f0211576ba3506eevboxsync hr = IWineD3DQuery_Issue(This->wineD3DQuery, dwIssueFlags);
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic HRESULT WINAPI IDirect3DQuery9Impl_GetData(LPDIRECT3DQUERY9 iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
af062818b47340eef15700d2f0211576ba3506eevboxsync IDirect3DQuery9Impl *This = (IDirect3DQuery9Impl *)iface;
af062818b47340eef15700d2f0211576ba3506eevboxsync hr = IWineD3DQuery_GetData(This->wineD3DQuery, pData, dwSize, dwGetDataFlags);
af062818b47340eef15700d2f0211576ba3506eevboxsyncstatic const IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl =
ee6bcfc59fe3b0230aad85e2ef63d0402b7719b2vboxsyncHRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3DQUERYTYPE type)
ee6bcfc59fe3b0230aad85e2ef63d0402b7719b2vboxsync hr = IWineD3DDevice_CreateQuery(device->WineD3DDevice, type, &query->wineD3DQuery, (IUnknown *)query);
ee6bcfc59fe3b0230aad85e2ef63d0402b7719b2vboxsync WARN("Failed to create wined3d query, hr %#x.\n", hr);