2004-06-03 02:03:23 +02:00
|
|
|
/*
|
|
|
|
* Implementation of DirectX File Interfaces
|
|
|
|
*
|
|
|
|
* Copyright 2004 Christian Costa
|
|
|
|
*
|
|
|
|
* This file contains the (internal) driver registration functions,
|
|
|
|
* driver enumeration APIs and DirectDraw creation functions.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
|
|
|
|
#include "d3dxof_private.h"
|
|
|
|
#include "dxfile.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static struct IDirectXFileVtbl IDirectXFile_Vtbl;
|
|
|
|
static struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl;
|
|
|
|
static struct IDirectXFileDataVtbl IDirectXFileData_Vtbl;
|
|
|
|
static struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl;
|
|
|
|
static struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl;
|
|
|
|
static struct IDirectXFileObjectVtbl IDirectXFileObject_Vtbl;
|
|
|
|
static struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj)
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
2004-06-04 21:36:56 +02:00
|
|
|
IDirectXFileImpl* object;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p,%p)\n", pUnkOuter, ppObj);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFile_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileImpl_QueryInterface(IDirectXFile* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileImpl *This = (IDirectXFileImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFile))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileImpl_AddRef(IDirectXFile* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileImpl *This = (IDirectXFileImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileImpl *This = (IDirectXFileImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFile methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT* ppEnumObj)
|
|
|
|
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileImpl *This = (IDirectXFileImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
IDirectXFileEnumObjectImpl* object;
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%lx,%p) stub!\n", This, iface, pvSource, dwLoadOptions, ppEnumObj);
|
|
|
|
|
|
|
|
if (dwLoadOptions == 0)
|
|
|
|
{
|
|
|
|
FIXME("Source is a file '%s'\n", (char*)pvSource);
|
|
|
|
}
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileEnumObject_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppEnumObj = (LPDIRECTXFILEENUMOBJECT)object;
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject(IDirectXFile* iface, LPCSTR szFileName, DXFILEFORMAT dwFileFormat, LPDIRECTXFILESAVEOBJECT* ppSaveObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileImpl *This = (IDirectXFileImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%lx,%p) stub!\n", This, iface, szFileName, dwFileFormat, ppSaveObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LPVOID pvData, DWORD cbSize)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileImpl *This = (IDirectXFileImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%ld) stub!\n", This, iface, pvData, cbSize);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileVtbl IDirectXFile_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileImpl_QueryInterface,
|
|
|
|
IDirectXFileImpl_AddRef,
|
|
|
|
IDirectXFileImpl_Release,
|
|
|
|
IDirectXFileImpl_CreateEnumObject,
|
|
|
|
IDirectXFileImpl_CreateSaveObject,
|
|
|
|
IDirectXFileImpl_RegisterTemplates
|
|
|
|
};
|
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj)
|
|
|
|
{
|
|
|
|
IDirectXFileBinaryImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileBinary_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-06-03 02:03:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface(IDirectXFileBinary* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
2004-06-04 21:36:56 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileObject)
|
2004-06-03 02:03:23 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileBinary))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileBinaryImpl_AddRef(IDirectXFileBinary* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileBinaryImpl_Release(IDirectXFileBinary* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileObject methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileBinaryImpl_GetName(IDirectXFileBinary* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
|
|
|
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileBinaryImpl_GetId(IDirectXFileBinary* iface, LPGUID pGuid)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileBinary methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize(IDirectXFileBinary* iface, DWORD* pcbSize)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pcbSize);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType(IDirectXFileBinary* iface, LPCSTR* pszMimeType)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pszMimeType);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileBinaryImpl_Read(IDirectXFileBinary* iface, LPVOID pvData, DWORD cbSize, LPDWORD pcbRead)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileBinaryImpl *This = (IDirectXFileBinaryImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %ld, %p) stub!\n", This, iface, pvData, cbSize, pcbRead);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileBinaryImpl_QueryInterface,
|
|
|
|
IDirectXFileBinaryImpl_AddRef,
|
|
|
|
IDirectXFileBinaryImpl_Release,
|
|
|
|
IDirectXFileBinaryImpl_GetName,
|
|
|
|
IDirectXFileBinaryImpl_GetId,
|
|
|
|
IDirectXFileBinaryImpl_GetSize,
|
|
|
|
IDirectXFileBinaryImpl_GetMimeType,
|
|
|
|
IDirectXFileBinaryImpl_Read
|
|
|
|
};
|
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj)
|
|
|
|
{
|
|
|
|
IDirectXFileDataImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileData_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-06-03 02:03:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface(IDirectXFileData* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
2004-06-04 21:36:56 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileObject)
|
2004-06-03 02:03:23 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileData))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileDataImpl_AddRef(IDirectXFileData* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileObject methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
|
|
|
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID pGuid)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileData methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_GetData(IDirectXFileData* iface, LPCSTR szMember, DWORD* pcbSize, void** ppvData)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p,%p) stub!\n", This, iface, szMember, pcbSize, ppvData);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, const GUID** pguid)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pguid);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData* iface, LPDIRECTXFILEOBJECT* ppChildObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppChildObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData* iface, LPDIRECTXFILEDATA pDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDataObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference(IDirectXFileData* iface, LPCSTR szRef, const GUID* pguidRef)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szRef, pguidRef);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject(IDirectXFileData* iface, LPCSTR szName, const GUID* pguid, LPCSTR szMimeType, LPVOID pvData, DWORD cbSize)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataImpl *This = (IDirectXFileDataImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p,%s,%p,%ld) stub!\n", This, iface, szName, pguid, szMimeType, pvData, cbSize);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileDataVtbl IDirectXFileData_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileDataImpl_QueryInterface,
|
|
|
|
IDirectXFileDataImpl_AddRef,
|
|
|
|
IDirectXFileDataImpl_Release,
|
|
|
|
IDirectXFileDataImpl_GetName,
|
|
|
|
IDirectXFileDataImpl_GetId,
|
|
|
|
IDirectXFileDataImpl_GetData,
|
|
|
|
IDirectXFileDataImpl_GetType,
|
|
|
|
IDirectXFileDataImpl_GetNextObject,
|
|
|
|
IDirectXFileDataImpl_AddDataObject,
|
|
|
|
IDirectXFileDataImpl_AddDataReference,
|
|
|
|
IDirectXFileDataImpl_AddBinaryObject
|
|
|
|
};
|
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj)
|
|
|
|
{
|
|
|
|
IDirectXFileDataReferenceImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileDataReference_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-06-03 02:03:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface(IDirectXFileDataReference* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
2004-06-04 21:36:56 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileObject)
|
2004-06-03 02:03:23 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileDataReference))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef(IDirectXFileDataReference* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileDataReferenceImpl_Release(IDirectXFileDataReference* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileObject methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataReference* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataReference* iface, LPGUID pGuid)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileDataReference ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataReference* iface, LPDIRECTXFILEDATA* ppDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileDataReferenceImpl_QueryInterface,
|
|
|
|
IDirectXFileDataReferenceImpl_AddRef,
|
|
|
|
IDirectXFileDataReferenceImpl_Release,
|
|
|
|
IDirectXFileDataReferenceImpl_GetName,
|
|
|
|
IDirectXFileDataReferenceImpl_GetId,
|
|
|
|
IDirectXFileDataReferenceImpl_Resolve
|
|
|
|
};
|
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj)
|
|
|
|
{
|
|
|
|
IDirectXFileEnumObjectImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileEnumObject_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-06-03 02:03:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface(IDirectXFileEnumObject* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileEnumObject))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef(IDirectXFileEnumObject* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileEnumObject methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject* iface, LPDIRECTXFILEDATA* ppDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
IDirectXFileDataImpl* object;
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileData_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppDataObj = (LPDIRECTXFILEDATA)object;
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById(IDirectXFileEnumObject* iface, REFGUID rguid, LPDIRECTXFILEDATA* ppDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, rguid, ppDataObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName(IDirectXFileEnumObject* iface, LPCSTR szName, LPDIRECTXFILEDATA* ppDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szName, ppDataObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileEnumObjectImpl_QueryInterface,
|
|
|
|
IDirectXFileEnumObjectImpl_AddRef,
|
|
|
|
IDirectXFileEnumObjectImpl_Release,
|
|
|
|
IDirectXFileEnumObjectImpl_GetNextDataObject,
|
|
|
|
IDirectXFileEnumObjectImpl_GetDataObjectById,
|
|
|
|
IDirectXFileEnumObjectImpl_GetDataObjectByName
|
|
|
|
};
|
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileObjectImpl_Create(IDirectXFileObjectImpl** ppObj)
|
|
|
|
{
|
|
|
|
IDirectXFileObjectImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileObjectImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileObject_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-06-03 02:03:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileObjectImpl_QueryInterface(IDirectXFileObject* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileObjectImpl *This = (IDirectXFileObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileObject))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileObjectImpl_AddRef(IDirectXFileObject* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileObjectImpl *This = (IDirectXFileObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileObjectImpl_Release(IDirectXFileObject* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileObjectImpl *This = (IDirectXFileObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirectXFileObject methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileObjectImpl_GetName(IDirectXFileObject* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileDataReferenceImpl *This = (IDirectXFileDataReferenceImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileObjectImpl_GetId(IDirectXFileObject* iface, LPGUID pGuid)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileObjectImpl *This = (IDirectXFileObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileObjectVtbl IDirectXFileObject_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileObjectImpl_QueryInterface,
|
|
|
|
IDirectXFileObjectImpl_AddRef,
|
|
|
|
IDirectXFileObjectImpl_Release,
|
|
|
|
IDirectXFileObjectImpl_GetName,
|
|
|
|
IDirectXFileObjectImpl_GetId
|
|
|
|
};
|
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj)
|
|
|
|
{
|
|
|
|
IDirectXFileSaveObjectImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl));
|
|
|
|
|
|
|
|
object->lpVtbl.lpVtbl = &IDirectXFileSaveObject_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ppObj = object;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2004-06-03 02:03:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface(IDirectXFileSaveObject* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileSaveObjectImpl *This = (IDirectXFileSaveObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
|
|
|
|| IsEqualGUID(riid, &IID_IDirectXFileSaveObject))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef(iface);
|
|
|
|
*ppvObject = This;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef(IDirectXFileSaveObject* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileSaveObjectImpl *This = (IDirectXFileSaveObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
This->ref++;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirectXFileSaveObjectImpl_Release(IDirectXFileSaveObject* iface)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileSaveObjectImpl *This = (IDirectXFileSaveObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
2004-06-04 21:36:56 +02:00
|
|
|
TRACE("(%p/%p)\n", iface, This);
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
if (!--This->ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates(IDirectXFileSaveObject* iface, DWORD cTemplates, const GUID** ppguidTemplates)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileSaveObjectImpl *This = (IDirectXFileSaveObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%ld,%p) stub!\n", This, iface, cTemplates, ppguidTemplates);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject(IDirectXFileSaveObject* iface, REFGUID rguidTemplate, LPCSTR szName, const GUID* pguid, DWORD cbSize, LPVOID pvData, LPDIRECTXFILEDATA* ppDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileSaveObjectImpl *This = (IDirectXFileSaveObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%s,%p,%ld,%p,%p) stub!\n", This, iface, rguidTemplate, szName, pguid, cbSize, pvData, ppDataObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData(IDirectXFileSaveObject* iface, LPDIRECTXFILEDATA ppDataObj)
|
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectXFileSaveObjectImpl *This = (IDirectXFileSaveObjectImpl *)iface;
|
2004-06-03 02:03:23 +02:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl =
|
2004-06-03 02:03:23 +02:00
|
|
|
{
|
|
|
|
IDirectXFileSaveObjectImpl_QueryInterface,
|
|
|
|
IDirectXFileSaveObjectImpl_AddRef,
|
|
|
|
IDirectXFileSaveObjectImpl_Release,
|
|
|
|
IDirectXFileSaveObjectImpl_SaveTemplates,
|
|
|
|
IDirectXFileSaveObjectImpl_CreateDataObject,
|
|
|
|
IDirectXFileSaveObjectImpl_SaveData
|
|
|
|
};
|