2 * Implementation of DirectX File Interfaces
4 * Copyright 2004 Christian Costa
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "wine/debug.h"
30 #include "d3dxof_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
35 static struct ICOM_VTABLE(IDirectXFile) IDirectXFile_Vtbl;
36 static struct ICOM_VTABLE(IDirectXFileBinary) IDirectXFileBinary_Vtbl;
37 static struct ICOM_VTABLE(IDirectXFileData) IDirectXFileData_Vtbl;
38 static struct ICOM_VTABLE(IDirectXFileDataReference) IDirectXFileDataReference_Vtbl;
39 static struct ICOM_VTABLE(IDirectXFileEnumObject) IDirectXFileEnumObject_Vtbl;
40 static struct ICOM_VTABLE(IDirectXFileObject) IDirectXFileObject_Vtbl;
41 static struct ICOM_VTABLE(IDirectXFileSaveObject) IDirectXFileSaveObject_Vtbl;
43 HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj)
45 IDirectXFileImpl* object;
47 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
49 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl));
51 object->lpVtbl.lpVtbl = &IDirectXFile_Vtbl;
59 /*** IUnknown methods ***/
60 static HRESULT WINAPI IDirectXFileImpl_QueryInterface(IDirectXFile* iface, REFIID riid, void** ppvObject)
62 ICOM_THIS(IDirectXFileImpl, iface);
64 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
66 if (IsEqualGUID(riid, &IID_IUnknown)
67 || IsEqualGUID(riid, &IID_IDirectXFile))
69 IClassFactory_AddRef(iface);
74 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
78 static ULONG WINAPI IDirectXFileImpl_AddRef(IDirectXFile* iface)
80 ICOM_THIS(IDirectXFileImpl, iface);
82 TRACE("(%p/%p)\n", iface, This);
88 static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile* iface)
90 ICOM_THIS(IDirectXFileImpl, iface);
92 TRACE("(%p/%p)\n", iface, This);
95 HeapFree(GetProcessHeap(), 0, This);
100 /*** IDirectXFile methods ***/
101 static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT* ppEnumObj)
104 ICOM_THIS(IDirectXFileImpl, iface);
105 IDirectXFileEnumObjectImpl* object;
107 FIXME("(%p/%p)->(%p,%lx,%p) stub!\n", This, iface, pvSource, dwLoadOptions, ppEnumObj);
109 if (dwLoadOptions == 0)
111 FIXME("Source is a file '%s'\n", (char*)pvSource);
114 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl));
116 object->lpVtbl.lpVtbl = &IDirectXFileEnumObject_Vtbl;
119 *ppEnumObj = (LPDIRECTXFILEENUMOBJECT)object;
124 static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject(IDirectXFile* iface, LPCSTR szFileName, DXFILEFORMAT dwFileFormat, LPDIRECTXFILESAVEOBJECT* ppSaveObj)
126 ICOM_THIS(IDirectXFileImpl, iface);
128 FIXME("(%p/%p)->(%s,%lx,%p) stub!\n", This, iface, szFileName, dwFileFormat, ppSaveObj);
133 static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LPVOID pvData, DWORD cbSize)
135 ICOM_THIS(IDirectXFileImpl, iface);
137 FIXME("(%p/%p)->(%p,%ld) stub!\n", This, iface, pvData, cbSize);
142 static ICOM_VTABLE(IDirectXFile) IDirectXFile_Vtbl =
144 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
145 IDirectXFileImpl_QueryInterface,
146 IDirectXFileImpl_AddRef,
147 IDirectXFileImpl_Release,
148 IDirectXFileImpl_CreateEnumObject,
149 IDirectXFileImpl_CreateSaveObject,
150 IDirectXFileImpl_RegisterTemplates
153 HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj)
155 IDirectXFileBinaryImpl* object;
157 TRACE("(%p)\n", ppObj);
159 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl));
161 object->lpVtbl.lpVtbl = &IDirectXFileBinary_Vtbl;
169 /*** IUnknown methods ***/
170 static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface(IDirectXFileBinary* iface, REFIID riid, void** ppvObject)
172 ICOM_THIS(IDirectXFileBinaryImpl, iface);
174 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
176 if (IsEqualGUID(riid, &IID_IUnknown)
177 || IsEqualGUID(riid, &IID_IDirectXFileObject)
178 || IsEqualGUID(riid, &IID_IDirectXFileBinary))
180 IClassFactory_AddRef(iface);
185 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
186 return E_NOINTERFACE;
189 static ULONG WINAPI IDirectXFileBinaryImpl_AddRef(IDirectXFileBinary* iface)
191 ICOM_THIS(IDirectXFileBinaryImpl, iface);
193 TRACE("(%p/%p)\n", iface, This);
199 static ULONG WINAPI IDirectXFileBinaryImpl_Release(IDirectXFileBinary* iface)
201 ICOM_THIS(IDirectXFileBinaryImpl, iface);
203 TRACE("(%p/%p)\n", iface, This);
206 HeapFree(GetProcessHeap(), 0, This);
211 /*** IDirectXFileObject methods ***/
212 static HRESULT WINAPI IDirectXFileBinaryImpl_GetName(IDirectXFileBinary* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
215 ICOM_THIS(IDirectXFileBinaryImpl, iface);
217 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
222 static HRESULT WINAPI IDirectXFileBinaryImpl_GetId(IDirectXFileBinary* iface, LPGUID pGuid)
224 ICOM_THIS(IDirectXFileBinaryImpl, iface);
226 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
231 /*** IDirectXFileBinary methods ***/
232 static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize(IDirectXFileBinary* iface, DWORD* pcbSize)
234 ICOM_THIS(IDirectXFileBinaryImpl, iface);
236 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pcbSize);
241 static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType(IDirectXFileBinary* iface, LPCSTR* pszMimeType)
243 ICOM_THIS(IDirectXFileBinaryImpl, iface);
245 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pszMimeType);
250 static HRESULT WINAPI IDirectXFileBinaryImpl_Read(IDirectXFileBinary* iface, LPVOID pvData, DWORD cbSize, LPDWORD pcbRead)
252 ICOM_THIS(IDirectXFileBinaryImpl, iface);
254 FIXME("(%p/%p)->(%p, %ld, %p) stub!\n", This, iface, pvData, cbSize, pcbRead);
259 static ICOM_VTABLE(IDirectXFileBinary) IDirectXFileBinary_Vtbl =
261 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
262 IDirectXFileBinaryImpl_QueryInterface,
263 IDirectXFileBinaryImpl_AddRef,
264 IDirectXFileBinaryImpl_Release,
265 IDirectXFileBinaryImpl_GetName,
266 IDirectXFileBinaryImpl_GetId,
267 IDirectXFileBinaryImpl_GetSize,
268 IDirectXFileBinaryImpl_GetMimeType,
269 IDirectXFileBinaryImpl_Read
272 HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj)
274 IDirectXFileDataImpl* object;
276 TRACE("(%p)\n", ppObj);
278 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl));
280 object->lpVtbl.lpVtbl = &IDirectXFileData_Vtbl;
288 /*** IUnknown methods ***/
289 static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface(IDirectXFileData* iface, REFIID riid, void** ppvObject)
291 ICOM_THIS(IDirectXFileDataImpl, iface);
293 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
295 if (IsEqualGUID(riid, &IID_IUnknown)
296 || IsEqualGUID(riid, &IID_IDirectXFileObject)
297 || IsEqualGUID(riid, &IID_IDirectXFileData))
299 IClassFactory_AddRef(iface);
304 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
305 return E_NOINTERFACE;
308 static ULONG WINAPI IDirectXFileDataImpl_AddRef(IDirectXFileData* iface)
310 ICOM_THIS(IDirectXFileDataImpl, iface);
312 TRACE("(%p/%p)\n", iface, This);
318 static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData* iface)
320 ICOM_THIS(IDirectXFileDataImpl, iface);
322 TRACE("(%p/%p)\n", iface, This);
325 HeapFree(GetProcessHeap(), 0, This);
330 /*** IDirectXFileObject methods ***/
331 static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
334 ICOM_THIS(IDirectXFileDataImpl, iface);
336 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
341 static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID pGuid)
343 ICOM_THIS(IDirectXFileDataImpl, iface);
345 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
350 /*** IDirectXFileData methods ***/
351 static HRESULT WINAPI IDirectXFileDataImpl_GetData(IDirectXFileData* iface, LPCSTR szMember, DWORD* pcbSize, void** ppvData)
353 ICOM_THIS(IDirectXFileDataImpl, iface);
355 FIXME("(%p/%p)->(%s,%p,%p) stub!\n", This, iface, szMember, pcbSize, ppvData);
360 static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, const GUID** pguid)
362 ICOM_THIS(IDirectXFileDataImpl, iface);
364 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pguid);
369 static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData* iface, LPDIRECTXFILEOBJECT* ppChildObj)
371 ICOM_THIS(IDirectXFileDataImpl, iface);
373 FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppChildObj);
378 static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData* iface, LPDIRECTXFILEDATA pDataObj)
380 ICOM_THIS(IDirectXFileDataImpl, iface);
382 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDataObj);
387 static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference(IDirectXFileData* iface, LPCSTR szRef, const GUID* pguidRef)
389 ICOM_THIS(IDirectXFileDataImpl, iface);
391 FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szRef, pguidRef);
396 static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject(IDirectXFileData* iface, LPCSTR szName, const GUID* pguid, LPCSTR szMimeType, LPVOID pvData, DWORD cbSize)
398 ICOM_THIS(IDirectXFileDataImpl, iface);
400 FIXME("(%p/%p)->(%s,%p,%s,%p,%ld) stub!\n", This, iface, szName, pguid, szMimeType, pvData, cbSize);
405 static ICOM_VTABLE(IDirectXFileData) IDirectXFileData_Vtbl =
407 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
408 IDirectXFileDataImpl_QueryInterface,
409 IDirectXFileDataImpl_AddRef,
410 IDirectXFileDataImpl_Release,
411 IDirectXFileDataImpl_GetName,
412 IDirectXFileDataImpl_GetId,
413 IDirectXFileDataImpl_GetData,
414 IDirectXFileDataImpl_GetType,
415 IDirectXFileDataImpl_GetNextObject,
416 IDirectXFileDataImpl_AddDataObject,
417 IDirectXFileDataImpl_AddDataReference,
418 IDirectXFileDataImpl_AddBinaryObject
421 HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj)
423 IDirectXFileDataReferenceImpl* object;
425 TRACE("(%p)\n", ppObj);
427 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl));
429 object->lpVtbl.lpVtbl = &IDirectXFileDataReference_Vtbl;
437 /*** IUnknown methods ***/
438 static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface(IDirectXFileDataReference* iface, REFIID riid, void** ppvObject)
440 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
442 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
444 if (IsEqualGUID(riid, &IID_IUnknown)
445 || IsEqualGUID(riid, &IID_IDirectXFileObject)
446 || IsEqualGUID(riid, &IID_IDirectXFileDataReference))
448 IClassFactory_AddRef(iface);
453 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
454 return E_NOINTERFACE;
457 static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef(IDirectXFileDataReference* iface)
459 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
461 TRACE("(%p/%p)\n", iface, This);
467 static ULONG WINAPI IDirectXFileDataReferenceImpl_Release(IDirectXFileDataReference* iface)
469 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
471 TRACE("(%p/%p)\n", iface, This);
474 HeapFree(GetProcessHeap(), 0, This);
479 /*** IDirectXFileObject methods ***/
480 static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataReference* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
482 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
484 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
489 static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataReference* iface, LPGUID pGuid)
491 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
493 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
498 /*** IDirectXFileDataReference ***/
499 static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataReference* iface, LPDIRECTXFILEDATA* ppDataObj)
501 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
503 FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
508 static ICOM_VTABLE(IDirectXFileDataReference) IDirectXFileDataReference_Vtbl =
510 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
511 IDirectXFileDataReferenceImpl_QueryInterface,
512 IDirectXFileDataReferenceImpl_AddRef,
513 IDirectXFileDataReferenceImpl_Release,
514 IDirectXFileDataReferenceImpl_GetName,
515 IDirectXFileDataReferenceImpl_GetId,
516 IDirectXFileDataReferenceImpl_Resolve
519 HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj)
521 IDirectXFileEnumObjectImpl* object;
523 TRACE("(%p)\n", ppObj);
525 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl));
527 object->lpVtbl.lpVtbl = &IDirectXFileEnumObject_Vtbl;
535 /*** IUnknown methods ***/
536 static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface(IDirectXFileEnumObject* iface, REFIID riid, void** ppvObject)
538 ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
540 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
542 if (IsEqualGUID(riid, &IID_IUnknown)
543 || IsEqualGUID(riid, &IID_IDirectXFileEnumObject))
545 IClassFactory_AddRef(iface);
550 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
551 return E_NOINTERFACE;
554 static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef(IDirectXFileEnumObject* iface)
556 ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
558 TRACE("(%p/%p)\n", iface, This);
564 static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* iface)
566 ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
568 TRACE("(%p/%p)\n", iface, This);
571 HeapFree(GetProcessHeap(), 0, This);
576 /*** IDirectXFileEnumObject methods ***/
577 static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject* iface, LPDIRECTXFILEDATA* ppDataObj)
579 ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
580 IDirectXFileDataImpl* object;
582 FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
584 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl));
586 object->lpVtbl.lpVtbl = &IDirectXFileData_Vtbl;
589 *ppDataObj = (LPDIRECTXFILEDATA)object;
594 static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById(IDirectXFileEnumObject* iface, REFGUID rguid, LPDIRECTXFILEDATA* ppDataObj)
596 ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
598 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, rguid, ppDataObj);
603 static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName(IDirectXFileEnumObject* iface, LPCSTR szName, LPDIRECTXFILEDATA* ppDataObj)
605 ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
607 FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szName, ppDataObj);
612 static ICOM_VTABLE(IDirectXFileEnumObject) IDirectXFileEnumObject_Vtbl =
614 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
615 IDirectXFileEnumObjectImpl_QueryInterface,
616 IDirectXFileEnumObjectImpl_AddRef,
617 IDirectXFileEnumObjectImpl_Release,
618 IDirectXFileEnumObjectImpl_GetNextDataObject,
619 IDirectXFileEnumObjectImpl_GetDataObjectById,
620 IDirectXFileEnumObjectImpl_GetDataObjectByName
623 HRESULT IDirectXFileObjectImpl_Create(IDirectXFileObjectImpl** ppObj)
625 IDirectXFileObjectImpl* object;
627 TRACE("(%p)\n", ppObj);
629 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileObjectImpl));
631 object->lpVtbl.lpVtbl = &IDirectXFileObject_Vtbl;
639 /*** IUnknown methods ***/
640 static HRESULT WINAPI IDirectXFileObjectImpl_QueryInterface(IDirectXFileObject* iface, REFIID riid, void** ppvObject)
642 ICOM_THIS(IDirectXFileObjectImpl, iface);
644 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
646 if (IsEqualGUID(riid, &IID_IUnknown)
647 || IsEqualGUID(riid, &IID_IDirectXFileObject))
649 IClassFactory_AddRef(iface);
654 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
655 return E_NOINTERFACE;
658 static ULONG WINAPI IDirectXFileObjectImpl_AddRef(IDirectXFileObject* iface)
660 ICOM_THIS(IDirectXFileObjectImpl, iface);
662 TRACE("(%p/%p)\n", iface, This);
668 static ULONG WINAPI IDirectXFileObjectImpl_Release(IDirectXFileObject* iface)
670 ICOM_THIS(IDirectXFileObjectImpl, iface);
672 TRACE("(%p/%p)\n", iface, This);
675 HeapFree(GetProcessHeap(), 0, This);
680 /*** IDirectXFileObject methods ***/
681 static HRESULT WINAPI IDirectXFileObjectImpl_GetName(IDirectXFileObject* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
683 ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
685 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
690 static HRESULT WINAPI IDirectXFileObjectImpl_GetId(IDirectXFileObject* iface, LPGUID pGuid)
692 ICOM_THIS(IDirectXFileObjectImpl, iface);
694 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
699 static ICOM_VTABLE(IDirectXFileObject) IDirectXFileObject_Vtbl =
701 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
702 IDirectXFileObjectImpl_QueryInterface,
703 IDirectXFileObjectImpl_AddRef,
704 IDirectXFileObjectImpl_Release,
705 IDirectXFileObjectImpl_GetName,
706 IDirectXFileObjectImpl_GetId
709 HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj)
711 IDirectXFileSaveObjectImpl* object;
713 TRACE("(%p)\n", ppObj);
715 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl));
717 object->lpVtbl.lpVtbl = &IDirectXFileSaveObject_Vtbl;
725 /*** IUnknown methods ***/
726 static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface(IDirectXFileSaveObject* iface, REFIID riid, void** ppvObject)
728 ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
730 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
732 if (IsEqualGUID(riid, &IID_IUnknown)
733 || IsEqualGUID(riid, &IID_IDirectXFileSaveObject))
735 IClassFactory_AddRef(iface);
740 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
741 return E_NOINTERFACE;
744 static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef(IDirectXFileSaveObject* iface)
746 ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
748 TRACE("(%p/%p)\n", iface, This);
754 static ULONG WINAPI IDirectXFileSaveObjectImpl_Release(IDirectXFileSaveObject* iface)
756 ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
758 TRACE("(%p/%p)\n", iface, This);
761 HeapFree(GetProcessHeap(), 0, This);
766 static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates(IDirectXFileSaveObject* iface, DWORD cTemplates, const GUID** ppguidTemplates)
768 ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
770 FIXME("(%p/%p)->(%ld,%p) stub!\n", This, iface, cTemplates, ppguidTemplates);
775 static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject(IDirectXFileSaveObject* iface, REFGUID rguidTemplate, LPCSTR szName, const GUID* pguid, DWORD cbSize, LPVOID pvData, LPDIRECTXFILEDATA* ppDataObj)
777 ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
779 FIXME("(%p/%p)->(%p,%s,%p,%ld,%p,%p) stub!\n", This, iface, rguidTemplate, szName, pguid, cbSize, pvData, ppDataObj);
784 static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData(IDirectXFileSaveObject* iface, LPDIRECTXFILEDATA ppDataObj)
786 ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
788 FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
793 static ICOM_VTABLE(IDirectXFileSaveObject) IDirectXFileSaveObject_Vtbl =
795 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
796 IDirectXFileSaveObjectImpl_QueryInterface,
797 IDirectXFileSaveObjectImpl_AddRef,
798 IDirectXFileSaveObjectImpl_Release,
799 IDirectXFileSaveObjectImpl_SaveTemplates,
800 IDirectXFileSaveObjectImpl_CreateDataObject,
801 IDirectXFileSaveObjectImpl_SaveData