2 * IDirect3DVolume9 implementation
4 * Copyright 2002-2003 Jason Edmeades
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
32 #include "wine/debug.h"
34 #include "d3d9_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
38 /* IDirect3DVolume9 IUnknown parts follow: */
39 HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(LPDIRECT3DVOLUME9 iface, REFIID riid, LPVOID* ppobj) {
40 ICOM_THIS(IDirect3DVolume9Impl,iface);
42 if (IsEqualGUID(riid, &IID_IUnknown)
43 || IsEqualGUID(riid, &IID_IDirect3DVolume9)) {
44 IDirect3DVolume9Impl_AddRef(iface);
49 WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
53 ULONG WINAPI IDirect3DVolume9Impl_AddRef(LPDIRECT3DVOLUME9 iface) {
54 ICOM_THIS(IDirect3DVolume9Impl,iface);
55 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
59 ULONG WINAPI IDirect3DVolume9Impl_Release(LPDIRECT3DVOLUME9 iface) {
60 ICOM_THIS(IDirect3DVolume9Impl,iface);
61 ULONG ref = --This->ref;
62 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
64 HeapFree(GetProcessHeap(), 0, This->allocatedMemory);
65 HeapFree(GetProcessHeap(), 0, This);
70 /* IDirect3DVolume9 Interface follow: */
71 HRESULT WINAPI IDirect3DVolume9Impl_GetDevice(LPDIRECT3DVOLUME9 iface, IDirect3DDevice9** ppDevice) {
72 ICOM_THIS(IDirect3DVolume9Impl,iface);
73 TRACE("(%p) : returning %p\n", This, This->Device);
74 *ppDevice = (LPDIRECT3DDEVICE9) This->Device;
76 /* Note Calling this method will increase the internal reference count
77 on the IDirect3DDevice9 interface. */
78 IDirect3DDevice9Impl_AddRef(*ppDevice);
83 HRESULT WINAPI IDirect3DVolume9Impl_SetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
84 ICOM_THIS(IDirect3DVolume9Impl,iface);
85 FIXME("(%p) : stub\n", This);
89 HRESULT WINAPI IDirect3DVolume9Impl_GetPrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
90 ICOM_THIS(IDirect3DVolume9Impl,iface);
91 FIXME("(%p) : stub\n", This);
95 HRESULT WINAPI IDirect3DVolume9Impl_FreePrivateData(LPDIRECT3DVOLUME9 iface, REFGUID refguid) {
96 ICOM_THIS(IDirect3DVolume9Impl,iface);
97 FIXME("(%p) : stub\n", This);
101 HRESULT WINAPI IDirect3DVolume9Impl_GetContainer(LPDIRECT3DVOLUME9 iface, REFIID riid, void** ppContainer) {
102 ICOM_THIS(IDirect3DVolume9Impl,iface);
103 TRACE("(%p) : returning %p\n", This, This->Container);
104 *ppContainer = This->Container;
105 IUnknown_AddRef(This->Container);
109 HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_DESC* pDesc) {
110 ICOM_THIS(IDirect3DVolume9Impl,iface);
111 TRACE("(%p) : copying into %p\n", This, pDesc);
112 memcpy(pDesc, &This->myDesc, sizeof(D3DVOLUME_DESC));
116 HRESULT WINAPI IDirect3DVolume9Impl_LockBox(LPDIRECT3DVOLUME9 iface, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
117 ICOM_THIS(IDirect3DVolume9Impl,iface);
118 FIXME("(%p) : stub\n", This);
122 HRESULT WINAPI IDirect3DVolume9Impl_UnlockBox(LPDIRECT3DVOLUME9 iface) {
123 ICOM_THIS(IDirect3DVolume9Impl,iface);
124 FIXME("(%p) : stub\n", This);
129 ICOM_VTABLE(IDirect3DVolume9) Direct3DVolume9_Vtbl =
131 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
132 IDirect3DVolume9Impl_QueryInterface,
133 IDirect3DVolume9Impl_AddRef,
134 IDirect3DVolume9Impl_Release,
135 IDirect3DVolume9Impl_GetDevice,
136 IDirect3DVolume9Impl_SetPrivateData,
137 IDirect3DVolume9Impl_GetPrivateData,
138 IDirect3DVolume9Impl_FreePrivateData,
139 IDirect3DVolume9Impl_GetContainer,
140 IDirect3DVolume9Impl_GetDesc,
141 IDirect3DVolume9Impl_LockBox,
142 IDirect3DVolume9Impl_UnlockBox