19#ifndef __WINE_DXFILE_H
20#define __WINE_DXFILE_H
31#define DXFILEFORMAT_BINARY 0
32#define DXFILEFORMAT_TEXT 1
33#define DXFILEFORMAT_COMPRESSED 2
37#define DXFILELOAD_FROMFILE 0x00L
38#define DXFILELOAD_FROMRESOURCE 0x01L
39#define DXFILELOAD_FROMMEMORY 0x02L
40#define DXFILELOAD_FROMSTREAM 0x04L
41#define DXFILELOAD_FROMURL 0x08L
64#define INTERFACE IDirectXFile
78#if !defined(__cplusplus) || defined(CINTERFACE)
80#define IDirectXFile_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
81#define IDirectXFile_AddRef(p) (p)->lpVtbl->AddRef(p)
82#define IDirectXFile_Release(p) (p)->lpVtbl->Release(p)
84#define IDirectXFile_CreateEnumObject(p,a,b,c) (p)->lpVtbl->CreateEnumObject(p,a,b,c)
85#define IDirectXFile_CreateSaveObject(p,a,b,c) (p)->lpVtbl->CreateSaveObject(p,a,b,c)
86#define IDirectXFile_RegisterTemplates(p,a,b) (p)->lpVtbl->RegisterTemplates(p,a,b)
89#define INTERFACE IDirectXFileEnumObject
103#if !defined(__cplusplus) || defined(CINTERFACE)
105#define IDirectXFileEnumObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
106#define IDirectXFileEnumObject_AddRef(p) (p)->lpVtbl->AddRef(p)
107#define IDirectXFileEnumObject_Release(p) (p)->lpVtbl->Release(p)
109#define IDirectXFileEnumObject_GetNextDataObject(p,a) (p)->lpVtbl->GetNextDataObject(p,a)
110#define IDirectXFileEnumObject_GetDataObjectById(p,a,b) (p)->lpVtbl->GetDataObjectById(p,a,b)
111#define IDirectXFileEnumObject_GetDataObjectByName(p,a,b) (p)->lpVtbl->GetDataObjectByName(p,a,b)
114#define INTERFACE IDirectXFileSaveObject
128#if !defined(__cplusplus) || defined(CINTERFACE)
130#define IDirectXFileSaveObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
131#define IDirectXFileSaveObject_AddRef(p) (p)->lpVtbl->AddRef(p)
132#define IDirectXFileSaveObject_Release(p) (p)->lpVtbl->Release(p)
134#define IDirectXFileSaveObject_SaveTemplates(p,a,b) (p)->lpVtbl->SaveTemplates(p,a,b)
135#define IDirectXFileSaveObject_CreateDataObject(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDataObject(p,a,b,c,d,e,f)
136#define IDirectXFileSaveObject_SaveData(p,a) (p)->lpVtbl->SaveData(p,a)
139#define IUNKNOWN_METHODS(kind) \
140 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) kind; \
141 STDMETHOD_(ULONG,AddRef)(THIS) kind; \
142 STDMETHOD_(ULONG,Release)(THIS) kind
144#define IDIRECTXFILEOBJECT_METHODS(kind) \
145 STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \
146 STDMETHOD(GetId) (THIS_ LPGUID) kind
148#define INTERFACE IDirectXFileObject
156#if !defined(__cplusplus) || defined(CINTERFACE)
158#define IDirectXFileObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
159#define IDirectXFileObject_AddRef(p) (p)->lpVtbl->AddRef(p)
160#define IDirectXFileObject_Release(p) (p)->lpVtbl->Release(p)
162#define IDirectXFileObject_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
163#define IDirectXFileObject_GetId(p,a) (p)->lpVtbl->GetId(p,a)
166#define INTERFACE IDirectXFileData
181#if !defined(__cplusplus) || defined(CINTERFACE)
183#define IDirectXFileData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
184#define IDirectXFileData_AddRef(p) (p)->lpVtbl->AddRef(p)
185#define IDirectXFileData_Release(p) (p)->lpVtbl->Release(p)
187#define IDirectXFileData_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
188#define IDirectXFileData_GetId(p,a) (p)->lpVtbl->GetId(p,a)
190#define IDirectXFileData_GetData(p,a,b,c) (p)->lpVtbl->GetData(p,a,b,c)
191#define IDirectXFileData_GetType(p,a) (p)->lpVtbl->GetType(p,a)
192#define IDirectXFileData_GetNextObject(p,a) (p)->lpVtbl->GetNextObject(p,a)
193#define IDirectXFileData_AddDataObject(p,a) (p)->lpVtbl->AddDataObject(p,a)
194#define IDirectXFileData_AddDataReference(p,a,b) (p)->lpVtbl->AddDataReference(p,a,b)
195#define IDirectXFileData_AddBinaryObject(p,a,b,c,d,e) (p)->lpVtbl->AddBinaryObject(p,a,b,c,d,e)
198#define INTERFACE IDirectXFileDataReference
208#if !defined(__cplusplus) || defined(CINTERFACE)
210#define IDirectXFileDataReference_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
211#define IDirectXFileDataReference_AddRef(p) (p)->lpVtbl->AddRef(p)
212#define IDirectXFileDataReference_Release(p) (p)->lpVtbl->Release(p)
214#define IDirectXFileDataReference_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
215#define IDirectXFileDataReference_GetId(p,a) (p)->lpVtbl->GetId(p,a)
217#define IDirectXFileDataReference_Resolve(p,a) (p)->lpVtbl->Resolve(p,a)
220#define INTERFACE IDirectXFileBinary
232#if !defined(__cplusplus) || defined(CINTERFACE)
234#define IDirectXFileBinary_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
235#define IDirectXFileBinary_AddRef(p) (p)->lpVtbl->AddRef(p)
236#define IDirectXFileBinary_Release(p) (p)->lpVtbl->Release(p)
238#define IDirectXFileBinary_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b)
239#define IDirectXFileBinary_GetId(p,a) (p)->lpVtbl->GetId(p,a)
241#define IDirectXFileBinary_GetSize(p,a) (p)->lpVtbl->GetSize(p,a)
242#define IDirectXFileBinary_GetMimeType(p,a) (p)->lpVtbl->GetMimeType(p,a)
243#define IDirectXFileBinary_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
247DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
250DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
251DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
252DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
253DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
254DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
255DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
256DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
259DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x00, 0x20, 0xaf, 0x71, 0xe4, 0x33);
264#ifndef MAKE_DDHRESULT
265#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
270#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850)
271#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851)
272#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852)
273#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853)
274#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854)
275#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855)
276#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856)
277#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857)
278#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858)
279#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859)
280#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860)
281#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861)
282#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862)
283#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863)
284#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864)
285#define DXFILEERR_BADFILE MAKE_DDHRESULT(865)
286#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866)
287#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867)
288#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868)
289#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869)
290#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870)
291#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871)
292#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872)
293#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873)
294#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874)
295#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875)
296#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876)
#define DECLARE_INTERFACE_(i, b)
DWORD WINAPI GetSize(LPVOID)
VOID SaveData(HWND hwndDlg)
struct IDirectXFile * LPDIRECTXFILE
struct _DXFILELOADRESOURCE DXFILELOADRESOURCE
#define IUNKNOWN_METHODS(kind)
struct IDirectXFileData * LPDIRECTXFILEDATA
struct IDirectXFileSaveObject * LPDIRECTXFILESAVEOBJECT
#define IDIRECTXFILEOBJECT_METHODS(kind)
struct IDirectXFileBinary * LPDIRECTXFILEBINARY
struct IDirectXFileDataReference * LPDIRECTXFILEDATAREFERENCE
struct IDirectXFileObject * LPDIRECTXFILEOBJECT
struct _DXFILELOADMEMORY * LPDXFILELOADMEMORY
STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile)
struct IDirectXFileEnumObject * LPDIRECTXFILEENUMOBJECT
struct _DXFILELOADRESOURCE * LPDXFILELOADRESOURCE
struct _DXFILELOADMEMORY DXFILELOADMEMORY
static BYTE * GetData(BYTE *pData, ULONG *pLength)
static HRESULT QueryInterface(REFIID, void **)
static ULONG WINAPI AddRef(IStream *iface)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject