37#define CHUNK_HDR_SIZE (sizeof(FOURCC) + sizeof(DWORD))
42 if (!fourcc)
return "''";
44 (
char)(fourcc >> 16), (
char)(fourcc >> 24));
50 const char *
type =
"";
66 TRACE_(dmfile)(
"IStream_Read failed: %08x\n",
hr);
92 WARN_(dmfile)(
"No space for sub-chunk header in parent chunk: ends at offset %s > %s\n",
103 if (ck_end > p_end) {
104 WARN_(dmfile)(
"No space for sub-chunk data in parent chunk: ends at offset %s > %s\n",
147 WARN_(dmfile)(
"Chunk %s (size %u, offset %s) doesn't contains the expected data size %u\n",
168 if (len < chunk->
size)
185 return IUnknown_QueryInterface(
This->outer_unk,
riid, ret_iface);
191 return IUnknown_AddRef(
This->outer_unk);
197 return IUnknown_Release(
This->outer_unk);
229 desc->dwValidData &= ~DMUS_OBJ_CLASS;
234 This->desc.guidObject =
desc->guidObject;
242 This->desc.vVersion =
desc->vVersion;
246 This->desc.llMemLength =
desc->llMemLength;
250 IStream_Clone(
desc->pStream, &
This->desc.pStream);
252 This->desc.dwValidData |=
desc->dwValidData;
308 desc->dwValidData = 0;
309 desc->dwSize =
sizeof(*desc);
351 return IUnknown_QueryInterface(
This->outer_unk,
riid, ret_iface);
357 return IUnknown_AddRef(
This->outer_unk);
363 return IUnknown_Release(
This->outer_unk);
383 TRACE(
"(%p, %p): method not implemented\n", iface,
class);
389 TRACE(
"(%p): method not implemented, always returning S_FALSE\n", iface);
396 TRACE(
"(%p, %p, %d): method not implemented\n", iface,
stream, clear_dirty);
402 TRACE(
"(%p, %p): method not implemented\n", iface,
size);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const char * wine_dbg_sprintf(const char *format,...)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
#define MultiByteToWideChar
static struct dmobject * impl_from_IPersistStream(IPersistStream *iface)
HRESULT WINAPI dmobj_IDirectMusicObject_GetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
void dmobject_init(struct dmobject *dmobj, const GUID *class, IUnknown *outer_unk)
HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk, void *data, ULONG size)
HRESULT stream_next_chunk(IStream *stream, struct chunk_entry *chunk)
static const char * debugstr_fourcc(DWORD fourcc)
ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
ULONG WINAPI dmobj_IDirectMusicObject_Release(IDirectMusicObject *iface)
HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff, DMUS_OBJECTDESC *desc, DWORD supported)
HRESULT WINAPI dmobj_IDirectMusicObject_QueryInterface(IDirectMusicObject *iface, REFIID riid, void **ret_iface)
static void info_get_name(IStream *stream, const struct chunk_entry *info, DMUS_OBJECTDESC *desc)
HRESULT stream_skip_chunk(IStream *stream, struct chunk_entry *chunk)
static void unfo_get_name(IStream *stream, const struct chunk_entry *unfo, DMUS_OBJECTDESC *desc, BOOL inam)
HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class)
HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *size)
HRESULT WINAPI dmobj_IDirectMusicObject_SetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
HRESULT stream_chunk_get_wstr(IStream *stream, const struct chunk_entry *chunk, WCHAR *str, ULONG size)
const char * debugstr_chunk(const struct chunk_entry *chunk)
HRESULT WINAPI dmobj_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class)
ULONG WINAPI dmobj_IPersistStream_AddRef(IPersistStream *iface)
HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, void **ret_iface)
ULONG WINAPI dmobj_IDirectMusicObject_AddRef(IDirectMusicObject *iface)
static struct dmobject * impl_from_IDirectMusicObject(IDirectMusicObject *iface)
HRESULT stream_get_chunk(IStream *stream, struct chunk_entry *chunk)
HRESULT WINAPI unimpl_IPersistStream_IsDirty(IPersistStream *iface)
HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream, BOOL clear_dirty)
#define DMUS_OBJ_NAME_INAM
#define DMUS_OBJ_NAME_INFO
#define DMUS_FOURCC_GUID_CHUNK
#define DMUS_FOURCC_UNAM_CHUNK
#define DMUS_FOURCC_VERSION_CHUNK
#define DMUS_FOURCC_INFO_LIST
#define DMUS_FOURCC_UNFO_LIST
#define DMUS_FOURCC_CATEGORY_CHUNK
#define DMUS_MAX_CATEGORY
#define DMUS_OBJ_FILENAME
#define DMUS_MAX_FILENAME
#define DMUS_OBJ_CATEGORY
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define memcpy(s1, s2, n)
#define mmioFOURCC(c0, c1, c2, c3)
static const WCHAR desc[]
IPersistStream IPersistStream_iface
IDirectMusicObject IDirectMusicObject_iface
#define CONTAINING_RECORD(address, type, field)