ReactOS  0.4.13-dev-479-gec9c8fd
d3dxof.c File Reference
#include "config.h"
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "d3dxof_private.h"
#include "dxfile.h"
#include <stdio.h>
Include dependency graph for d3dxof.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define TOKEN_DWORD   41
 
#define TOKEN_FLOAT   42
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3dxof)
 
 WINE_DECLARE_DEBUG_CHANNEL (d3dxof_dump)
 
static HRESULT IDirectXFileDataReferenceImpl_Create (IDirectXFileDataReferenceImpl **ppObj)
 
static HRESULT IDirectXFileEnumObjectImpl_Create (IDirectXFileEnumObjectImpl **ppObj)
 
static HRESULT IDirectXFileSaveObjectImpl_Create (IDirectXFileSaveObjectImpl **ppObj)
 
HRESULT IDirectXFileImpl_Create (IUnknown *pUnkOuter, LPVOID *ppObj)
 
static IDirectXFileImplimpl_from_IDirectXFile (IDirectXFile *iface)
 
static HRESULT WINAPI IDirectXFileImpl_QueryInterface (IDirectXFile *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IDirectXFileImpl_AddRef (IDirectXFile *iface)
 
static ULONG WINAPI IDirectXFileImpl_Release (IDirectXFile *iface)
 
static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject (IDirectXFile *iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT *ppEnumObj)
 
static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject (IDirectXFile *iface, LPCSTR szFileName, DXFILEFORMAT dwFileFormat, LPDIRECTXFILESAVEOBJECT *ppSaveObj)
 
static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates (IDirectXFile *iface, LPVOID pvData, DWORD cbSize)
 
static HRESULT IDirectXFileBinaryImpl_Create (IDirectXFileBinaryImpl **ppObj)
 
static IDirectXFileBinaryImplimpl_from_IDirectXFileBinary (IDirectXFileBinary *iface)
 
static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface (IDirectXFileBinary *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IDirectXFileBinaryImpl_AddRef (IDirectXFileBinary *iface)
 
static ULONG WINAPI IDirectXFileBinaryImpl_Release (IDirectXFileBinary *iface)
 
static HRESULT WINAPI IDirectXFileBinaryImpl_GetName (IDirectXFileBinary *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
 
static HRESULT WINAPI IDirectXFileBinaryImpl_GetId (IDirectXFileBinary *iface, LPGUID pGuid)
 
static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize (IDirectXFileBinary *iface, DWORD *pcbSize)
 
static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType (IDirectXFileBinary *iface, LPCSTR *pszMimeType)
 
static HRESULT WINAPI IDirectXFileBinaryImpl_Read (IDirectXFileBinary *iface, LPVOID pvData, DWORD cbSize, LPDWORD pcbRead)
 
static HRESULT IDirectXFileDataImpl_Create (IDirectXFileDataImpl **ppObj)
 
static IDirectXFileDataImplimpl_from_IDirectXFileData (IDirectXFileData *iface)
 
static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface (IDirectXFileData *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IDirectXFileDataImpl_AddRef (IDirectXFileData *iface)
 
static ULONG WINAPI IDirectXFileDataImpl_Release (IDirectXFileData *iface)
 
static HRESULT WINAPI IDirectXFileDataImpl_GetName (IDirectXFileData *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
 
static HRESULT WINAPI IDirectXFileDataImpl_GetId (IDirectXFileData *iface, LPGUID pGuid)
 
static HRESULT WINAPI IDirectXFileDataImpl_GetData (IDirectXFileData *iface, LPCSTR szMember, DWORD *pcbSize, void **ppvData)
 
static HRESULT WINAPI IDirectXFileDataImpl_GetType (IDirectXFileData *iface, const GUID **pguid)
 
static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject (IDirectXFileData *iface, LPDIRECTXFILEOBJECT *ppChildObj)
 
static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject (IDirectXFileData *iface, LPDIRECTXFILEDATA pDataObj)
 
static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference (IDirectXFileData *iface, LPCSTR szRef, const GUID *pguidRef)
 
static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject (IDirectXFileData *iface, LPCSTR szName, const GUID *pguid, LPCSTR szMimeType, LPVOID pvData, DWORD cbSize)
 
static IDirectXFileDataReferenceImplimpl_from_IDirectXFileDataReference (IDirectXFileDataReference *iface)
 
static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface (IDirectXFileDataReference *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef (IDirectXFileDataReference *iface)
 
static ULONG WINAPI IDirectXFileDataReferenceImpl_Release (IDirectXFileDataReference *iface)
 
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName (IDirectXFileDataReference *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
 
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId (IDirectXFileDataReference *iface, LPGUID pGuid)
 
static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve (IDirectXFileDataReference *iface, LPDIRECTXFILEDATA *ppDataObj)
 
static IDirectXFileEnumObjectImplimpl_from_IDirectXFileEnumObject (IDirectXFileEnumObject *iface)
 
static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface (IDirectXFileEnumObject *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef (IDirectXFileEnumObject *iface)
 
static ULONG WINAPI IDirectXFileEnumObjectImpl_Release (IDirectXFileEnumObject *iface)
 
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject (IDirectXFileEnumObject *iface, LPDIRECTXFILEDATA *ppDataObj)
 
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById (IDirectXFileEnumObject *iface, REFGUID rguid, LPDIRECTXFILEDATA *ppDataObj)
 
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName (IDirectXFileEnumObject *iface, LPCSTR szName, LPDIRECTXFILEDATA *ppDataObj)
 
static IDirectXFileSaveObjectImplimpl_from_IDirectXFileSaveObject (IDirectXFileSaveObject *iface)
 
static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface (IDirectXFileSaveObject *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef (IDirectXFileSaveObject *iface)
 
static ULONG WINAPI IDirectXFileSaveObjectImpl_Release (IDirectXFileSaveObject *iface)
 
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates (IDirectXFileSaveObject *iface, DWORD cTemplates, const GUID **ppguidTemplates)
 
static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject (IDirectXFileSaveObject *iface, REFGUID rguidTemplate, LPCSTR szName, const GUID *pguid, DWORD cbSize, LPVOID pvData, LPDIRECTXFILEDATA *ppDataObj)
 
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData (IDirectXFileSaveObject *iface, LPDIRECTXFILEDATA ppDataObj)
 

Variables

static const struct IDirectXFileVtbl IDirectXFile_Vtbl
 
static const struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl
 
static const struct IDirectXFileDataVtbl IDirectXFileData_Vtbl
 
static const struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl
 
static const struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl
 
static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file d3dxof.c.

◆ TOKEN_DWORD

#define TOKEN_DWORD   41

Definition at line 48 of file d3dxof.c.

◆ TOKEN_FLOAT

#define TOKEN_FLOAT   42

Definition at line 49 of file d3dxof.c.

Function Documentation

◆ IDirectXFileBinaryImpl_AddRef()

static ULONG WINAPI IDirectXFileBinaryImpl_AddRef ( IDirectXFileBinary *  iface)
static

Definition at line 412 of file d3dxof.c.

413 {
416 
417  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
418 
419  return ref;
420 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectXFileBinaryImpl_Create()

static HRESULT IDirectXFileBinaryImpl_Create ( IDirectXFileBinaryImpl **  ppObj)
static

Definition at line 365 of file d3dxof.c.

366 {
368 
369  TRACE("(%p)\n", ppObj);
370 
372  if (!object)
373  return DXFILEERR_BADALLOC;
374 
375  object->IDirectXFileBinary_iface.lpVtbl = &IDirectXFileBinary_Vtbl;
376  object->ref = 1;
377 
378  *ppObj = object;
379 
380  return DXFILE_OK;
381 }
#define DXFILE_OK
Definition: dxfile.h:268
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
static const struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl
Definition: d3dxof.c:38
void * object
Definition: jmemsys.h:48

Referenced by IDirectXFileDataImpl_GetNextObject().

◆ IDirectXFileBinaryImpl_GetId()

static HRESULT WINAPI IDirectXFileBinaryImpl_GetId ( IDirectXFileBinary *  iface,
LPGUID  pGuid 
)
static

Definition at line 446 of file d3dxof.c.

447 {
449 
450  FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid);
451 
452  return DXFILEERR_BADVALUE;
453 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IDirectXFileBinaryImpl_GetMimeType()

static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType ( IDirectXFileBinary *  iface,
LPCSTR pszMimeType 
)
static

Definition at line 465 of file d3dxof.c.

466 {
468 
469  FIXME("(%p/%p)->(%p) stub!\n", This, iface, pszMimeType);
470 
471  return DXFILEERR_BADVALUE;
472 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IDirectXFileBinaryImpl_GetName()

static HRESULT WINAPI IDirectXFileBinaryImpl_GetName ( IDirectXFileBinary *  iface,
LPSTR  pstrNameBuf,
LPDWORD  pdwBufLen 
)
static

Definition at line 436 of file d3dxof.c.

438 {
440 
441  FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen);
442 
443  return DXFILEERR_BADVALUE;
444 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IDirectXFileBinaryImpl_GetSize()

static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize ( IDirectXFileBinary *  iface,
DWORD pcbSize 
)
static

Definition at line 456 of file d3dxof.c.

457 {
459 
460  FIXME("(%p/%p)->(%p) stub!\n", This, iface, pcbSize);
461 
462  return DXFILEERR_BADVALUE;
463 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IDirectXFileBinaryImpl_QueryInterface()

static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface ( IDirectXFileBinary *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 389 of file d3dxof.c.

390 {
392 
393  TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
394 
396  || IsEqualGUID(riid, &IID_IDirectXFileObject)
397  || IsEqualGUID(riid, &IID_IDirectXFileBinary))
398  {
399  IUnknown_AddRef(iface);
400  *ppvObject = &This->IDirectXFileBinary_iface;
401  return S_OK;
402  }
403 
404  /* Do not print an error for interfaces that can be queried to retrieve the type of the object */
405  if (!IsEqualGUID(riid, &IID_IDirectXFileData)
406  && !IsEqualGUID(riid, &IID_IDirectXFileDataReference))
407  ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
408 
409  return E_NOINTERFACE;
410 }
#define E_NOINTERFACE
Definition: winerror.h:2364
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ IDirectXFileBinaryImpl_Read()

static HRESULT WINAPI IDirectXFileBinaryImpl_Read ( IDirectXFileBinary *  iface,
LPVOID  pvData,
DWORD  cbSize,
LPDWORD  pcbRead 
)
static

Definition at line 474 of file d3dxof.c.

475 {
477 
478  FIXME("(%p/%p)->(%p, %d, %p) stub!\n", This, iface, pvData, cbSize, pcbRead);
479 
480  return DXFILEERR_BADVALUE;
481 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3748

◆ IDirectXFileBinaryImpl_Release()

static ULONG WINAPI IDirectXFileBinaryImpl_Release ( IDirectXFileBinary *  iface)
static

Definition at line 422 of file d3dxof.c.

423 {
426 
427  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
428 
429  if (!ref)
431 
432  return ref;
433 }
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
Definition: d3dxof.c:383
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IDirectXFileDataImpl_AddBinaryObject()

static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject ( IDirectXFileData *  iface,
LPCSTR  szName,
const GUID pguid,
LPCSTR  szMimeType,
LPVOID  pvData,
DWORD  cbSize 
)
static

Definition at line 746 of file d3dxof.c.

747 {
749 
750  FIXME("(%p/%p)->(%s,%p,%s,%p,%d) stub!\n", This, iface, szName, pguid, szMimeType, pvData, cbSize);
751 
752  return DXFILEERR_BADVALUE;
753 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3748
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
static const WCHAR szName[]
Definition: msipriv.h:1194

◆ IDirectXFileDataImpl_AddDataObject()

static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject ( IDirectXFileData *  iface,
LPDIRECTXFILEDATA  pDataObj 
)
static

Definition at line 728 of file d3dxof.c.

729 {
731 
732  FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDataObj);
733 
734  return DXFILEERR_BADVALUE;
735 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513

◆ IDirectXFileDataImpl_AddDataReference()

static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference ( IDirectXFileData *  iface,
LPCSTR  szRef,
const GUID pguidRef 
)
static

Definition at line 737 of file d3dxof.c.

738 {
740 
741  FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szRef, pguidRef);
742 
743  return DXFILEERR_BADVALUE;
744 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FIXME(fmt,...)
Definition: debug.h:110
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513

◆ IDirectXFileDataImpl_AddRef()

static ULONG WINAPI IDirectXFileDataImpl_AddRef ( IDirectXFileData *  iface)
static

Definition at line 542 of file d3dxof.c.

543 {
546 
547  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
548 
549  return ref;
550 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectXFileDataImpl_Create()

static HRESULT IDirectXFileDataImpl_Create ( IDirectXFileDataImpl **  ppObj)
static

Definition at line 495 of file d3dxof.c.

496 {
498 
499  TRACE("(%p)\n", ppObj);
500 
502  if (!object)
503  return DXFILEERR_BADALLOC;
504 
505  object->IDirectXFileData_iface.lpVtbl = &IDirectXFileData_Vtbl;
506  object->ref = 1;
507 
508  *ppObj = object;
509 
510  return S_OK;
511 }
static const struct IDirectXFileDataVtbl IDirectXFileData_Vtbl
Definition: d3dxof.c:39
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
void * object
Definition: jmemsys.h:48

Referenced by IDirectXFileDataImpl_GetNextObject(), IDirectXFileDataReferenceImpl_Resolve(), and IDirectXFileEnumObjectImpl_GetNextDataObject().

◆ IDirectXFileDataImpl_GetData()

static HRESULT WINAPI IDirectXFileDataImpl_GetData ( IDirectXFileData *  iface,
LPCSTR  szMember,
DWORD pcbSize,
void **  ppvData 
)
static

Definition at line 619 of file d3dxof.c.

620 {
622 
623  TRACE("(%p/%p)->(%s,%p,%p)\n", This, iface, debugstr_a(szMember), pcbSize, ppvData);
624 
625  if (!pcbSize || !ppvData)
626  return DXFILEERR_BADVALUE;
627 
628  if (szMember)
629  {
630  ULONG i;
631  for (i = 0; i < This->pobj->nb_members; i++)
632  if (!strcmp(This->pobj->members[i].name, szMember))
633  break;
634  if (i == This->pobj->nb_members)
635  {
636  WARN("Unknown member '%s'\n", szMember);
638  }
639  *pcbSize = This->pobj->members[i].size;
640  *ppvData = This->pobj->root->pdata + This->pobj->members[i].start;
641  }
642  else
643  {
644  *pcbSize = This->pobj->size;
645  *ppvData = This->pobj->root->pdata + This->pobj->pos_data;
646  }
647 
648  return DXFILE_OK;
649 }
#define DXFILEERR_BADDATAREFERENCE
Definition: dxfile.h:289
#define WARN(fmt,...)
Definition: debug.h:111
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
unsigned int ULONG
Definition: retypes.h:1
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469

◆ IDirectXFileDataImpl_GetId()

static HRESULT WINAPI IDirectXFileDataImpl_GetId ( IDirectXFileData *  iface,
LPGUID  pGuid 
)
static

Definition at line 604 of file d3dxof.c.

605 {
607 
608  TRACE("(%p/%p)->(%p)\n", This, iface, pGuid);
609 
610  if (!pGuid)
611  return DXFILEERR_BADVALUE;
612 
613  *pGuid = This->pobj->class_id;
614 
615  return DXFILE_OK;
616 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4

◆ IDirectXFileDataImpl_GetName()

static HRESULT WINAPI IDirectXFileDataImpl_GetName ( IDirectXFileData *  iface,
LPSTR  pstrNameBuf,
LPDWORD  pdwBufLen 
)
static

Definition at line 577 of file d3dxof.c.

578 {
580  DWORD len;
581 
582  TRACE("(%p/%p)->(%p,%p)\n", This, iface, pstrNameBuf, pdwBufLen);
583 
584  if (!pdwBufLen)
585  return DXFILEERR_BADVALUE;
586 
587  len = strlen(This->pobj->name);
588  if (len)
589  len++;
590 
591  if (pstrNameBuf) {
592  if (*pdwBufLen < len)
593  return DXFILEERR_BADVALUE;
594  CopyMemory(pstrNameBuf, This->pobj->name, len);
595  /* Even if we return a size of 0, an empty string with a null byte must be returned */
596  if (*pdwBufLen && !len)
597  pstrNameBuf[0] = 0;
598  }
599  *pdwBufLen = len;
600 
601  return DXFILE_OK;
602 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4
#define CopyMemory
Definition: winbase.h:1633
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722

◆ IDirectXFileDataImpl_GetNextObject()

static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject ( IDirectXFileData *  iface,
LPDIRECTXFILEOBJECT ppChildObj 
)
static

Definition at line 667 of file d3dxof.c.

668 {
669  HRESULT hr;
671 
672  TRACE("(%p/%p)->(%p)\n", This, iface, ppChildObj);
673 
674  if (This->cur_enum_object >= This->pobj->nb_children)
675  {
676  *ppChildObj = NULL;
678  }
679 
680  if (This->from_ref && (This->level >= 1))
681  {
682  /* Only 2 levels can be enumerated if the object is obtained from a reference */
683  *ppChildObj = NULL;
685  }
686 
687  if (This->pobj->children[This->cur_enum_object]->binary)
688  {
690 
692  if (FAILED(hr))
693  return hr;
694 
695  *ppChildObj = (LPDIRECTXFILEOBJECT)&object->IDirectXFileBinary_iface;
696  }
697  else if (This->pobj->children[This->cur_enum_object]->ptarget)
698  {
700 
702  if (FAILED(hr))
703  return hr;
704 
705  object->ptarget = This->pobj->children[This->cur_enum_object++]->ptarget;
706 
707  *ppChildObj = (LPDIRECTXFILEOBJECT)&object->IDirectXFileDataReference_iface;
708  }
709  else
710  {
712 
713  hr = IDirectXFileDataImpl_Create(&object);
714  if (FAILED(hr))
715  return hr;
716 
717  object->pobj = This->pobj->children[This->cur_enum_object++];
718  object->cur_enum_object = 0;
719  object->from_ref = This->from_ref;
720  object->level = This->level + 1;
721 
722  *ppChildObj = (LPDIRECTXFILEOBJECT)&object->IDirectXFileData_iface;
723  }
724 
725  return DXFILE_OK;
726 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl **ppObj)
Definition: d3dxof.c:365
#define DXFILEERR_NOMOREOBJECTS
Definition: dxfile.h:291
#define DXFILE_OK
Definition: dxfile.h:268
smooth NULL
Definition: ftsmooth.c:416
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
struct IDirectXFileObject * LPDIRECTXFILEOBJECT
Definition: dxfile.h:57
static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl **ppObj)
Definition: d3dxof.c:495
void * object
Definition: jmemsys.h:48
static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl **ppObj)
Definition: d3dxof.c:770

◆ IDirectXFileDataImpl_GetType()

static HRESULT WINAPI IDirectXFileDataImpl_GetType ( IDirectXFileData *  iface,
const GUID **  pguid 
)
static

Definition at line 651 of file d3dxof.c.

652 {
654  static GUID guid;
655 
656  TRACE("(%p/%p)->(%p)\n", This, iface, pguid);
657 
658  if (!pguid)
659  return DXFILEERR_BADVALUE;
660 
661  guid = This->pobj->type;
662  *pguid = &guid;
663 
664  return DXFILE_OK;
665 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
const GUID * guid
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4

◆ IDirectXFileDataImpl_QueryInterface()

static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface ( IDirectXFileData *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 519 of file d3dxof.c.

520 {
522 
523  TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
524 
526  || IsEqualGUID(riid, &IID_IDirectXFileObject)
527  || IsEqualGUID(riid, &IID_IDirectXFileData))
528  {
529  IUnknown_AddRef(iface);
530  *ppvObject = &This->IDirectXFileData_iface;
531  return S_OK;
532  }
533 
534  /* Do not print an error for interfaces that can be queried to retrieve the type of the object */
535  if (!IsEqualGUID(riid, &IID_IDirectXFileBinary)
536  && !IsEqualGUID(riid, &IID_IDirectXFileDataReference))
537  ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
538 
539  return E_NOINTERFACE;
540 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ IDirectXFileDataImpl_Release()

static ULONG WINAPI IDirectXFileDataImpl_Release ( IDirectXFileData *  iface)
static

Definition at line 552 of file d3dxof.c.

553 {
556 
557  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
558 
559  if (!ref)
560  {
561  if (!This->level && !This->from_ref)
562  {
563  HeapFree(GetProcessHeap(), 0, This->pstrings);
564  if (This->pobj)
565  {
566  HeapFree(GetProcessHeap(), 0, This->pobj->pdata);
567  HeapFree(GetProcessHeap(), 0, This->pobj);
568  }
569  }
571  }
572 
573  return ref;
574 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
Definition: d3dxof.c:513
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IDirectXFileDataReferenceImpl_AddRef()

static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef ( IDirectXFileDataReference *  iface)
static

Definition at line 817 of file d3dxof.c.

818 {
821 
822  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
823 
824  return ref;
825 }
Definition: send.c:47
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
Definition: d3dxof.c:788
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectXFileDataReferenceImpl_Create()

static HRESULT IDirectXFileDataReferenceImpl_Create ( IDirectXFileDataReferenceImpl **  ppObj)
static

Definition at line 770 of file d3dxof.c.

771 {
773 
774  TRACE("(%p)\n", ppObj);
775 
777  if (!object)
778  return DXFILEERR_BADALLOC;
779 
780  object->IDirectXFileDataReference_iface.lpVtbl = &IDirectXFileDataReference_Vtbl;
781  object->ref = 1;
782 
783  *ppObj = object;
784 
785  return S_OK;
786 }
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
static const struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl
Definition: d3dxof.c:40
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
void * object
Definition: jmemsys.h:48

Referenced by IDirectXFileDataImpl_GetNextObject().

◆ IDirectXFileDataReferenceImpl_GetId()

static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId ( IDirectXFileDataReference *  iface,
LPGUID  pGuid 
)
static

Definition at line 868 of file d3dxof.c.

869 {
871 
872  TRACE("(%p/%p)->(%p)\n", This, iface, pGuid);
873 
874  if (!pGuid)
875  return DXFILEERR_BADVALUE;
876 
877  *pGuid = This->ptarget->class_id;
878 
879  return DXFILE_OK;
880 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
Definition: d3dxof.c:788
#define TRACE(s)
Definition: solgame.cpp:4

◆ IDirectXFileDataReferenceImpl_GetName()

static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName ( IDirectXFileDataReference *  iface,
LPSTR  pstrNameBuf,
LPDWORD  pdwBufLen 
)
static

Definition at line 841 of file d3dxof.c.

842 {
844  DWORD len;
845 
846  TRACE("(%p/%p)->(%p,%p)\n", This, iface, pstrNameBuf, pdwBufLen);
847 
848  if (!pdwBufLen)
849  return DXFILEERR_BADVALUE;
850 
851  len = strlen(This->ptarget->name);
852  if (len)
853  len++;
854 
855  if (pstrNameBuf) {
856  if (*pdwBufLen < len)
857  return DXFILEERR_BADVALUE;
858  CopyMemory(pstrNameBuf, This->ptarget->name, len);
859  /* Even if we return a size of 0, an empty string with a null byte must be returned */
860  if (*pdwBufLen && !len)
861  pstrNameBuf[0] = 0;
862  }
863  *pdwBufLen = len;
864 
865  return DXFILE_OK;
866 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
Definition: d3dxof.c:788
#define TRACE(s)
Definition: solgame.cpp:4
#define CopyMemory
Definition: winbase.h:1633
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722

◆ IDirectXFileDataReferenceImpl_QueryInterface()

static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface ( IDirectXFileDataReference *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 794 of file d3dxof.c.

795 {
797 
798  TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
799 
801  || IsEqualGUID(riid, &IID_IDirectXFileObject)
802  || IsEqualGUID(riid, &IID_IDirectXFileDataReference))
803  {
804  IUnknown_AddRef(iface);
805  *ppvObject = &This->IDirectXFileDataReference_iface;
806  return S_OK;
807  }
808 
809  /* Do not print an error for interfaces that can be queried to retrieve the type of the object */
810  if (!IsEqualGUID(riid, &IID_IDirectXFileData)
811  && !IsEqualGUID(riid, &IID_IDirectXFileBinary))
812  ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
813 
814  return E_NOINTERFACE;
815 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
Definition: d3dxof.c:788
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ IDirectXFileDataReferenceImpl_Release()

static ULONG WINAPI IDirectXFileDataReferenceImpl_Release ( IDirectXFileDataReference *  iface)
static

Definition at line 827 of file d3dxof.c.

828 {
831 
832  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
833 
834  if (!ref)
836 
837  return ref;
838 }
Definition: send.c:47
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
Definition: d3dxof.c:788
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IDirectXFileDataReferenceImpl_Resolve()

static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve ( IDirectXFileDataReference *  iface,
LPDIRECTXFILEDATA ppDataObj 
)
static

Definition at line 883 of file d3dxof.c.

884 {
887  HRESULT hr;
888 
889  TRACE("(%p/%p)->(%p)\n", This, iface, ppDataObj);
890 
891  if (!ppDataObj)
892  return DXFILEERR_BADVALUE;
893 
894  hr = IDirectXFileDataImpl_Create(&object);
895  if (FAILED(hr))
896  return hr;
897 
898  object->pobj = This->ptarget;
899  object->cur_enum_object = 0;
900  object->level = 0;
901  object->from_ref = TRUE;
902 
903  *ppDataObj = &object->IDirectXFileData_iface;
904 
905  return DXFILE_OK;
906 }
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILE_OK
Definition: dxfile.h:268
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
Definition: d3dxof.c:788
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl **ppObj)
Definition: d3dxof.c:495
void * object
Definition: jmemsys.h:48

◆ IDirectXFileEnumObjectImpl_AddRef()

static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef ( IDirectXFileEnumObject *  iface)
static

Definition at line 960 of file d3dxof.c.

961 {
964 
965  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
966 
967  return ref;
968 }
Definition: send.c:47
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:936
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectXFileEnumObjectImpl_Create()

static HRESULT IDirectXFileEnumObjectImpl_Create ( IDirectXFileEnumObjectImpl **  ppObj)
static

Definition at line 918 of file d3dxof.c.

919 {
921 
922  TRACE("(%p)\n", ppObj);
923 
925  if (!object)
926  return DXFILEERR_BADALLOC;
927 
928  object->IDirectXFileEnumObject_iface.lpVtbl = &IDirectXFileEnumObject_Vtbl;
929  object->ref = 1;
930 
931  *ppObj = object;
932 
933  return S_OK;
934 }
static const struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl
Definition: d3dxof.c:41
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
void * object
Definition: jmemsys.h:48

Referenced by IDirectXFileImpl_CreateEnumObject().

◆ IDirectXFileEnumObjectImpl_GetDataObjectById()

static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById ( IDirectXFileEnumObject *  iface,
REFGUID  rguid,
LPDIRECTXFILEDATA ppDataObj 
)
static

Definition at line 1075 of file d3dxof.c.

1076 {
1078 
1079  FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, rguid, ppDataObj);
1080 
1081  return DXFILEERR_BADVALUE;
1082 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:936
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IDirectXFileEnumObjectImpl_GetDataObjectByName()

static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName ( IDirectXFileEnumObject *  iface,
LPCSTR  szName,
LPDIRECTXFILEDATA ppDataObj 
)
static

Definition at line 1084 of file d3dxof.c.

1085 {
1087 
1088  FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szName, ppDataObj);
1089 
1090  return DXFILEERR_BADVALUE;
1091 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:936
#define FIXME(fmt,...)
Definition: debug.h:110
static const WCHAR szName[]
Definition: msipriv.h:1194

◆ IDirectXFileEnumObjectImpl_GetNextDataObject()

static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject ( IDirectXFileEnumObject *  iface,
LPDIRECTXFILEDATA ppDataObj 
)
static

Definition at line 992 of file d3dxof.c.

993 {
996  HRESULT hr;
997 
998  if (!ppDataObj)
999  return E_POINTER;
1000 
1001  *ppDataObj = NULL;
1002 
1003  TRACE("(%p/%p)->(%p)\n", This, iface, ppDataObj);
1004 
1005  if (This->nb_xobjects >= MAX_OBJECTS)
1006  {
1007  ERR("Too many objects\n");
1008  return DXFILEERR_NOMOREOBJECTS;
1009  }
1010 
1011  /* Check if there are templates defined before the object */
1012  if (!parse_templates(&This->buf, TRUE))
1013  return DXFILEERR_PARSEERROR;
1014 
1015  if (!This->buf.rem_bytes)
1016  return DXFILEERR_NOMOREOBJECTS;
1017 
1018  hr = IDirectXFileDataImpl_Create(&object);
1019  if (FAILED(hr))
1020  return hr;
1021 
1022  object->pobj = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS);
1023  if (!object->pobj)
1024  {
1026  goto error;
1027  }
1028 
1029  object->pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER);
1030  if (!object->pstrings)
1031  {
1033  goto error;
1034  }
1035 
1036  object->cur_enum_object = 0;
1037  object->level = 0;
1038  object->from_ref = FALSE;
1039 
1040  This->buf.pxo_globals = This->xobjects;
1041  This->buf.nb_pxo_globals = This->nb_xobjects;
1042  This->buf.level = 0;
1043  This->buf.pdata = NULL;
1044  This->buf.capacity = 0;
1045  This->buf.cur_pos_data = 0;
1046  This->buf.cur_pstrings = This->buf.pstrings = object->pstrings;
1047  This->buf.pxo = This->xobjects[This->nb_xobjects] = This->buf.pxo_tab = object->pobj;
1048  This->buf.pxo->pdata = NULL;
1049  This->buf.pxo->nb_subobjects = 1;
1050 
1051  if (!parse_object(&This->buf))
1052  {
1053  WARN("Object is not correct\n");
1055  goto error;
1056  }
1057 
1058  *ppDataObj = &object->IDirectXFileData_iface;
1059 
1060  /* Get a reference to created object */
1061  This->pRefObjects[This->nb_xobjects] = &object->IDirectXFileData_iface;
1062  IDirectXFileData_AddRef(This->pRefObjects[This->nb_xobjects]);
1063 
1064  This->nb_xobjects++;
1065 
1066  return DXFILE_OK;
1067 
1068 error:
1069 
1070  IDirectXFileData_Release(&object->IDirectXFileData_iface);
1071 
1072  return hr;
1073 }
#define MAX_STRINGS_BUFFER
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
#define IDirectXFileData_Release(p)
Definition: dxfile.h:185
#define IDirectXFileData_AddRef(p)
Definition: dxfile.h:184
#define WARN(fmt,...)
Definition: debug.h:111
#define DXFILEERR_NOMOREOBJECTS
Definition: dxfile.h:291
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:936
#define DXFILE_OK
Definition: dxfile.h:268
#define DXFILEERR_PARSEERROR
Definition: dxfile.h:286
smooth NULL
Definition: ftsmooth.c:416
BOOL parse_templates(parse_buffer *buf, BOOL templates_only) DECLSPEC_HIDDEN
Definition: parsing.c:1099
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
#define MAX_SUBOBJECTS
#define MAX_OBJECTS
#define ERR(fmt,...)
Definition: debug.h:109
static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl **ppObj)
Definition: d3dxof.c:495
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
BOOL parse_object(parse_buffer *buf) DECLSPEC_HIDDEN
Definition: parsing.c:1380
#define E_POINTER
Definition: winerror.h:2365
void * object
Definition: jmemsys.h:48

◆ IDirectXFileEnumObjectImpl_QueryInterface()

static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface ( IDirectXFileEnumObject *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 942 of file d3dxof.c.

943 {
945 
946  TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
947 
949  || IsEqualGUID(riid, &IID_IDirectXFileEnumObject))
950  {
951  IUnknown_AddRef(iface);
952  *ppvObject = &This->IDirectXFileEnumObject_iface;
953  return S_OK;
954  }
955 
956  ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
957  return E_NOINTERFACE;
958 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:936
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ IDirectXFileEnumObjectImpl_Release()

static ULONG WINAPI IDirectXFileEnumObjectImpl_Release ( IDirectXFileEnumObject *  iface)
static

Definition at line 970 of file d3dxof.c.

971 {
974 
975  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
976 
977  if (!ref)
978  {
979  ULONG i;
980  for (i = 0; i < This->nb_xobjects; i++)
981  IDirectXFileData_Release(This->pRefObjects[i]);
982  if (This->mapped_memory)
983  UnmapViewOfFile(This->mapped_memory);
984  HeapFree(GetProcessHeap(), 0, This->decomp_buffer);
986  }
987 
988  return ref;
989 }
#define IDirectXFileData_Release(p)
Definition: dxfile.h:185
Definition: send.c:47
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:936
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define UnmapViewOfFile
Definition: compat.h:403
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IDirectXFileImpl_AddRef()

static ULONG WINAPI IDirectXFileImpl_AddRef ( IDirectXFile *  iface)
static

Definition at line 104 of file d3dxof.c.

105 {
108 
109  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
110 
111  return ref;
112 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
Definition: d3dxof.c:80
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectXFileImpl_Create()

HRESULT IDirectXFileImpl_Create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 51 of file d3dxof.c.

52 {
54 
55  TRACE("(%p,%p)\n", pUnkOuter, ppObj);
56 
58  if (!object)
59  return DXFILEERR_BADALLOC;
60 
61  object->IDirectXFile_iface.lpVtbl = &IDirectXFile_Vtbl;
62  object->ref = 1;
63 
64  /* Reserve first template to handle the case sensitive legacy type indexColor */
65  object->nb_xtemplates = 1;
66  strcpy(object->xtemplates[0].name, "indexColor");
67  object->xtemplates[0].nb_members = 2;
68  object->xtemplates[0].members[0].type = TOKEN_DWORD;
69  object->xtemplates[0].members[0].nb_dims = 0;
70  object->xtemplates[0].members[1].type = TOKEN_FLOAT;
71  object->xtemplates[0].members[1].nb_dims = 1;
72  object->xtemplates[0].members[1].dim_fixed[0] = TRUE;
73  object->xtemplates[0].members[1].dim_value[0] = 4;
74 
75  *ppObj = &object->IDirectXFile_iface;
76 
77  return S_OK;
78 }
#define TRUE
Definition: types.h:120
static const struct IDirectXFileVtbl IDirectXFile_Vtbl
Definition: d3dxof.c:37
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define TOKEN_DWORD
Definition: d3dxof.c:48
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
void * object
Definition: jmemsys.h:48
#define TOKEN_FLOAT
Definition: d3dxof.c:49

Referenced by DirectXFileCreate().

◆ IDirectXFileImpl_CreateEnumObject()

static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject ( IDirectXFile *  iface,
LPVOID  pvSource,
DXFILELOADOPTIONS  dwLoadOptions,
LPDIRECTXFILEENUMOBJECT ppEnumObj 
)
static

Definition at line 128 of file d3dxof.c.

129 {
132  HRESULT hr;
135  DWORD bytes_written;
136 
137  TRACE("(%p/%p)->(%p,%x,%p)\n", This, iface, pvSource, dwLoadOptions, ppEnumObj);
138 
139  if (!ppEnumObj)
140  return DXFILEERR_BADVALUE;
141 
142  /* Only lowest 4 bits are relevant in DXFILELOADOPTIONS */
143  dwLoadOptions &= 0xF;
144 
146  if (FAILED(hr))
147  return hr;
148 
149  if (dwLoadOptions == DXFILELOAD_FROMFILE)
150  {
151  HANDLE hFile, file_mapping;
152 
153  TRACE("Open source file '%s'\n", (char*)pvSource);
154 
157  {
158  TRACE("File '%s' not found\n", (char*)pvSource);
159  return DXFILEERR_FILENOTFOUND;
160  }
161 
163 
164  file_mapping = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
166  if (!file_mapping)
167  {
169  goto error;
170  }
171 
172  object->mapped_memory = MapViewOfFile(file_mapping, FILE_MAP_READ, 0, 0, 0);
173  CloseHandle(file_mapping);
174  if (!object->mapped_memory)
175  {
177  goto error;
178  }
179  file_buffer = object->mapped_memory;
180  }
181  else if (dwLoadOptions == DXFILELOAD_FROMRESOURCE)
182  {
183  HRSRC resource_info;
185  LPDXFILELOADRESOURCE lpdxflr = pvSource;
186 
187  TRACE("Source in resource (module = %p, name = %s, type = %s)\n", lpdxflr->hModule, debugstr_a(lpdxflr->lpName), debugstr_a(lpdxflr->lpType));
188 
189  resource_info = FindResourceA(lpdxflr->hModule, lpdxflr->lpName, lpdxflr->lpType);
190  if (!resource_info)
191  {
193  goto error;
194  }
195 
196  file_size = SizeofResource(lpdxflr->hModule, resource_info);
197 
198  resource_data = LoadResource(lpdxflr->hModule, resource_info);
199  if (!resource_data)
200  {
202  goto error;
203  }
204 
206  if (!file_buffer)
207  {
209  goto error;
210  }
211  }
212  else if (dwLoadOptions == DXFILELOAD_FROMMEMORY)
213  {
214  LPDXFILELOADMEMORY lpdxflm = pvSource;
215 
216  TRACE("Source in memory at %p with size %d\n", lpdxflm->lpMemory, lpdxflm->dSize);
217 
218  file_buffer = lpdxflm->lpMemory;
219  file_size = lpdxflm->dSize;
220  }
221  else
222  {
223  FIXME("Source type %d is not handled yet\n", dwLoadOptions);
225  goto error;
226  }
227 
228  TRACE("File size is %d bytes\n", file_size);
229 
230  if (TRACE_ON(d3dxof_dump))
231  {
232  static USHORT num;
233  char tmp[12];
234  HANDLE file;
235  sprintf(tmp, "file%05u.x", num++);
236 
238  if (file != INVALID_HANDLE_VALUE)
239  {
240  WriteFile(file, file_buffer, file_size, &bytes_written, NULL);
241  CloseHandle(file);
242  }
243  }
244 
245  object->pDirectXFile = This;
246 
247  object->buf.pdxf = This;
248  object->buf.token_present = FALSE;
249  object->buf.buffer = file_buffer;
250  object->buf.rem_bytes = file_size;
251  hr = parse_header(&object->buf, &object->decomp_buffer);
252  if (FAILED(hr))
253  goto error;
254 
255  /* Check if there are templates defined before the object */
256  if (!parse_templates(&object->buf, TRUE))
257  {
259  goto error;
260  }
261 
262  if (TRACE_ON(d3dxof))
263  {
264  ULONG i;
265  TRACE("Registered templates (%d):\n", This->nb_xtemplates);
266  for (i = 1; i < This->nb_xtemplates; i++)
267  DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
268  }
269 
270  *ppEnumObj = &object->IDirectXFileEnumObject_iface;
271 
272  return DXFILE_OK;
273 
274 error:
275  IDirectXFileEnumObject_Release(&object->IDirectXFileEnumObject_iface);
276  *ppEnumObj = NULL;
277 
278  return hr;
279 }
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define DXFILEERR_FILENOTFOUND
Definition: dxfile.h:277
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define MapViewOfFile
Definition: compat.h:402
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
#define IDirectXFileEnumObject_Release(p)
Definition: dxfile.h:107
LPVOID lpMemory
Definition: dxfile.h:50
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define DXFILEERR_BADFILETYPE
Definition: dxfile.h:281
#define FILE_SHARE_READ
Definition: compat.h:125
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define DXFILELOAD_FROMFILE
Definition: dxfile.h:37
#define DXFILE_OK
Definition: dxfile.h:268
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned char * LPBYTE
Definition: typedefs.h:52
#define GENERIC_WRITE
Definition: nt_native.h:90
#define FIXME(fmt,...)
Definition: debug.h:110
HMODULE hModule
Definition: dxfile.h:44
#define DXFILEERR_BADRESOURCE
Definition: dxfile.h:280
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
#define DXFILEERR_PARSEERROR
Definition: dxfile.h:286
smooth NULL
Definition: ftsmooth.c:416
BOOL parse_templates(parse_buffer *buf, BOOL templates_only) DECLSPEC_HIDDEN
Definition: parsing.c:1099
#define FILE_MAP_READ
Definition: compat.h:427
static char * file_buffer
Definition: regtests2xml.c:46
#define debugstr_guid
Definition: kernel32.h:35
#define OPEN_EXISTING
Definition: compat.h:426
HRESULT parse_header(parse_buffer *buf, BYTE **decomp_buffer_ptr) DECLSPEC_HIDDEN
Definition: parsing.c:185
#define DXFILEERR_RESOURCENOTFOUND
Definition: dxfile.h:278
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LONG HRESULT
Definition: typedefs.h:77
const char file[]
Definition: icontest.c:11
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint num
Definition: glext.h:9618
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:481
#define GENERIC_READ
Definition: compat.h:124
#define DXFILEERR_NOTDONEYET
Definition: dxfile.h:276
#define DXFILELOAD_FROMRESOURCE
Definition: dxfile.h:38
_In_ HANDLE hFile
Definition: mswsock.h:90
#define CREATE_ALWAYS
Definition: disk.h:72
unsigned short USHORT
Definition: pedump.c:61
#define DPRINTF
Definition: debug.h:413
#define PAGE_READONLY
Definition: compat.h:127
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
Definition: d3dxof.c:80
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
unsigned int ULONG
Definition: retypes.h:1
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399
static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl **ppObj)
Definition: d3dxof.c:918
#define TRACE_ON(x)
Definition: compat.h:65
void * object
Definition: jmemsys.h:48
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
#define file_size(inode)
Definition: reiserfs_fs.h:1869
Definition: fci.c:126
#define DXFILELOAD_FROMMEMORY
Definition: dxfile.h:39

◆ IDirectXFileImpl_CreateSaveObject()

static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject ( IDirectXFile *  iface,
LPCSTR  szFileName,
DXFILEFORMAT  dwFileFormat,
LPDIRECTXFILESAVEOBJECT ppSaveObj 
)
static

Definition at line 281 of file d3dxof.c.

282 {
285  HRESULT hr;
286 
287  FIXME("(%p/%p)->(%s,%x,%p) partial stub!\n", This, iface, szFileName, dwFileFormat, ppSaveObj);
288 
289  if (!szFileName || !ppSaveObj)
290  return E_POINTER;
291 
293  if (SUCCEEDED(hr))
294  *ppSaveObj = &object->IDirectXFileSaveObject_iface;
295  return hr;
296 }
HRESULT hr
Definition: shlfolder.c:183
#define FIXME(fmt,...)
Definition: debug.h:110
LONG HRESULT
Definition: typedefs.h:77
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
Definition: d3dxof.c:80
#define E_POINTER
Definition: winerror.h:2365
static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl **ppObj)
Definition: d3dxof.c:1103
void * object
Definition: jmemsys.h:48
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ IDirectXFileImpl_QueryInterface()

static HRESULT WINAPI IDirectXFileImpl_QueryInterface ( IDirectXFile *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 86 of file d3dxof.c.

87 {
89 
90  TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
91 
93  || IsEqualGUID(riid, &IID_IDirectXFile))
94  {
95  IUnknown_AddRef(iface);
96  *ppvObject = &This->IDirectXFile_iface;
97  return S_OK;
98  }
99 
100  ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
101  return E_NOINTERFACE;
102 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
Definition: d3dxof.c:80

◆ IDirectXFileImpl_RegisterTemplates()

static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates ( IDirectXFile *  iface,
LPVOID  pvData,
DWORD  cbSize 
)
static

Definition at line 298 of file d3dxof.c.

299 {
302  HRESULT hr;
303  LPBYTE decomp_buffer = NULL;
304  DWORD bytes_written;
305 
306  ZeroMemory(&buf, sizeof(buf));
307  buf.buffer = pvData;
308  buf.rem_bytes = cbSize;
309  buf.pdxf = This;
310 
311  TRACE("(%p/%p)->(%p,%d)\n", This, iface, pvData, cbSize);
312 
313  if (!pvData)
314  return DXFILEERR_BADVALUE;
315 
316  if (TRACE_ON(d3dxof_dump))
317  {
318  static USHORT num;
319  char tmp[16];
320  HANDLE file;
321  sprintf(tmp, "template%05u.x", num++);
322 
324  if (file != INVALID_HANDLE_VALUE)
325  {
326  WriteFile(file, pvData, cbSize, &bytes_written, NULL);
327  CloseHandle(file);
328  }
329  }
330 
331  hr = parse_header(&buf, &decomp_buffer);
332  if (FAILED(hr))
333  goto cleanup;
334 
335  if (!parse_templates(&buf, FALSE))
336  {
338  goto cleanup;
339  }
340 
341  if (TRACE_ON(d3dxof))
342  {
343  ULONG i;
344  TRACE("Registered templates (%d):\n", This->nb_xtemplates);
345  for (i = 1; i < This->nb_xtemplates; i++)
346  DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
347  }
348 
349  hr = DXFILE_OK;
350 cleanup:
351  HeapFree(GetProcessHeap(), 0, decomp_buffer);
352  return hr;
353 }
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define CloseHandle
Definition: compat.h:398
HRESULT hr
Definition: shlfolder.c:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
#define ZeroMemory
Definition: winbase.h:1635
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
#define FILE_SHARE_READ
Definition: compat.h:125
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define DXFILE_OK
Definition: dxfile.h:268
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned char * LPBYTE
Definition: typedefs.h:52
#define GENERIC_WRITE
Definition: nt_native.h:90
#define DXFILEERR_PARSEERROR
Definition: dxfile.h:286
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3748
smooth NULL
Definition: ftsmooth.c:416
BOOL parse_templates(parse_buffer *buf, BOOL templates_only) DECLSPEC_HIDDEN
Definition: parsing.c:1099
#define debugstr_guid
Definition: kernel32.h:35
HRESULT parse_header(parse_buffer *buf, BYTE **decomp_buffer_ptr) DECLSPEC_HIDDEN
Definition: parsing.c:185
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
LONG HRESULT
Definition: typedefs.h:77
const char file[]
Definition: icontest.c:11
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint num
Definition: glext.h:9618
#define CREATE_ALWAYS
Definition: disk.h:72
unsigned short USHORT
Definition: pedump.c:61
#define DPRINTF
Definition: debug.h:413
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
Definition: d3dxof.c:80
unsigned int ULONG
Definition: retypes.h:1
char * cleanup(char *str)
Definition: wpickclick.c:99
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399
#define TRACE_ON(x)
Definition: compat.h:65
#define HeapFree(x, y, z)
Definition: compat.h:394
Definition: fci.c:126

◆ IDirectXFileImpl_Release()

static ULONG WINAPI IDirectXFileImpl_Release ( IDirectXFile *  iface)
static

Definition at line 114 of file d3dxof.c.

115 {
118 
119  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
120 
121  if (!ref)
123 
124  return ref;
125 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
Definition: d3dxof.c:80
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IDirectXFileSaveObjectImpl_AddRef()

static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef ( IDirectXFileSaveObject *  iface)
static

Definition at line 1145 of file d3dxof.c.

1146 {
1149 
1150  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
1151 
1152  return ref;
1153 }
Definition: send.c:47
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1121
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IDirectXFileSaveObjectImpl_Create()

static HRESULT IDirectXFileSaveObjectImpl_Create ( IDirectXFileSaveObjectImpl **  ppObj)
static

Definition at line 1103 of file d3dxof.c.

1104 {
1106 
1107  TRACE("(%p)\n", ppObj);
1108 
1110  if (!object)
1111  return DXFILEERR_BADALLOC;
1112 
1113  object->IDirectXFileSaveObject_iface.lpVtbl = &IDirectXFileSaveObject_Vtbl;
1114  object->ref = 1;
1115 
1116  *ppObj = object;
1117 
1118  return S_OK;
1119 }
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl
Definition: d3dxof.c:42
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DXFILEERR_BADALLOC
Definition: dxfile.h:274
void * object
Definition: jmemsys.h:48

Referenced by IDirectXFileImpl_CreateSaveObject().

◆ IDirectXFileSaveObjectImpl_CreateDataObject()

static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject ( IDirectXFileSaveObject *  iface,
REFGUID  rguidTemplate,
LPCSTR  szName,
const GUID pguid,
DWORD  cbSize,
LPVOID  pvData,
LPDIRECTXFILEDATA ppDataObj 
)
static

Definition at line 1177 of file d3dxof.c.

1178 {
1180 
1181  FIXME("(%p/%p)->(%p,%s,%p,%d,%p,%p) stub!\n", This, iface, rguidTemplate, szName, pguid, cbSize, pvData, ppDataObj);
1182 
1183  return DXFILEERR_BADVALUE;
1184 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1121
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3748
static const WCHAR szName[]
Definition: msipriv.h:1194

◆ IDirectXFileSaveObjectImpl_QueryInterface()

static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface ( IDirectXFileSaveObject *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1127 of file d3dxof.c.

1128 {
1130 
1131  TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
1132 
1134  || IsEqualGUID(riid, &IID_IDirectXFileSaveObject))
1135  {
1136  IUnknown_AddRef(iface);
1137  *ppvObject = &This->IDirectXFileSaveObject_iface;
1138  return S_OK;
1139  }
1140 
1141  ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
1142  return E_NOINTERFACE;
1143 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1121
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ IDirectXFileSaveObjectImpl_Release()

static ULONG WINAPI IDirectXFileSaveObjectImpl_Release ( IDirectXFileSaveObject *  iface)
static

Definition at line 1155 of file d3dxof.c.

1156 {
1159 
1160  TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
1161 
1162  if (!ref)
1163  HeapFree(GetProcessHeap(), 0, This);
1164 
1165  return ref;
1166 }
Definition: send.c:47
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1121
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IDirectXFileSaveObjectImpl_SaveData()

static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData ( IDirectXFileSaveObject *  iface,
LPDIRECTXFILEDATA  ppDataObj 
)
static

Definition at line 1186 of file d3dxof.c.

1187 {
1189 
1190  FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj);
1191 
1192  return DXFILEERR_BADVALUE;
1193 }
#define DXFILEERR_BADVALUE
Definition: dxfile.h:271
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1121
#define FIXME(fmt,...)
Definition: debug.h:110

◆ IDirectXFileSaveObjectImpl_SaveTemplates()

static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates ( IDirectXFileSaveObject *  iface,
DWORD  cTemplates,
const GUID **  ppguidTemplates 
)
static

Definition at line 1168 of file d3dxof.c.

1169 {
1171 
1172  FIXME("(%p/%p)->(%d,%p) stub!\n", This, iface, cTemplates, ppguidTemplates);
1173 
1174  return DXFILE_OK;
1175 }
#define DXFILE_OK
Definition: dxfile.h:268
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1121
#define FIXME(fmt,...)
Definition: debug.h:110

◆ impl_from_IDirectXFile()

static IDirectXFileImpl* impl_from_IDirectXFile ( IDirectXFile *  iface)
inlinestatic

Definition at line 80 of file d3dxof.c.

81 {
82  return CONTAINING_RECORD(iface, IDirectXFileImpl, IDirectXFile_iface);
83 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectXFileImpl_AddRef(), IDirectXFileImpl_CreateEnumObject(), IDirectXFileImpl_CreateSaveObject(), IDirectXFileImpl_QueryInterface(), IDirectXFileImpl_RegisterTemplates(), and IDirectXFileImpl_Release().

◆ impl_from_IDirectXFileBinary()

static IDirectXFileBinaryImpl* impl_from_IDirectXFileBinary ( IDirectXFileBinary *  iface)
inlinestatic

Definition at line 383 of file d3dxof.c.

384 {
385  return CONTAINING_RECORD(iface, IDirectXFileBinaryImpl, IDirectXFileBinary_iface);
386 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectXFileBinaryImpl_AddRef(), IDirectXFileBinaryImpl_GetId(), IDirectXFileBinaryImpl_GetMimeType(), IDirectXFileBinaryImpl_GetName(), IDirectXFileBinaryImpl_GetSize(), IDirectXFileBinaryImpl_QueryInterface(), IDirectXFileBinaryImpl_Read(), and IDirectXFileBinaryImpl_Release().

◆ impl_from_IDirectXFileData()

static IDirectXFileDataImpl* impl_from_IDirectXFileData ( IDirectXFileData *  iface)
inlinestatic

Definition at line 513 of file d3dxof.c.

514 {
515  return CONTAINING_RECORD(iface, IDirectXFileDataImpl, IDirectXFileData_iface);
516 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectXFileDataImpl_AddBinaryObject(), IDirectXFileDataImpl_AddDataObject(), IDirectXFileDataImpl_AddDataReference(), IDirectXFileDataImpl_AddRef(), IDirectXFileDataImpl_GetData(), IDirectXFileDataImpl_GetId(), IDirectXFileDataImpl_GetName(), IDirectXFileDataImpl_GetNextObject(), IDirectXFileDataImpl_GetType(), IDirectXFileDataImpl_QueryInterface(), and IDirectXFileDataImpl_Release().

◆ impl_from_IDirectXFileDataReference()

static IDirectXFileDataReferenceImpl* impl_from_IDirectXFileDataReference ( IDirectXFileDataReference *  iface)
inlinestatic

Definition at line 788 of file d3dxof.c.

789 {
790  return CONTAINING_RECORD(iface, IDirectXFileDataReferenceImpl, IDirectXFileDataReference_iface);
791 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectXFileDataReferenceImpl_AddRef(), IDirectXFileDataReferenceImpl_GetId(), IDirectXFileDataReferenceImpl_GetName(), IDirectXFileDataReferenceImpl_QueryInterface(), IDirectXFileDataReferenceImpl_Release(), and IDirectXFileDataReferenceImpl_Resolve().

◆ impl_from_IDirectXFileEnumObject()

static IDirectXFileEnumObjectImpl* impl_from_IDirectXFileEnumObject ( IDirectXFileEnumObject *  iface)
inlinestatic

Definition at line 936 of file d3dxof.c.

937 {
938  return CONTAINING_RECORD(iface, IDirectXFileEnumObjectImpl, IDirectXFileEnumObject_iface);
939 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectXFileEnumObjectImpl_AddRef(), IDirectXFileEnumObjectImpl_GetDataObjectById(), IDirectXFileEnumObjectImpl_GetDataObjectByName(), IDirectXFileEnumObjectImpl_GetNextDataObject(), IDirectXFileEnumObjectImpl_QueryInterface(), and IDirectXFileEnumObjectImpl_Release().

◆ impl_from_IDirectXFileSaveObject()

static IDirectXFileSaveObjectImpl* impl_from_IDirectXFileSaveObject ( IDirectXFileSaveObject *  iface)
inlinestatic

Definition at line 1121 of file d3dxof.c.

1122 {
1123  return CONTAINING_RECORD(iface, IDirectXFileSaveObjectImpl, IDirectXFileSaveObject_iface);
1124 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IDirectXFileSaveObjectImpl_AddRef(), IDirectXFileSaveObjectImpl_CreateDataObject(), IDirectXFileSaveObjectImpl_QueryInterface(), IDirectXFileSaveObjectImpl_Release(), IDirectXFileSaveObjectImpl_SaveData(), and IDirectXFileSaveObjectImpl_SaveTemplates().

◆ WINE_DECLARE_DEBUG_CHANNEL()

WINE_DECLARE_DEBUG_CHANNEL ( d3dxof_dump  )

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3dxof  )

Variable Documentation

◆ IDirectXFile_Vtbl

static const IDirectXFileVtbl IDirectXFile_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile *iface, LPVOID pvData, DWORD cbSize)
Definition: d3dxof.c:298
static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile *iface)
Definition: d3dxof.c:114
static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject(IDirectXFile *iface, LPCSTR szFileName, DXFILEFORMAT dwFileFormat, LPDIRECTXFILESAVEOBJECT *ppSaveObj)
Definition: d3dxof.c:281
static HRESULT WINAPI IDirectXFileImpl_QueryInterface(IDirectXFile *iface, REFIID riid, void **ppvObject)
Definition: d3dxof.c:86
static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile *iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT *ppEnumObj)
Definition: d3dxof.c:128
static ULONG WINAPI IDirectXFileImpl_AddRef(IDirectXFile *iface)
Definition: d3dxof.c:104

Definition at line 37 of file d3dxof.c.

Referenced by IDirectXFileImpl_Create().

◆ IDirectXFileBinary_Vtbl

static const IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType(IDirectXFileBinary *iface, LPCSTR *pszMimeType)
Definition: d3dxof.c:465
static HRESULT WINAPI IDirectXFileBinaryImpl_Read(IDirectXFileBinary *iface, LPVOID pvData, DWORD cbSize, LPDWORD pcbRead)
Definition: d3dxof.c:474
static ULONG WINAPI IDirectXFileBinaryImpl_AddRef(IDirectXFileBinary *iface)
Definition: d3dxof.c:412
static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface(IDirectXFileBinary *iface, REFIID riid, void **ppvObject)
Definition: d3dxof.c:389
static HRESULT WINAPI IDirectXFileBinaryImpl_GetId(IDirectXFileBinary *iface, LPGUID pGuid)
Definition: d3dxof.c:446
static ULONG WINAPI IDirectXFileBinaryImpl_Release(IDirectXFileBinary *iface)
Definition: d3dxof.c:422
static HRESULT WINAPI IDirectXFileBinaryImpl_GetName(IDirectXFileBinary *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
Definition: d3dxof.c:436
static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize(IDirectXFileBinary *iface, DWORD *pcbSize)
Definition: d3dxof.c:456

Definition at line 38 of file d3dxof.c.

Referenced by IDirectXFileBinaryImpl_Create().

◆ IDirectXFileData_Vtbl

static const IDirectXFileDataVtbl IDirectXFileData_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference(IDirectXFileData *iface, LPCSTR szRef, const GUID *pguidRef)
Definition: d3dxof.c:737
static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData *iface, LPGUID pGuid)
Definition: d3dxof.c:604
static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData *iface, LPDIRECTXFILEOBJECT *ppChildObj)
Definition: d3dxof.c:667
static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData *iface, LPDIRECTXFILEDATA pDataObj)
Definition: d3dxof.c:728
static ULONG WINAPI IDirectXFileDataImpl_AddRef(IDirectXFileData *iface)
Definition: d3dxof.c:542
static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
Definition: d3dxof.c:577
static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData *iface)
Definition: d3dxof.c:552
static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface(IDirectXFileData *iface, REFIID riid, void **ppvObject)
Definition: d3dxof.c:519
static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData *iface, const GUID **pguid)
Definition: d3dxof.c:651
static HRESULT WINAPI IDirectXFileDataImpl_GetData(IDirectXFileData *iface, LPCSTR szMember, DWORD *pcbSize, void **ppvData)
Definition: d3dxof.c:619
static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject(IDirectXFileData *iface, LPCSTR szName, const GUID *pguid, LPCSTR szMimeType, LPVOID pvData, DWORD cbSize)
Definition: d3dxof.c:746

Definition at line 39 of file d3dxof.c.

Referenced by IDirectXFileDataImpl_Create().

◆ IDirectXFileDataReference_Vtbl

static const IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataReference *iface, LPGUID pGuid)
Definition: d3dxof.c:868
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataReference *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
Definition: d3dxof.c:841
static ULONG WINAPI IDirectXFileDataReferenceImpl_Release(IDirectXFileDataReference *iface)
Definition: d3dxof.c:827
static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef(IDirectXFileDataReference *iface)
Definition: d3dxof.c:817
static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface(IDirectXFileDataReference *iface, REFIID riid, void **ppvObject)
Definition: d3dxof.c:794
static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataReference *iface, LPDIRECTXFILEDATA *ppDataObj)
Definition: d3dxof.c:883

Definition at line 40 of file d3dxof.c.

Referenced by IDirectXFileDataReferenceImpl_Create().

◆ IDirectXFileEnumObject_Vtbl

static const IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:960
static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject *iface)
Definition: d3dxof.c:970
static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface(IDirectXFileEnumObject *iface, REFIID riid, void **ppvObject)
Definition: d3dxof.c:942
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById(IDirectXFileEnumObject *iface, REFGUID rguid, LPDIRECTXFILEDATA *ppDataObj)
Definition: d3dxof.c:1075
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName(IDirectXFileEnumObject *iface, LPCSTR szName, LPDIRECTXFILEDATA *ppDataObj)
Definition: d3dxof.c:1084
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject *iface, LPDIRECTXFILEDATA *ppDataObj)
Definition: d3dxof.c:992

Definition at line 41 of file d3dxof.c.

Referenced by IDirectXFileEnumObjectImpl_Create().

◆ IDirectXFileSaveObject_Vtbl

static const IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject(IDirectXFileSaveObject *iface, REFGUID rguidTemplate, LPCSTR szName, const GUID *pguid, DWORD cbSize, LPVOID pvData, LPDIRECTXFILEDATA *ppDataObj)
Definition: d3dxof.c:1177
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates(IDirectXFileSaveObject *iface, DWORD cTemplates, const GUID **ppguidTemplates)
Definition: d3dxof.c:1168
static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1145
static ULONG WINAPI IDirectXFileSaveObjectImpl_Release(IDirectXFileSaveObject *iface)
Definition: d3dxof.c:1155
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData(IDirectXFileSaveObject *iface, LPDIRECTXFILEDATA ppDataObj)
Definition: d3dxof.c:1186
static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface(IDirectXFileSaveObject *iface, REFIID riid, void **ppvObject)
Definition: d3dxof.c:1127

Definition at line 42 of file d3dxof.c.

Referenced by IDirectXFileSaveObjectImpl_Create().