Added d3dxof dll, part of Direct3D.
This commit is contained in:
parent
92425aab60
commit
7590fe58f4
|
@ -1512,6 +1512,7 @@ dlls/d3d9/Makefile
|
|||
dlls/d3dim/Makefile
|
||||
dlls/d3drm/Makefile
|
||||
dlls/d3dx8/Makefile
|
||||
dlls/d3dxof/Makefile
|
||||
dlls/dbghelp/Makefile
|
||||
dlls/dciman32/Makefile
|
||||
dlls/ddraw/Makefile
|
||||
|
|
|
@ -32,6 +32,7 @@ BASEDIRS = \
|
|||
ctl3d \
|
||||
d3dim \
|
||||
d3drm \
|
||||
d3dxof \
|
||||
dbghelp \
|
||||
dciman32 \
|
||||
devenum \
|
||||
|
@ -250,6 +251,7 @@ SYMLINKS_SO = \
|
|||
ctl3d32.dll.so \
|
||||
d3dim.dll.so \
|
||||
d3drm.dll.so \
|
||||
d3dxof.dll.so \
|
||||
dbghelp.dll.so \
|
||||
dciman32.dll.so \
|
||||
devenum.dll.so \
|
||||
|
@ -458,6 +460,9 @@ d3drm.dll.so: d3drm/d3drm.dll.so
|
|||
d3dx8.dll.so: d3dx8/d3dx8.dll.so
|
||||
$(RM) $@ && $(LN_S) d3dx8/d3dx8.dll.so $@
|
||||
|
||||
d3dxof.dll.so: d3dxof/d3dxof.dll.so
|
||||
$(RM) $@ && $(LN_S) d3dxof/d3dxof.dll.so $@
|
||||
|
||||
dbghelp.dll.so: dbghelp/dbghelp.dll.so
|
||||
$(RM) $@ && $(LN_S) dbghelp/dbghelp.dll.so $@
|
||||
|
||||
|
@ -957,6 +962,7 @@ IMPORT_LIBS = \
|
|||
libd3dim \
|
||||
libd3drm \
|
||||
libd3dx8 \
|
||||
libd3dxof \
|
||||
libdbghelp \
|
||||
libdciman32 \
|
||||
libddraw \
|
||||
|
@ -1163,6 +1169,11 @@ libd3dx8.def: d3dx8/d3dx8.spec.def
|
|||
libd3dx8.a: d3dx8/d3dx8.spec.def
|
||||
$(DLLTOOL) -k -l $@ -d d3dx8/d3dx8.spec.def
|
||||
|
||||
libd3dxof.def: d3dxof/d3dxof.spec.def
|
||||
$(RM) $@ && $(LN_S) d3dxof/d3dxof.spec.def $@
|
||||
libd3dxof.a: d3dxof/d3dxof.spec.def
|
||||
$(DLLTOOL) -k -l $@ -d d3dxof/d3dxof.spec.def
|
||||
|
||||
libdbghelp.def: dbghelp/dbghelp.spec.def
|
||||
$(RM) $@ && $(LN_S) dbghelp/dbghelp.spec.def $@
|
||||
libdbghelp.a: dbghelp/dbghelp.spec.def
|
||||
|
@ -1687,6 +1698,7 @@ d3d9/d3d9.spec.def: $(WINEBUILD)
|
|||
d3dim/d3dim.spec.def: $(WINEBUILD)
|
||||
d3drm/d3drm.spec.def: $(WINEBUILD)
|
||||
d3dx8/d3dx8.spec.def: $(WINEBUILD)
|
||||
d3dxof/d3dxof.spec.def: $(WINEBUILD)
|
||||
dbghelp/dbghelp.spec.def: $(WINEBUILD)
|
||||
dciman32/dciman32.spec.def: $(WINEBUILD)
|
||||
ddraw/ddraw.spec.def: $(WINEBUILD)
|
||||
|
@ -1813,6 +1825,7 @@ d3d9/d3d9.dll.so: d3d9
|
|||
d3dim/d3dim.dll.so: d3dim
|
||||
d3drm/d3drm.dll.so: d3drm
|
||||
d3dx8/d3dx8.dll.so: d3dx8
|
||||
d3dxof/d3dxof.dll.so: d3dxof
|
||||
dbghelp/dbghelp.dll.so: dbghelp
|
||||
dciman32/dciman32.dll.so: dciman32
|
||||
ddraw/ddraw.dll.so: ddraw
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Makefile
|
||||
d3dxof.dll.dbg.c
|
||||
d3dxof.spec.def
|
||||
version.res
|
|
@ -0,0 +1,18 @@
|
|||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = d3dxof.dll
|
||||
IMPORTS = ole32 user32 advapi32 kernel32
|
||||
EXTRALIBS = -ldxguid -luuid
|
||||
|
||||
C_SRCS = \
|
||||
main.c \
|
||||
d3dxof.c \
|
||||
regsvr.c
|
||||
|
||||
RC_SRCS = version.rc
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
|
@ -0,0 +1,699 @@
|
|||
/*
|
||||
* 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);
|
||||
|
||||
static struct ICOM_VTABLE(IDirectXFile) IDirectXFile_Vtbl;
|
||||
static struct ICOM_VTABLE(IDirectXFileEnumObject) IDirectXFileEnumObject_Vtbl;
|
||||
static struct ICOM_VTABLE(IDirectXFileData) IDirectXFileData_Vtbl;
|
||||
|
||||
HRESULT XF_create(IUnknown *pUnkOuter, LPVOID *ppObj)
|
||||
{
|
||||
IDirectXFileImpl* object;
|
||||
|
||||
FIXME("(%p,%p)\n", pUnkOuter, ppObj);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
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)
|
||||
|
||||
{
|
||||
ICOM_THIS(IDirectXFileImpl, iface);
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%ld) stub!\n", This, iface, pvData, cbSize);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFile) IDirectXFile_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileImpl_QueryInterface,
|
||||
IDirectXFileImpl_AddRef,
|
||||
IDirectXFileImpl_Release,
|
||||
IDirectXFileImpl_CreateEnumObject,
|
||||
IDirectXFileImpl_CreateSaveObject,
|
||||
IDirectXFileImpl_RegisterTemplates
|
||||
};
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface(IDirectXFileBinary* iface, REFIID riid, void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| 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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileBinaryImpl_Release(IDirectXFileBinary* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
if (!--This->ref)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*** IDirectXFileObject methods ***/
|
||||
static HRESULT WINAPI IDirectXFileBinaryImpl_GetName(IDirectXFileBinary* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
||||
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileBinaryImpl_GetId(IDirectXFileBinary* iface, LPGUID pGuid)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/*** IDirectXFileBinary methods ***/
|
||||
static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize(IDirectXFileBinary* iface, DWORD* pcbSize)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pcbSize);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType(IDirectXFileBinary* iface, LPCSTR* pszMimeType)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileBinaryImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p, %ld, %p) stub!\n", This, iface, pvData, cbSize, pcbRead);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFileBinary) IDirectXFileBinary_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileBinaryImpl_QueryInterface,
|
||||
IDirectXFileBinaryImpl_AddRef,
|
||||
IDirectXFileBinaryImpl_Release,
|
||||
IDirectXFileBinaryImpl_GetName,
|
||||
IDirectXFileBinaryImpl_GetId,
|
||||
IDirectXFileBinaryImpl_GetSize,
|
||||
IDirectXFileBinaryImpl_GetMimeType,
|
||||
IDirectXFileBinaryImpl_Read
|
||||
};
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface(IDirectXFileData* iface, REFIID riid, void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| 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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
if (!--This->ref)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*** IDirectXFileObject methods ***/
|
||||
static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
||||
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID pGuid)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pguid);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData* iface, LPDIRECTXFILEOBJECT* ppChildObj)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppChildObj);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData* iface, LPDIRECTXFILEDATA pDataObj)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDataObj);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference(IDirectXFileData* iface, LPCSTR szRef, const GUID* pguidRef)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p,%s,%p,%ld) stub!\n", This, iface, szName, pguid, szMimeType, pvData, cbSize);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFileData) IDirectXFileData_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileDataImpl_QueryInterface,
|
||||
IDirectXFileDataImpl_AddRef,
|
||||
IDirectXFileDataImpl_Release,
|
||||
IDirectXFileDataImpl_GetName,
|
||||
IDirectXFileDataImpl_GetId,
|
||||
IDirectXFileDataImpl_GetData,
|
||||
IDirectXFileDataImpl_GetType,
|
||||
IDirectXFileDataImpl_GetNextObject,
|
||||
IDirectXFileDataImpl_AddDataObject,
|
||||
IDirectXFileDataImpl_AddDataReference,
|
||||
IDirectXFileDataImpl_AddBinaryObject
|
||||
};
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface(IDirectXFileDataReference* iface, REFIID riid, void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| 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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileDataReferenceImpl_Release(IDirectXFileDataReference* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
if (!--This->ref)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*** IDirectXFileObject methods ***/
|
||||
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataReference* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataReference* iface, LPGUID pGuid)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/*** IDirectXFileDataReference ***/
|
||||
static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataReference* iface, LPDIRECTXFILEDATA* ppDataObj)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFileDataReference) IDirectXFileDataReference_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileDataReferenceImpl_QueryInterface,
|
||||
IDirectXFileDataReferenceImpl_AddRef,
|
||||
IDirectXFileDataReferenceImpl_Release,
|
||||
IDirectXFileDataReferenceImpl_GetName,
|
||||
IDirectXFileDataReferenceImpl_GetId,
|
||||
IDirectXFileDataReferenceImpl_Resolve
|
||||
};
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface(IDirectXFileEnumObject* iface, REFIID riid, void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
if (!--This->ref)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*** IDirectXFileEnumObject methods ***/
|
||||
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject* iface, LPDIRECTXFILEDATA* ppDataObj)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileEnumObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szName, ppDataObj);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFileEnumObject) IDirectXFileEnumObject_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileEnumObjectImpl_QueryInterface,
|
||||
IDirectXFileEnumObjectImpl_AddRef,
|
||||
IDirectXFileEnumObjectImpl_Release,
|
||||
IDirectXFileEnumObjectImpl_GetNextDataObject,
|
||||
IDirectXFileEnumObjectImpl_GetDataObjectById,
|
||||
IDirectXFileEnumObjectImpl_GetDataObjectByName
|
||||
};
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI IDirectXFileObjectImpl_QueryInterface(IDirectXFileObject* iface, REFIID riid, void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileObjectImpl_Release(IDirectXFileObject* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
if (!--This->ref)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*** IDirectXFileObject methods ***/
|
||||
static HRESULT WINAPI IDirectXFileObjectImpl_GetName(IDirectXFileObject* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileDataReferenceImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileObjectImpl_GetId(IDirectXFileObject* iface, LPGUID pGuid)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFileObject) IDirectXFileObject_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileObjectImpl_QueryInterface,
|
||||
IDirectXFileObjectImpl_AddRef,
|
||||
IDirectXFileObjectImpl_Release,
|
||||
IDirectXFileObjectImpl_GetName,
|
||||
IDirectXFileObjectImpl_GetId
|
||||
};
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface(IDirectXFileSaveObject* iface, REFIID riid, void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
This->ref++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirectXFileSaveObjectImpl_Release(IDirectXFileSaveObject* iface)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)\n", iface, This);
|
||||
|
||||
if (!--This->ref)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates(IDirectXFileSaveObject* iface, DWORD cTemplates, const GUID** ppguidTemplates)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
|
||||
|
||||
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)
|
||||
{
|
||||
ICOM_THIS(IDirectXFileSaveObjectImpl, iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IDirectXFileSaveObject) IDirectXFileSaveObject_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectXFileSaveObjectImpl_QueryInterface,
|
||||
IDirectXFileSaveObjectImpl_AddRef,
|
||||
IDirectXFileSaveObjectImpl_Release,
|
||||
IDirectXFileSaveObjectImpl_SaveTemplates,
|
||||
IDirectXFileSaveObjectImpl_CreateDataObject,
|
||||
IDirectXFileSaveObjectImpl_SaveData
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
@ stdcall DirectXFileCreate(ptr)
|
||||
@ stdcall -private DllCanUnloadNow() D3DXOF_DllCanUnloadNow
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr) D3DXOF_DllGetClassObject
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* DirectX File private interfaces (D3DXOF.DLL)
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __D3DXOF_PRIVATE_INCLUDED__
|
||||
#define __D3DXOF_PRIVATE_INCLUDED__
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wtypes.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "dxfile.h"
|
||||
|
||||
HRESULT XF_create(IUnknown *pUnkOuter, LPVOID *ppObj);
|
||||
|
||||
typedef struct {
|
||||
IDirectXFile lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileImpl;
|
||||
|
||||
typedef struct {
|
||||
IDirectXFileBinary lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileBinaryImpl;
|
||||
|
||||
typedef struct {
|
||||
IDirectXFileData lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileDataImpl;
|
||||
|
||||
typedef struct {
|
||||
IDirectXFileDataReference lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileDataReferenceImpl;
|
||||
|
||||
typedef struct {
|
||||
IDirectXFileObject lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileObjectImpl;
|
||||
|
||||
typedef struct {
|
||||
IDirectXFileEnumObject lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileEnumObjectImpl;
|
||||
|
||||
typedef struct {
|
||||
IDirectXFileSaveObject lpVtbl;
|
||||
int ref;
|
||||
} IDirectXFileSaveObjectImpl;
|
||||
|
||||
#endif /* __D3DXOF_PRIVATE_INCLUDED__ */
|
|
@ -0,0 +1,230 @@
|
|||
/*
|
||||
* DirectX Files Functions (D3DXOF.DLL)
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "ole2.h"
|
||||
#include "uuids.h"
|
||||
|
||||
#include "d3dxof_private.h"
|
||||
#include "dxfile.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
|
||||
|
||||
static DWORD dll_ref = 0;
|
||||
|
||||
/* For the moment, do nothing here. */
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||
{
|
||||
switch(fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hInstDLL);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* DirectX File ClassFactory
|
||||
*/
|
||||
typedef struct {
|
||||
IClassFactory ITF_IClassFactory;
|
||||
|
||||
DWORD ref;
|
||||
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
|
||||
} IClassFactoryImpl;
|
||||
|
||||
struct object_creation_info
|
||||
{
|
||||
const CLSID *clsid;
|
||||
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
|
||||
};
|
||||
|
||||
static const struct object_creation_info object_creation[] =
|
||||
{
|
||||
{ &CLSID_CDirectXFile, XF_create },
|
||||
};
|
||||
|
||||
static HRESULT WINAPI XFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
IClassFactory_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI XFCF_AddRef(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
static ULONG WINAPI XFCF_Release(LPCLASSFACTORY iface)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
|
||||
ULONG ref = --This->ref;
|
||||
|
||||
if (ref == 0)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI XFCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
HRESULT hres;
|
||||
LPUNKNOWN punk;
|
||||
|
||||
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
|
||||
hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk);
|
||||
if (FAILED(hres)) {
|
||||
*ppobj = NULL;
|
||||
return hres;
|
||||
}
|
||||
hres = IUnknown_QueryInterface(punk, riid, ppobj);
|
||||
if (FAILED(hres)) {
|
||||
*ppobj = NULL;
|
||||
return hres;
|
||||
}
|
||||
IUnknown_Release(punk);
|
||||
return hres;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI XFCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
|
||||
{
|
||||
ICOM_THIS(IClassFactoryImpl,iface);
|
||||
FIXME("(%p)->(%d),stub!\n",This,dolock);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ICOM_VTABLE(IClassFactory) XFCF_Vtbl =
|
||||
{
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
XFCF_QueryInterface,
|
||||
XFCF_AddRef,
|
||||
XFCF_Release,
|
||||
XFCF_CreateInstance,
|
||||
XFCF_LockServer
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* DirectXFileCreate (D3DXOF.@)
|
||||
*/
|
||||
HRESULT WINAPI DirectXFileCreate(LPDIRECTXFILE* lplpDirectXFile)
|
||||
{
|
||||
HRESULT hr;
|
||||
FIXME("(%p) Stub\n", lplpDirectXFile);
|
||||
if (!lplpDirectXFile)
|
||||
return DXFILEERR_BADVALUE;
|
||||
|
||||
hr = XF_create(NULL, (LPVOID)lplpDirectXFile);
|
||||
|
||||
if (FAILED(hr))
|
||||
return DXFILEERR_BADALLOC;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* DllGetClassObject [D3DXOF.@]
|
||||
* Retrieves class object from a DLL object
|
||||
*
|
||||
* NOTES
|
||||
* Docs say returns STDAPI
|
||||
*
|
||||
* PARAMS
|
||||
* rclsid [I] CLSID for the class object
|
||||
* riid [I] Reference to identifier of interface for class object
|
||||
* ppv [O] Address of variable to receive interface pointer for riid
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK
|
||||
* Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG,
|
||||
* E_UNEXPECTED
|
||||
*/
|
||||
DWORD WINAPI D3DXOF_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
int i;
|
||||
IClassFactoryImpl *factory;
|
||||
|
||||
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
|
||||
if ( !IsEqualGUID( &IID_IClassFactory, riid )
|
||||
&& ! IsEqualGUID( &IID_IUnknown, riid) )
|
||||
return E_NOINTERFACE;
|
||||
|
||||
for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++)
|
||||
{
|
||||
if (IsEqualGUID(object_creation[i].clsid, rclsid))
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == sizeof(object_creation)/sizeof(object_creation[0]))
|
||||
{
|
||||
FIXME("%s: no class found.\n", debugstr_guid(rclsid));
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory));
|
||||
if (factory == NULL) return E_OUTOFMEMORY;
|
||||
|
||||
factory->ITF_IClassFactory.lpVtbl = &XFCF_Vtbl;
|
||||
factory->ref = 1;
|
||||
|
||||
factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
|
||||
|
||||
*ppv = &(factory->ITF_IClassFactory);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (D3DXOF.@)
|
||||
*/
|
||||
HRESULT WINAPI D3DXOF_DllCanUnloadNow()
|
||||
{
|
||||
return dll_ref != 0 ? S_FALSE : S_OK;
|
||||
}
|
|
@ -0,0 +1,554 @@
|
|||
/*
|
||||
* self-registerable dll functions for d3dxof.dll
|
||||
*
|
||||
* Copyright (C) 2003 John K. Hohm
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
|
||||
#include "ole2.h"
|
||||
#include "uuids.h"
|
||||
|
||||
#include "dxfile.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dxof);
|
||||
|
||||
/*
|
||||
* Near the bottom of this file are the exported DllRegisterServer and
|
||||
* DllUnregisterServer, which make all this worthwhile.
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* interface for self-registering
|
||||
*/
|
||||
struct regsvr_interface
|
||||
{
|
||||
IID const *iid; /* NULL for end of list */
|
||||
LPCSTR name; /* can be NULL to omit */
|
||||
IID const *base_iid; /* can be NULL to omit */
|
||||
int num_methods; /* can be <0 to omit */
|
||||
CLSID const *ps_clsid; /* can be NULL to omit */
|
||||
CLSID const *ps_clsid32; /* can be NULL to omit */
|
||||
};
|
||||
|
||||
static HRESULT register_interfaces(struct regsvr_interface const *list);
|
||||
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
|
||||
|
||||
struct regsvr_coclass
|
||||
{
|
||||
CLSID const *clsid; /* NULL for end of list */
|
||||
LPCSTR name; /* can be NULL to omit */
|
||||
LPCSTR ips; /* can be NULL to omit */
|
||||
LPCSTR ips32; /* can be NULL to omit */
|
||||
LPCSTR ips32_tmodel; /* can be NULL to omit */
|
||||
LPCSTR progid; /* can be NULL to omit */
|
||||
LPCSTR viprogid; /* can be NULL to omit */
|
||||
LPCSTR progid_extra; /* can be NULL to omit */
|
||||
};
|
||||
|
||||
static HRESULT register_coclasses(struct regsvr_coclass const *list);
|
||||
static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
|
||||
|
||||
/***********************************************************************
|
||||
* static string constants
|
||||
*/
|
||||
static WCHAR const interface_keyname[10] = {
|
||||
'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 };
|
||||
static WCHAR const base_ifa_keyname[14] = {
|
||||
'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c',
|
||||
'e', 0 };
|
||||
static WCHAR const num_methods_keyname[11] = {
|
||||
'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 };
|
||||
static WCHAR const ps_clsid_keyname[15] = {
|
||||
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
|
||||
'i', 'd', 0 };
|
||||
static WCHAR const ps_clsid32_keyname[17] = {
|
||||
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
|
||||
'i', 'd', '3', '2', 0 };
|
||||
static WCHAR const clsid_keyname[6] = {
|
||||
'C', 'L', 'S', 'I', 'D', 0 };
|
||||
static WCHAR const curver_keyname[7] = {
|
||||
'C', 'u', 'r', 'V', 'e', 'r', 0 };
|
||||
static WCHAR const ips_keyname[13] = {
|
||||
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
|
||||
0 };
|
||||
static WCHAR const ips32_keyname[15] = {
|
||||
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
|
||||
'3', '2', 0 };
|
||||
static WCHAR const progid_keyname[7] = {
|
||||
'P', 'r', 'o', 'g', 'I', 'D', 0 };
|
||||
static WCHAR const viprogid_keyname[25] = {
|
||||
'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p',
|
||||
'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D',
|
||||
0 };
|
||||
static char const tmodel_valuename[] = "ThreadingModel";
|
||||
|
||||
/***********************************************************************
|
||||
* static helper functions
|
||||
*/
|
||||
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid);
|
||||
static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
|
||||
WCHAR const *value);
|
||||
static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
|
||||
char const *value);
|
||||
static LONG register_progid(WCHAR const *clsid,
|
||||
char const *progid, char const *curver_progid,
|
||||
char const *name, char const *extra);
|
||||
static LONG recursive_delete_key(HKEY key);
|
||||
static LONG recursive_delete_keyA(HKEY base, char const *name);
|
||||
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
|
||||
|
||||
/***********************************************************************
|
||||
* register_interfaces
|
||||
*/
|
||||
static HRESULT register_interfaces(struct regsvr_interface const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY interface_key;
|
||||
|
||||
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &interface_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->iid; ++list) {
|
||||
WCHAR buf[39];
|
||||
HKEY iid_key;
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &iid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_interface_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->base_iid) {
|
||||
register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (0 <= list->num_methods) {
|
||||
static WCHAR const fmt[3] = { '%', 'd', 0 };
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
|
||||
wsprintfW(buf, fmt, list->num_methods);
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid) {
|
||||
register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
if (list->ps_clsid32) {
|
||||
register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
||||
error_close_iid_key:
|
||||
RegCloseKey(iid_key);
|
||||
}
|
||||
|
||||
error_close_interface_key:
|
||||
RegCloseKey(interface_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* unregister_interfaces
|
||||
*/
|
||||
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY interface_key;
|
||||
|
||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0,
|
||||
KEY_READ | KEY_WRITE, &interface_key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->iid; ++list) {
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->iid, buf, 39);
|
||||
res = recursive_delete_keyW(interface_key, buf);
|
||||
}
|
||||
|
||||
RegCloseKey(interface_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* register_coclasses
|
||||
*/
|
||||
static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY coclass_key;
|
||||
|
||||
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
|
||||
WCHAR buf[39];
|
||||
HKEY clsid_key;
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->ips) {
|
||||
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->ips32) {
|
||||
HKEY ips32_key;
|
||||
|
||||
res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL,
|
||||
&ips32_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32,
|
||||
lstrlenA(list->ips32) + 1);
|
||||
if (res == ERROR_SUCCESS && list->ips32_tmodel)
|
||||
res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32_tmodel,
|
||||
strlen(list->ips32_tmodel) + 1);
|
||||
RegCloseKey(ips32_key);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->progid) {
|
||||
res = register_key_defvalueA(clsid_key, progid_keyname,
|
||||
list->progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = register_progid(buf, list->progid, NULL,
|
||||
list->name, list->progid_extra);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
if (list->viprogid) {
|
||||
res = register_key_defvalueA(clsid_key, viprogid_keyname,
|
||||
list->viprogid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = register_progid(buf, list->viprogid, list->progid,
|
||||
list->name, list->progid_extra);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
||||
error_close_clsid_key:
|
||||
RegCloseKey(clsid_key);
|
||||
}
|
||||
|
||||
error_close_coclass_key:
|
||||
RegCloseKey(coclass_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* unregister_coclasses
|
||||
*/
|
||||
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
|
||||
{
|
||||
LONG res = ERROR_SUCCESS;
|
||||
HKEY coclass_key;
|
||||
|
||||
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0,
|
||||
KEY_READ | KEY_WRITE, &coclass_key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
|
||||
if (res != ERROR_SUCCESS) goto error_return;
|
||||
|
||||
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(list->clsid, buf, 39);
|
||||
res = recursive_delete_keyW(coclass_key, buf);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->progid) {
|
||||
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
|
||||
if (list->viprogid) {
|
||||
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
}
|
||||
}
|
||||
|
||||
error_close_coclass_key:
|
||||
RegCloseKey(coclass_key);
|
||||
error_return:
|
||||
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_guid
|
||||
*/
|
||||
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
|
||||
{
|
||||
WCHAR buf[39];
|
||||
|
||||
StringFromGUID2(guid, buf, 39);
|
||||
return register_key_defvalueW(base, name, buf);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_defvalueW
|
||||
*/
|
||||
static LONG register_key_defvalueW(
|
||||
HKEY base,
|
||||
WCHAR const *name,
|
||||
WCHAR const *value)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
(lstrlenW(value) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_key_defvalueA
|
||||
*/
|
||||
static LONG register_key_defvalueA(
|
||||
HKEY base,
|
||||
WCHAR const *name,
|
||||
char const *value)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
lstrlenA(value) + 1);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* regsvr_progid
|
||||
*/
|
||||
static LONG register_progid(
|
||||
WCHAR const *clsid,
|
||||
char const *progid,
|
||||
char const *curver_progid,
|
||||
char const *name,
|
||||
char const *extra)
|
||||
{
|
||||
LONG res;
|
||||
HKEY progid_key;
|
||||
|
||||
res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0,
|
||||
NULL, 0, KEY_READ | KEY_WRITE, NULL,
|
||||
&progid_key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
|
||||
if (name) {
|
||||
res = RegSetValueExA(progid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)name, strlen(name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
if (clsid) {
|
||||
res = register_key_defvalueW(progid_key, clsid_keyname, clsid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
if (curver_progid) {
|
||||
res = register_key_defvalueA(progid_key, curver_keyname,
|
||||
curver_progid);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
if (extra) {
|
||||
HKEY extra_key;
|
||||
|
||||
res = RegCreateKeyExA(progid_key, extra, 0,
|
||||
NULL, 0, KEY_READ | KEY_WRITE, NULL,
|
||||
&extra_key, NULL);
|
||||
if (res == ERROR_SUCCESS)
|
||||
RegCloseKey(extra_key);
|
||||
}
|
||||
|
||||
error_close_progid_key:
|
||||
RegCloseKey(progid_key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_key
|
||||
*/
|
||||
static LONG recursive_delete_key(HKEY key)
|
||||
{
|
||||
LONG res;
|
||||
WCHAR subkey_name[MAX_PATH];
|
||||
DWORD cName;
|
||||
HKEY subkey;
|
||||
|
||||
for (;;) {
|
||||
cName = sizeof(subkey_name) / sizeof(WCHAR);
|
||||
res = RegEnumKeyExW(key, 0, subkey_name, &cName,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
|
||||
res = ERROR_SUCCESS; /* presumably we're done enumerating */
|
||||
break;
|
||||
}
|
||||
res = RegOpenKeyExW(key, subkey_name, 0,
|
||||
KEY_READ | KEY_WRITE, &subkey);
|
||||
if (res == ERROR_FILE_NOT_FOUND) continue;
|
||||
if (res != ERROR_SUCCESS) break;
|
||||
|
||||
res = recursive_delete_key(subkey);
|
||||
RegCloseKey(subkey);
|
||||
if (res != ERROR_SUCCESS) break;
|
||||
}
|
||||
|
||||
if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_keyA
|
||||
*/
|
||||
static LONG recursive_delete_keyA(HKEY base, char const *name)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = recursive_delete_key(key);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* recursive_delete_keyW
|
||||
*/
|
||||
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
|
||||
{
|
||||
LONG res;
|
||||
HKEY key;
|
||||
|
||||
res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key);
|
||||
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = recursive_delete_key(key);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* coclass list
|
||||
*/
|
||||
static struct regsvr_coclass const coclass_list[] = {
|
||||
{ &CLSID_CDirectXFile,
|
||||
"DirectX File",
|
||||
NULL,
|
||||
"d3dxof.dll",
|
||||
"Both"
|
||||
},
|
||||
{ NULL } /* list terminator */
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* interface list
|
||||
*/
|
||||
|
||||
static struct regsvr_interface const interface_list[] = {
|
||||
{ NULL } /* list terminator */
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (D3DXOF.@)
|
||||
*/
|
||||
HRESULT WINAPI D3DXOF_DllRegisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = register_coclasses(coclass_list);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = register_interfaces(interface_list);
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (D3DXOF.@)
|
||||
*/
|
||||
HRESULT WINAPI D3DXOF_DllUnregisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = unregister_coclasses(coclass_list);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = unregister_interfaces(interface_list);
|
||||
return hr;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2004 Christian Costa
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "DirectX Files dll"
|
||||
#define WINE_FILENAME_STR "d3dxof.dll"
|
||||
#define WINE_FILEVERSION 5,0,2135,1
|
||||
#define WINE_FILEVERSION_STR "5.0.2135.1"
|
||||
#define WINE_PRODUCTVERSION 5,0,2135,1
|
||||
#define WINE_PRODUCTVERSION_STR "5.0.2135.1"
|
||||
#define WINE_PRODUCTNAME_STR "Direct3D"
|
||||
|
||||
#include "wine/wine_common_ver.rc"
|
|
@ -44,3 +44,4 @@
|
|||
#include "dplobby.h"
|
||||
#include "dinput.h"
|
||||
#include "ddrawi.h"
|
||||
#include "dxfile.h"
|
||||
|
|
|
@ -41,6 +41,7 @@ WINE REGISTRY Version 2
|
|||
"mcianim.drv" = "native, builtin"
|
||||
"msi" = "native, builtin"
|
||||
"d3drm" = "native, builtin"
|
||||
"d3dxof" = "native, builtin"
|
||||
"dpnhpast" = "native, builtin"
|
||||
; you can specify applications too
|
||||
; this one will apply for all notepad.exe
|
||||
|
|
|
@ -93,6 +93,7 @@ WINDOWS_INCLUDES = \
|
|||
dxdiag.h \
|
||||
dxerr8.h \
|
||||
dxerr9.h \
|
||||
dxfile.h \
|
||||
evcode.h \
|
||||
excpt.h \
|
||||
fci.h \
|
||||
|
|
|
@ -0,0 +1,272 @@
|
|||
/*
|
||||
* Copyright 2004 Christian Costa
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __WINE_DXFILE_H
|
||||
#define __WINE_DXFILE_H
|
||||
|
||||
#include <objbase.h>
|
||||
#include <winnt.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
typedef DWORD DXFILEFORMAT;
|
||||
|
||||
#define DXFILEFORMAT_BINARY 0
|
||||
#define DXFILEFORMAT_TEXT 1
|
||||
#define DXFILEFORMAT_COMPRESSED 2
|
||||
|
||||
typedef DWORD DXFILELOADOPTIONS;
|
||||
|
||||
#define DXFILELOAD_FROMFILE 0x00L
|
||||
#define DXFILELOAD_FROMRESOURCE 0x01L
|
||||
#define DXFILELOAD_FROMMEMORY 0x02L
|
||||
#define DXFILELOAD_FROMSTREAM 0x04L
|
||||
#define DXFILELOAD_FROMURL 0x08L
|
||||
|
||||
typedef struct _DXFILELOADRESOURCE {
|
||||
HMODULE hModule;
|
||||
LPCSTR /*LPCTSTR*/ lpName;
|
||||
LPCSTR /*LPCTSTR*/ lpType;
|
||||
} DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE;
|
||||
|
||||
typedef struct _DXFILELOADMEMORY {
|
||||
LPVOID lpMemory;
|
||||
DWORD dSize;
|
||||
} DXFILELOADMEMORY, *LPDXFILELOADMEMORY;
|
||||
|
||||
typedef struct IDirectXFile IDirectXFile, *LPDIRECTXFILE;
|
||||
typedef struct IDirectXFileEnumObject IDirectXFileEnumObject, *LPDIRECTXFILEENUMOBJECT;
|
||||
typedef struct IDirectXFileSaveObject IDirectXFileSaveObject, *LPDIRECTXFILESAVEOBJECT;
|
||||
typedef struct IDirectXFileObject IDirectXFileObject, *LPDIRECTXFILEOBJECT;
|
||||
typedef struct IDirectXFileData IDirectXFileData, *LPDIRECTXFILEDATA;
|
||||
typedef struct IDirectXFileDataReference IDirectXFileDataReference, *LPDIRECTXFILEDATAREFERENCE;
|
||||
typedef struct IDirectXFileBinary IDirectXFileBinary, *LPDIRECTXFILEBINARY;
|
||||
|
||||
STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile);
|
||||
|
||||
#define INTERFACE IDirectXFile
|
||||
#define IDirectXFile_METHODS \
|
||||
IUnknown_METHODS \
|
||||
STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS, LPDIRECTXFILEENUMOBJECT *) PURE; \
|
||||
STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT, LPDIRECTXFILESAVEOBJECT *) PURE; \
|
||||
STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE;
|
||||
ICOM_DEFINE(IDirectXFile,IUnknown)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFile_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFile_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFile_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFile methods ***/
|
||||
#define IDirectXFile_CreateEnumObject(p,a,b,c) (p)->lpVtbl->CreateEnumObject(p,a,b,c)
|
||||
#define IDirectXFile_CreateSaveObject(p,a,b,c) (p)->lpVtbl->CreateSaveObject(p,a,b,c)
|
||||
#define IDirectXFile_RegisterTemplates(p,a,b) (p)->lpVtbl->RegisterTemplates(p,a,b)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IDirectXFileEnumObject
|
||||
#define IDirectXFileEnumObject_METHODS \
|
||||
IUnknown_METHODS \
|
||||
STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE; \
|
||||
STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE; \
|
||||
STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE;
|
||||
ICOM_DEFINE(IDirectXFileEnumObject,IUnknown)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFileEnumObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFileEnumObject_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFileEnumObject_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFileEnumObject methods ***/
|
||||
#define IDirectXFileEnumObject_GetNextDataObject(p,a) (p)->lpVtbl->GetNextDataObject(p,a)
|
||||
#define IDirectXFileEnumObject_GetDataObjectById(p,a,b) (p)->lpVtbl->GetDataObjectById(p,a,b)
|
||||
#define IDirectXFileEnumObject_GetDataObjectByName(p,a,b) (p)->lpVtbl->GetDataObjectByName(p,a,b)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IDirectXFileSaveObject
|
||||
#define IDirectXFileSaveObject_METHODS \
|
||||
IUnknown_METHODS \
|
||||
STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE; \
|
||||
STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *, DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE; \
|
||||
STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE;
|
||||
ICOM_DEFINE(IDirectXFileSaveObject,IUnknown)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFileSaveObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFileSaveObject_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFileSaveObject_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFileSaveObject methods ***/
|
||||
#define IDirectXFileSaveObject_SaveTemplates(p,a,b) (p)->lpVtbl->SaveTemplates(p,a,b)
|
||||
#define IDirectXFileSaveObject_CreateDataObject(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDataObject(p,a,b,c,d,e,f)
|
||||
#define IDirectXFileSaveObject_SaveData(p,a) (p)->lpVtbl->SaveData(p,a)
|
||||
#endif
|
||||
|
||||
#define IDIRECTXFILEOBJECT_METHODS \
|
||||
STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) PURE; \
|
||||
STDMETHOD(GetId) (THIS_ LPGUID) PURE;
|
||||
|
||||
#define INTERFACE IDirectXFileObject
|
||||
#define IDirectXFileObject_METHODS \
|
||||
IUnknown_METHODS \
|
||||
IDIRECTXFILEOBJECT_METHODS
|
||||
ICOM_DEFINE(IDirectXFileObject,IUnknown)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFileObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFileObject_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFileObject_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFileObject methods ***/
|
||||
#define IDirectXFileObject_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
|
||||
#define IDirectXFileObject_GetId(p,a) (p)->lpVtbl->GetId(p,a)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IDirectXFileData
|
||||
#define IDirectXFileData_METHODS \
|
||||
IUnknown_METHODS \
|
||||
IDIRECTXFILEOBJECT_METHODS \
|
||||
STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE; \
|
||||
STDMETHOD(GetType) (THIS_ const GUID **) PURE; \
|
||||
STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE; \
|
||||
STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE; \
|
||||
STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE; \
|
||||
STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE;
|
||||
ICOM_DEFINE(IDirectXFileData,IDirectXFileObject)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFileData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFileData_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFileData_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFileObject methods ***/
|
||||
#define IDirectXFileData_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
|
||||
#define IDirectXFileData_GetId(p,a) (p)->lpVtbl->GetId(p,a)
|
||||
/*** IDirectXFileData methods ***/
|
||||
#define IDirectXFileData_GetData(p,a,b,c) (p)->lpVtbl->GetData(p,a,b,c)
|
||||
#define IDirectXFileData_GetType(p,a) (p)->lpVtbl->GetType(p,a)
|
||||
#define IDirectXFileData_GetNextObject(p,a) (p)->lpVtbl->GetNextObject(p,a)
|
||||
#define IDirectXFileData_AddDataObject(p,a) (p)->lpVtbl->AddDataObject(p,a)
|
||||
#define IDirectXFileData_AddDataReference(p,a,b) (p)->lpVtbl->AddDataReference(p,a,b)
|
||||
#define IDirectXFileData_AddBinaryObject(p,a,b,c,d,e) (p)->lpVtbl->AddBinaryObject(p,a,b,c,d,e)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IDirectXFileDataReference
|
||||
#define IDirectXFileDataReference_METHODS \
|
||||
IUnknown_METHODS \
|
||||
IDIRECTXFILEOBJECT_METHODS \
|
||||
STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE;
|
||||
ICOM_DEFINE(IDirectXFileDataReference,IDirectXFileObject)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFileData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFileData_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFileData_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFileObject methods ***/
|
||||
#define IDirectXFileData_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
|
||||
#define IDirectXFileData_GetId(p,a) (p)->lpVtbl->GetId(p,a)
|
||||
/*** IDirectXFileDataReference methods ***/
|
||||
#define IDirectXFileData_Resolve(p,a) (p)->lpVtbl->GetData(p,a)
|
||||
#endif
|
||||
|
||||
#define INTERFACE IDirectXFileBinary
|
||||
#define IDirectXFileBinary_METHODS \
|
||||
IUnknown_METHODS \
|
||||
IDIRECTXFILEOBJECT_METHODS \
|
||||
STDMETHOD(GetSize) (THIS_ DWORD *) PURE; \
|
||||
STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE; \
|
||||
STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE;
|
||||
ICOM_DEFINE(IDirectXFileBinary,IDirectXFileObject)
|
||||
#undef INTERFACE
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IDirectXFileBinary_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectXFileBinary_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectXFileBinary_Release(p) (p)->lpVtbl->Release(p)
|
||||
/*** IDirectXFileObject methods ***/
|
||||
#define IDirectXFileBinary_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
|
||||
#define IDirectXFileBinary_GetId(p,a) (p)->lpVtbl->GetId(p,a)
|
||||
/*** IDirectXFileBinary methods ***/
|
||||
#define IDirectXFileBinary_GetSize(p,a) (p)->lpVtbl->GetSize(p,a)
|
||||
#define IDirectXFileBinary_GetMimeType(p,a) (p)->lpVtbl->GetMimeType(p,a)
|
||||
#define IDirectXFileBinary_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
|
||||
#endif
|
||||
|
||||
/* DirectXFile Object CLSID */
|
||||
DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
||||
|
||||
/* DirectX File Interface GUIDs */
|
||||
DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
|
||||
/* DirectX File Header template's GUID */
|
||||
DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
|
||||
|
||||
/* DirectX File errors */
|
||||
#define _FACDD 0x876
|
||||
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
|
||||
|
||||
#define DXFILE_OK 0
|
||||
|
||||
#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850)
|
||||
#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851)
|
||||
#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852)
|
||||
#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853)
|
||||
#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854)
|
||||
#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855)
|
||||
#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856)
|
||||
#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857)
|
||||
#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858)
|
||||
#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859)
|
||||
#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860)
|
||||
#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861)
|
||||
#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862)
|
||||
#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863)
|
||||
#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864)
|
||||
#define DXFILEERR_BADFILE MAKE_DDHRESULT(865)
|
||||
#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866)
|
||||
#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867)
|
||||
#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868)
|
||||
#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869)
|
||||
#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870)
|
||||
#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871)
|
||||
#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872)
|
||||
#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873)
|
||||
#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874)
|
||||
#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875)
|
||||
#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#endif /* __WINE_DXFILE_H */
|
|
@ -2005,6 +2005,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
|
|||
11,,avifil32.dll,1
|
||||
11,,amstream.dll,1
|
||||
11,,comcat.dll,1
|
||||
11,,d3dxof.dll,1
|
||||
11,,ddraw.dll,1
|
||||
11,,devenum.dll,1
|
||||
11,,dinput.dll,1
|
||||
|
|
Loading…
Reference in New Issue