54 TRACE(
"(%p,%p)\n", pUnkOuter, ppObj);
64 object->nb_xtemplates = 1;
66 object->xtemplates[0].nb_members = 2;
67 object->xtemplates[0].members[0].type =
TOKEN_DWORD;
68 object->xtemplates[0].members[0].nb_dims = 0;
69 object->xtemplates[0].members[1].type =
TOKEN_FLOAT;
70 object->xtemplates[0].members[1].nb_dims = 1;
71 object->xtemplates[0].members[1].dim_fixed[0] =
TRUE;
72 object->xtemplates[0].members[1].dim_value[0] = 4;
74 *ppObj = &
object->IDirectXFile_iface;
94 IUnknown_AddRef(iface);
136 TRACE(
"(%p/%p)->(%p,%x,%p)\n",
This, iface, pvSource, dwLoadOptions, ppEnumObj);
142 dwLoadOptions &= 0xF;
152 TRACE(
"Open source file '%s'\n", (
char*)pvSource);
157 TRACE(
"File '%s' not found\n", (
char*)pvSource);
173 if (!
object->mapped_memory)
222 FIXME(
"Source type %d is not handled yet\n", dwLoadOptions);
244 object->pDirectXFile =
This;
246 object->buf.pdxf =
This;
247 object->buf.token_present =
FALSE;
264 TRACE(
"Registered templates (%d):\n",
This->nb_xtemplates);
265 for (
i = 1;
i <
This->nb_xtemplates;
i++)
269 *ppEnumObj = &
object->IDirectXFileEnumObject_iface;
286 FIXME(
"(%p/%p)->(%s,%x,%p) partial stub!\n",
This, iface, szFileName, dwFileFormat, ppSaveObj);
288 if (!szFileName || !ppSaveObj)
293 *ppSaveObj = &
object->IDirectXFileSaveObject_iface;
307 buf.rem_bytes = cbSize;
343 TRACE(
"Registered templates (%d):\n",
This->nb_xtemplates);
344 for (
i = 1;
i <
This->nb_xtemplates;
i++)
368 TRACE(
"(%p)\n", ppObj);
398 IUnknown_AddRef(iface);
440 FIXME(
"(%p/%p)->(%p,%p) stub!\n",
This, iface, pstrNameBuf, pdwBufLen);
449 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pGuid);
459 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pcbSize);
468 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pszMimeType);
477 FIXME(
"(%p/%p)->(%p, %d, %p) stub!\n",
This, iface,
pvData, cbSize, pcbRead);
498 TRACE(
"(%p)\n", ppObj);
528 IUnknown_AddRef(iface);
560 if (!
This->level && !
This->from_ref)
581 TRACE(
"(%p/%p)->(%p,%p)\n",
This, iface, pstrNameBuf, pdwBufLen);
591 if (*pdwBufLen <
len)
595 if (*pdwBufLen && !
len)
607 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pGuid);
612 *pGuid =
This->pobj->class_id;
624 if (!pcbSize || !ppvData)
630 for (
i = 0;
i <
This->pobj->nb_members;
i++)
631 if (!
strcmp(
This->pobj->members[
i].name, szMember))
633 if (
i ==
This->pobj->nb_members)
635 WARN(
"Unknown member '%s'\n", szMember);
638 *pcbSize =
This->pobj->members[
i].size;
639 *ppvData =
This->pobj->root->pdata +
This->pobj->members[
i].start;
643 *pcbSize =
This->pobj->size;
644 *ppvData =
This->pobj->root->pdata +
This->pobj->pos_data;
655 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pguid);
671 TRACE(
"(%p/%p)->(%p)\n",
This, iface, ppChildObj);
673 if (
This->cur_enum_object >=
This->pobj->nb_children)
679 if (
This->from_ref && (
This->level >= 1))
686 if (
This->pobj->children[
This->cur_enum_object]->binary)
696 else if (
This->pobj->children[
This->cur_enum_object]->ptarget)
704 object->ptarget =
This->pobj->children[
This->cur_enum_object++]->ptarget;
716 object->pobj =
This->pobj->children[
This->cur_enum_object++];
717 object->cur_enum_object = 0;
718 object->from_ref =
This->from_ref;
719 object->level =
This->level + 1;
731 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pDataObj);
740 FIXME(
"(%p/%p)->(%s,%p) stub!\n",
This, iface, szRef, pguidRef);
749 FIXME(
"(%p/%p)->(%s,%p,%s,%p,%d) stub!\n",
This, iface,
szName, pguid, szMimeType,
pvData, cbSize);
773 TRACE(
"(%p)\n", ppObj);
803 IUnknown_AddRef(iface);
845 TRACE(
"(%p/%p)->(%p,%p)\n",
This, iface, pstrNameBuf, pdwBufLen);
855 if (*pdwBufLen <
len)
859 if (*pdwBufLen && !
len)
871 TRACE(
"(%p/%p)->(%p)\n",
This, iface, pGuid);
876 *pGuid =
This->ptarget->class_id;
888 TRACE(
"(%p/%p)->(%p)\n",
This, iface, ppDataObj);
897 object->pobj =
This->ptarget;
898 object->cur_enum_object = 0;
900 object->from_ref =
TRUE;
902 *ppDataObj = &
object->IDirectXFileData_iface;
921 TRACE(
"(%p)\n", ppObj);
950 IUnknown_AddRef(iface);
979 for (
i = 0;
i <
This->nb_xobjects;
i++)
981 if (
This->mapped_memory)
1002 TRACE(
"(%p/%p)->(%p)\n",
This, iface, ppDataObj);
1006 ERR(
"Too many objects\n");
1014 if (!
This->buf.rem_bytes)
1035 object->cur_enum_object = 0;
1037 object->from_ref =
FALSE;
1039 This->buf.pxo_globals =
This->xobjects;
1040 This->buf.nb_pxo_globals =
This->nb_xobjects;
1041 This->buf.level = 0;
1043 This->buf.capacity = 0;
1044 This->buf.cur_pos_data = 0;
1045 This->buf.cur_pstrings =
This->buf.pstrings =
object->pstrings;
1046 This->buf.pxo =
This->xobjects[
This->nb_xobjects] =
This->buf.pxo_tab =
object->pobj;
1048 This->buf.pxo->nb_subobjects = 1;
1052 WARN(
"Object is not correct\n");
1057 *ppDataObj = &
object->IDirectXFileData_iface;
1060 This->pRefObjects[
This->nb_xobjects] = &
object->IDirectXFileData_iface;
1063 This->nb_xobjects++;
1078 FIXME(
"(%p/%p)->(%p,%p) stub!\n",
This, iface, rguid, ppDataObj);
1106 TRACE(
"(%p)\n", ppObj);
1135 IUnknown_AddRef(iface);
1171 FIXME(
"(%p/%p)->(%d,%p) stub!\n",
This, iface, cTemplates, ppguidTemplates);
1180 FIXME(
"(%p/%p)->(%p,%s,%p,%d,%p,%p) stub!\n",
This, iface, rguidTemplate,
szName, pguid, cbSize,
pvData, ppDataObj);
1189 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, ppDataObj);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject *iface, LPDIRECTXFILEDATA *ppDataObj)
static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile *iface, LPVOID pvData, DWORD cbSize)
static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl **ppObj)
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData(IDirectXFileSaveObject *iface, LPDIRECTXFILEDATA ppDataObj)
static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface(IDirectXFileEnumObject *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType(IDirectXFileBinary *iface, LPCSTR *pszMimeType)
static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData *iface, LPGUID pGuid)
static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData *iface, LPDIRECTXFILEOBJECT *ppChildObj)
static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject(IDirectXFile *iface, LPCSTR szFileName, DXFILEFORMAT dwFileFormat, LPDIRECTXFILESAVEOBJECT *ppSaveObj)
static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface(IDirectXFileDataReference *iface, REFIID riid, void **ppvObject)
static ULONG WINAPI IDirectXFileBinaryImpl_Release(IDirectXFileBinary *iface)
static IDirectXFileBinaryImpl * impl_from_IDirectXFileBinary(IDirectXFileBinary *iface)
static ULONG WINAPI IDirectXFileDataImpl_AddRef(IDirectXFileData *iface)
static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData *iface, LPDIRECTXFILEDATA pDataObj)
static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject *iface)
static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates(IDirectXFileSaveObject *iface, DWORD cTemplates, const GUID **ppguidTemplates)
static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef(IDirectXFileEnumObject *iface)
static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl **ppObj)
static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference(IDirectXFileData *iface, LPCSTR szRef, const GUID *pguidRef)
static HRESULT WINAPI IDirectXFileBinaryImpl_GetName(IDirectXFileBinary *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData *iface)
static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface(IDirectXFileSaveObject *iface, REFIID riid, void **ppvObject)
static const struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl
static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData *iface, const GUID **pguid)
static IDirectXFileDataReferenceImpl * impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface)
static HRESULT WINAPI IDirectXFileImpl_QueryInterface(IDirectXFile *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile *iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT *ppEnumObj)
static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface(IDirectXFileBinary *iface, REFIID riid, void **ppvObject)
static const struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl
static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl **ppObj)
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataReference *iface, LPGUID pGuid)
static HRESULT WINAPI IDirectXFileBinaryImpl_GetId(IDirectXFileBinary *iface, LPGUID pGuid)
static ULONG WINAPI IDirectXFileSaveObjectImpl_Release(IDirectXFileSaveObject *iface)
static ULONG WINAPI IDirectXFileBinaryImpl_AddRef(IDirectXFileBinary *iface)
static IDirectXFileEnumObjectImpl * impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface)
static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef(IDirectXFileSaveObject *iface)
static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef(IDirectXFileDataReference *iface)
HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj)
static const struct IDirectXFileDataVtbl IDirectXFileData_Vtbl
static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject(IDirectXFileData *iface, LPCSTR szName, const GUID *pguid, LPCSTR szMimeType, LPVOID pvData, DWORD cbSize)
static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface(IDirectXFileData *iface, REFIID riid, void **ppvObject)
static IDirectXFileSaveObjectImpl * impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface)
static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl
static const struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl
static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataReference *iface, LPDIRECTXFILEDATA *ppDataObj)
static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl **ppObj)
static HRESULT WINAPI IDirectXFileDataImpl_GetData(IDirectXFileData *iface, LPCSTR szMember, DWORD *pcbSize, void **ppvData)
static HRESULT WINAPI IDirectXFileBinaryImpl_Read(IDirectXFileBinary *iface, LPVOID pvData, DWORD cbSize, LPDWORD pcbRead)
static IDirectXFileDataImpl * impl_from_IDirectXFileData(IDirectXFileData *iface)
static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize(IDirectXFileBinary *iface, DWORD *pcbSize)
static HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl **ppObj)
static IDirectXFileImpl * impl_from_IDirectXFile(IDirectXFile *iface)
static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataReference *iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen)
static ULONG WINAPI IDirectXFileDataReferenceImpl_Release(IDirectXFileDataReference *iface)
static ULONG WINAPI IDirectXFileImpl_AddRef(IDirectXFile *iface)
static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile *iface)
static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject(IDirectXFileSaveObject *iface, REFGUID rguidTemplate, LPCSTR szName, const GUID *pguid, DWORD cbSize, LPVOID pvData, 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 const struct IDirectXFileVtbl IDirectXFile_Vtbl
BOOL parse_templates(parse_buffer *buf, BOOL templates_only) DECLSPEC_HIDDEN
HRESULT parse_header(parse_buffer *buf, BYTE **decomp_buffer_ptr) DECLSPEC_HIDDEN
BOOL parse_object(parse_buffer *buf) DECLSPEC_HIDDEN
#define MAX_STRINGS_BUFFER
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
static void cleanup(void)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
#define DXFILEERR_BADALLOC
#define DXFILEERR_RESOURCENOTFOUND
#define IDirectXFileData_AddRef(p)
struct IDirectXFileData * LPDIRECTXFILEDATA
#define DXFILEERR_BADDATAREFERENCE
#define IDirectXFileEnumObject_Release(p)
struct IDirectXFileSaveObject * LPDIRECTXFILESAVEOBJECT
#define DXFILELOAD_FROMFILE
#define DXFILEERR_FILENOTFOUND
#define DXFILEERR_NOTDONEYET
#define DXFILEERR_BADFILETYPE
struct IDirectXFileObject * LPDIRECTXFILEOBJECT
#define DXFILEERR_PARSEERROR
#define DXFILELOAD_FROMRESOURCE
struct IDirectXFileEnumObject * LPDIRECTXFILEENUMOBJECT
#define DXFILEERR_NOMOREOBJECTS
#define DXFILELOAD_FROMMEMORY
#define DXFILEERR_BADVALUE
#define DXFILEERR_BADRESOURCE
#define IDirectXFileData_Release(p)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
GLenum GLuint GLenum GLsizei const GLchar * buf
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
#define sprintf(buf, format,...)
static const WCHAR szName[]
#define IsEqualGUID(rguid1, rguid2)
static unsigned int file_size
static char * file_buffer
#define CONTAINING_RECORD(address, type, field)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
_In_ ULONG _In_opt_ PVOID pvData