2003-07-22 00:10:14 +02:00
|
|
|
/* DirectMusicLoader Private Include
|
|
|
|
*
|
2004-01-20 01:21:40 +01:00
|
|
|
* Copyright (C) 2003-2004 Rok Mandeljc
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_DMLOADER_PRIVATE_H
|
|
|
|
#define __WINE_DMLOADER_PRIVATE_H
|
|
|
|
|
2004-02-25 02:30:03 +01:00
|
|
|
#include <stdio.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2004-02-25 02:30:03 +01:00
|
|
|
#include <string.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
|
2004-08-11 21:43:45 +02:00
|
|
|
#define COBJMACROS
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winnt.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "wingdi.h"
|
2004-01-20 01:21:40 +01:00
|
|
|
#include "winuser.h"
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
2003-09-22 21:37:33 +02:00
|
|
|
#include "wine/list.h"
|
2004-01-20 01:21:40 +01:00
|
|
|
#include "wine/unicode.h"
|
|
|
|
#include "winreg.h"
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
#include "dmusici.h"
|
|
|
|
#include "dmusicf.h"
|
|
|
|
#include "dmusics.h"
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2004-08-13 02:44:22 +02:00
|
|
|
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
|
|
|
|
|
2004-05-13 02:00:22 +02:00
|
|
|
/* dmloader.dll global (for DllCanUnloadNow) */
|
|
|
|
extern DWORD dwDirectMusicLoader; /* number of DirectMusicLoader(CF) instances */
|
|
|
|
extern DWORD dwDirectMusicContainer; /* number of DirectMusicContainer(CF) instances */
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Interfaces
|
|
|
|
*/
|
2004-05-13 02:00:22 +02:00
|
|
|
typedef struct IDirectMusicLoaderCF IDirectMusicLoaderCF;
|
|
|
|
typedef struct IDirectMusicContainerCF IDirectMusicContainerCF;
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2004-05-13 02:00:22 +02:00
|
|
|
typedef struct IDirectMusicLoaderImpl IDirectMusicLoaderImpl;
|
|
|
|
typedef struct IDirectMusicContainerImpl IDirectMusicContainerImpl;
|
|
|
|
|
|
|
|
typedef struct IDirectMusicLoaderFileStream IDirectMusicLoaderFileStream;
|
|
|
|
typedef struct IDirectMusicLoaderResourceStream IDirectMusicLoaderResourceStream;
|
|
|
|
typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream;
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Predeclare the interface implementation structures
|
|
|
|
*/
|
2004-08-13 01:00:51 +02:00
|
|
|
extern IClassFactoryVtbl DirectMusicLoaderCF_Vtbl;
|
|
|
|
extern IClassFactoryVtbl DirectMusicContainerCF_Vtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
extern IDirectMusicLoader8Vtbl DirectMusicLoader_Loader_Vtbl;
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
extern IDirectMusicContainerVtbl DirectMusicContainer_Container_Vtbl;
|
|
|
|
extern IDirectMusicObjectVtbl DirectMusicContainer_Object_Vtbl;
|
|
|
|
extern IPersistStreamVtbl DirectMusicContainer_PersistStream_Vtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
extern IStreamVtbl DirectMusicLoaderFileStream_Stream_Vtbl;
|
|
|
|
extern IDirectMusicGetLoaderVtbl DirectMusicLoaderFileStream_GetLoader_Vtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
extern IStreamVtbl DirectMusicLoaderResourceStream_Stream_Vtbl;
|
|
|
|
extern IDirectMusicGetLoaderVtbl DirectMusicLoaderResourceStream_GetLoader_Vtbl;
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
extern IStreamVtbl DirectMusicLoaderGenericStream_Stream_Vtbl;
|
|
|
|
extern IDirectMusicGetLoaderVtbl DirectMusicLoaderGenericStream_GetLoader_Vtbl;
|
2003-07-22 00:10:14 +02:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2004-05-13 02:00:22 +02:00
|
|
|
* Creation helpers
|
2003-07-22 00:10:14 +02:00
|
|
|
*/
|
2004-05-13 02:00:22 +02:00
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderCF (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
|
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicContainerCF (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
|
2004-05-13 02:00:22 +02:00
|
|
|
extern HRESULT WINAPI DMUSIC_DestroyDirectMusicLoaderImpl (LPDIRECTMUSICLOADER8 iface);
|
2004-01-20 01:21:40 +01:00
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicContainerImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
|
2004-05-13 02:00:22 +02:00
|
|
|
extern HRESULT WINAPI DMUSIC_DestroyDirectMusicContainerImpl(LPDIRECTMUSICCONTAINER iface);
|
|
|
|
|
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID *ppobj);
|
|
|
|
extern HRESULT WINAPI DMUSIC_DestroyDirectMusicLoaderFileStream (LPSTREAM iface);
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2004-05-13 02:00:22 +02:00
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID *ppobj);
|
|
|
|
extern HRESULT WINAPI DMUSIC_DestroyDirectMusicLoaderResourceStream (LPSTREAM iface);
|
|
|
|
|
|
|
|
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID *ppobj);
|
|
|
|
extern HRESULT WINAPI DMUSIC_DestroyDirectMusicLoaderGenericStream (LPSTREAM iface);
|
2003-07-22 00:10:14 +02:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2004-05-13 02:00:22 +02:00
|
|
|
* IDirectMusicLoaderCF implementation structure
|
2003-07-22 00:10:14 +02:00
|
|
|
*/
|
2004-05-13 02:00:22 +02:00
|
|
|
struct IDirectMusicLoaderCF {
|
|
|
|
/* IUnknown fields */
|
2004-08-12 21:52:49 +02:00
|
|
|
IClassFactoryVtbl *lpVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
DWORD dwRef;
|
|
|
|
};
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2004-05-13 02:00:22 +02:00
|
|
|
/* IUnknown / IClassFactory: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderCF_QueryInterface (LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderCF_AddRef (LPCLASSFACTORY iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderCF_Release (LPCLASSFACTORY iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderCF_CreateInstance (LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderCF_LockServer (LPCLASSFACTORY iface,BOOL dolock);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectMusicContainerCF implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectMusicContainerCF {
|
|
|
|
/* IUnknown fields */
|
2004-08-12 21:52:49 +02:00
|
|
|
IClassFactoryVtbl *lpVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
DWORD dwRef;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* IUnknown / IClassFactory: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerCF_QueryInterface (LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerCF_AddRef (LPCLASSFACTORY iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerCF_Release (LPCLASSFACTORY iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerCF_CreateInstance (LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerCF_LockServer (LPCLASSFACTORY iface,BOOL dolock);
|
|
|
|
|
|
|
|
|
|
|
|
/* cache/alias entry */
|
|
|
|
typedef struct _WINE_LOADER_ENTRY {
|
|
|
|
struct list entry; /* for listing elements */
|
|
|
|
DMUS_OBJECTDESC Desc;
|
|
|
|
LPDIRECTMUSICOBJECT pObject; /* pointer to object */
|
|
|
|
BOOL bInvalidDefaultDLS; /* my workaround for enabling caching of "faulty" default dls collection */
|
|
|
|
} WINE_LOADER_ENTRY, *LPWINE_LOADER_ENTRY;
|
|
|
|
|
|
|
|
/* cache options, search paths for specific types of objects */
|
|
|
|
typedef struct _WINE_LOADER_OPTION {
|
|
|
|
struct list entry; /* for listing elements */
|
|
|
|
GUID guidClass; /* ID of object type */
|
|
|
|
WCHAR wszSearchPath[MAX_PATH]; /* look for objects of certain type in here */
|
|
|
|
BOOL bCache; /* cache objects of certain type */
|
|
|
|
} WINE_LOADER_OPTION, *LPWINE_LOADER_OPTION;
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectMusicLoaderImpl implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectMusicLoaderImpl {
|
|
|
|
/* VTABLEs */
|
2004-08-13 01:00:51 +02:00
|
|
|
IDirectMusicLoader8Vtbl *LoaderVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
/* reference counter */
|
|
|
|
DWORD dwRef;
|
|
|
|
/* simple cache (linked list) */
|
|
|
|
struct list *pObjects;
|
|
|
|
/* settings for certain object classes */
|
|
|
|
struct list *pClassSettings;
|
|
|
|
/* critical section */
|
|
|
|
CRITICAL_SECTION CritSect;
|
2003-07-22 00:10:14 +02:00
|
|
|
};
|
|
|
|
|
2004-05-13 02:00:22 +02:00
|
|
|
/* IUnknown / IDirectMusicLoader(8): */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_QueryInterface (LPDIRECTMUSICLOADER8 iface, REFIID riid, LPVOID *ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_AddRef (LPDIRECTMUSICLOADER8 iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_Release (LPDIRECTMUSICLOADER8 iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIRECTMUSICLOADER8 iface, LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID*ppv);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_SetObject (LPDIRECTMUSICLOADER8 iface, LPDMUS_OBJECTDESC pDesc);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_SetSearchDirectory (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, WCHAR* pwzPath, BOOL fClear);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_ScanDirectory (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, WCHAR* pwzFileExtension, WCHAR* pwzScanFileName);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_CacheObject (LPDIRECTMUSICLOADER8 iface, IDirectMusicObject* pObject);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_ReleaseObject (LPDIRECTMUSICLOADER8 iface, IDirectMusicObject* pObject);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_ClearCache (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_EnableCache (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, BOOL fEnable);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_EnumObject (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc);
|
|
|
|
extern void WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_CollectGarbage (LPDIRECTMUSICLOADER8 iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_ReleaseObjectByUnknown (LPDIRECTMUSICLOADER8 iface, IUnknown* pObject);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_LoadObjectFromFile (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClassID, REFIID iidInterfaceID, WCHAR* pwzFilePath, void** ppObject);
|
|
|
|
|
|
|
|
/* contained object entry */
|
|
|
|
typedef struct _WINE_CONTAINER_ENTRY {
|
|
|
|
struct list entry; /* for listing elements */
|
|
|
|
DMUS_OBJECTDESC Desc;
|
|
|
|
BOOL bIsRIFF;
|
|
|
|
DWORD dwFlags; /* DMUS_CONTAINED_OBJF_KEEP: keep object in loader's cache, even when container is released */
|
|
|
|
WCHAR* wszAlias;
|
|
|
|
LPDIRECTMUSICOBJECT pObject; /* needed when releasing from loader's cache on container release */
|
|
|
|
} WINE_CONTAINER_ENTRY, *LPWINE_CONTAINER_ENTRY;
|
2003-07-22 00:10:14 +02:00
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectMusicContainerImpl implementation structure
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
struct IDirectMusicContainerImpl {
|
2004-05-13 02:00:22 +02:00
|
|
|
/* VTABLEs */
|
2004-08-13 01:00:51 +02:00
|
|
|
IDirectMusicContainerVtbl *ContainerVtbl;
|
|
|
|
IDirectMusicObjectVtbl *ObjectVtbl;
|
|
|
|
IPersistStreamVtbl *PersistStreamVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
/* reference counter */
|
|
|
|
DWORD dwRef;
|
|
|
|
/* stream */
|
|
|
|
LPSTREAM pStream;
|
|
|
|
/* header */
|
|
|
|
DMUS_IO_CONTAINER_HEADER Header;
|
|
|
|
/* data */
|
|
|
|
struct list *pContainedObjects;
|
|
|
|
/* descriptor */
|
|
|
|
DMUS_OBJECTDESC Desc;
|
2003-08-23 01:53:27 +02:00
|
|
|
};
|
|
|
|
|
2004-05-13 02:00:22 +02:00
|
|
|
/* IUnknown / IDirectMusicContainer: */
|
2004-01-20 01:21:40 +01:00
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_QueryInterface (LPDIRECTMUSICCONTAINER iface, REFIID riid, LPVOID *ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_AddRef (LPDIRECTMUSICCONTAINER iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_Release (LPDIRECTMUSICCONTAINER iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_EnumObject (LPDIRECTMUSICCONTAINER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR* pwszAlias);
|
2003-08-23 01:53:27 +02:00
|
|
|
/* IDirectMusicObject: */
|
2004-01-20 01:21:40 +01:00
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerImpl_IDirectMusicObject_Release (LPDIRECTMUSICOBJECT iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
|
2003-08-23 01:53:27 +02:00
|
|
|
/* IPersistStream: */
|
2004-01-20 01:21:40 +01:00
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicContainerImpl_IPersistStream_Release (LPPERSISTSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_IsDirty (LPPERSISTSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
|
|
|
|
extern HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2004-05-13 02:00:22 +02:00
|
|
|
* IDirectMusicLoaderFileStream implementation structure
|
2003-08-23 01:53:27 +02:00
|
|
|
*/
|
2004-05-13 02:00:22 +02:00
|
|
|
struct IDirectMusicLoaderFileStream {
|
|
|
|
/* VTABLEs */
|
2004-08-13 01:00:51 +02:00
|
|
|
IStreamVtbl *StreamVtbl;
|
|
|
|
IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
/* reference counter */
|
|
|
|
DWORD dwRef;
|
|
|
|
/* file */
|
|
|
|
WCHAR wzFileName[MAX_PATH]; /* for clone */
|
|
|
|
HANDLE hFile;
|
|
|
|
/* loader */
|
|
|
|
LPDIRECTMUSICLOADER8 pLoader;
|
2003-08-23 01:53:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Custom: */
|
2004-05-13 02:00:22 +02:00
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_Attach (LPSTREAM iface, LPCWSTR wzFile, LPDIRECTMUSICLOADER pLoader);
|
|
|
|
extern void WINAPI IDirectMusicLoaderFileStream_Detach (LPSTREAM iface);
|
|
|
|
/* IUnknown/IStream: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_QueryInterface (LPSTREAM iface, REFIID riid, void** ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderFileStream_IStream_AddRef (LPSTREAM iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderFileStream_IStream_Release (LPSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Read (IStream* iface, void* pv, ULONG cb, ULONG* pcbRead);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Write (LPSTREAM iface, const void* pv, ULONG cb, ULONG* pcbWritten);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Seek (LPSTREAM iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_SetSize (LPSTREAM iface, ULARGE_INTEGER libNewSize);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_CopyTo (LPSTREAM iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Commit (LPSTREAM iface, DWORD grfCommitFlags);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Revert (LPSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_LockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_UnlockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Stat (LPSTREAM iface, STATSTG* pstatstg, DWORD grfStatFlag);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IStream_Clone (LPSTREAM iface, IStream** ppstm);
|
2003-07-22 00:10:14 +02:00
|
|
|
/* IDirectMusicGetLoader: */
|
2004-05-13 02:00:22 +02:00
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IDirectMusicGetLoader_QueryInterface (LPDIRECTMUSICGETLOADER iface, REFIID riid, void** ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderFileStream_IDirectMusicGetLoader_AddRef (LPDIRECTMUSICGETLOADER iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderFileStream_IDirectMusicGetLoader_Release (LPDIRECTMUSICGETLOADER iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderFileStream_IDirectMusicGetLoader_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader **ppLoader);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectMusicLoaderResourceStream implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectMusicLoaderResourceStream {
|
|
|
|
/* IUnknown fields */
|
2004-08-13 01:00:51 +02:00
|
|
|
IStreamVtbl *StreamVtbl;
|
|
|
|
IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
/* reference counter */
|
|
|
|
DWORD dwRef;
|
|
|
|
/* data */
|
|
|
|
LPBYTE pbMemData;
|
|
|
|
LONGLONG llMemLength;
|
|
|
|
/* current position */
|
|
|
|
LONGLONG llPos;
|
|
|
|
/* loader */
|
|
|
|
LPDIRECTMUSICLOADER8 pLoader;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Custom: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_Attach (LPSTREAM iface, LPBYTE pbMemData, LONGLONG llMemLength, LONGLONG llPos, LPDIRECTMUSICLOADER pLoader);
|
|
|
|
extern void WINAPI IDirectMusicLoaderResourceStream_Detach (LPSTREAM iface);
|
|
|
|
/* IUnknown/IStream: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_QueryInterface (LPSTREAM iface, REFIID riid, void** ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderResourceStream_IStream_AddRef (LPSTREAM iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderResourceStream_IStream_Release (LPSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Read (IStream* iface, void* pv, ULONG cb, ULONG* pcbRead);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Write (LPSTREAM iface, const void* pv, ULONG cb, ULONG* pcbWritten);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Seek (LPSTREAM iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_SetSize (LPSTREAM iface, ULARGE_INTEGER libNewSize);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_CopyTo (LPSTREAM iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Commit (LPSTREAM iface, DWORD grfCommitFlags);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Revert (LPSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_LockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_UnlockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Stat (LPSTREAM iface, STATSTG* pstatstg, DWORD grfStatFlag);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IStream_Clone (LPSTREAM iface, IStream** ppstm);
|
|
|
|
/* IDirectMusicGetLoader: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IDirectMusicGetLoader_QueryInterface (LPDIRECTMUSICGETLOADER iface, REFIID riid, void** ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderResourceStream_IDirectMusicGetLoader_AddRef (LPDIRECTMUSICGETLOADER iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderResourceStream_IDirectMusicGetLoader_Release (LPDIRECTMUSICGETLOADER iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderResourceStream_IDirectMusicGetLoader_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader **ppLoader);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectMusicLoaderGenericStream implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectMusicLoaderGenericStream {
|
|
|
|
/* IUnknown fields */
|
2004-08-13 01:00:51 +02:00
|
|
|
IStreamVtbl *StreamVtbl;
|
|
|
|
IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
|
2004-05-13 02:00:22 +02:00
|
|
|
/* reference counter */
|
|
|
|
DWORD dwRef;
|
|
|
|
/* stream */
|
|
|
|
LPSTREAM pStream;
|
|
|
|
/* loader */
|
|
|
|
LPDIRECTMUSICLOADER8 pLoader;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Custom: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface, LPSTREAM pStream, LPDIRECTMUSICLOADER pLoader);
|
|
|
|
extern void WINAPI IDirectMusicLoaderGenericStream_Detach (LPSTREAM iface);
|
|
|
|
/* IUnknown/IStream: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_QueryInterface (LPSTREAM iface, REFIID riid, void** ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderGenericStream_IStream_AddRef (LPSTREAM iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderGenericStream_IStream_Release (LPSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Read (IStream* iface, void* pv, ULONG cb, ULONG* pcbRead);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Write (LPSTREAM iface, const void* pv, ULONG cb, ULONG* pcbWritten);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Seek (LPSTREAM iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_SetSize (LPSTREAM iface, ULARGE_INTEGER libNewSize);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_CopyTo (LPSTREAM iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Commit (LPSTREAM iface, DWORD grfCommitFlags);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Revert (LPSTREAM iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_LockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_UnlockRegion (LPSTREAM iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Stat (LPSTREAM iface, STATSTG* pstatstg, DWORD grfStatFlag);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IStream_Clone (LPSTREAM iface, IStream** ppstm);
|
|
|
|
/* IDirectMusicGetLoader: */
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IDirectMusicGetLoader_QueryInterface (LPDIRECTMUSICGETLOADER iface, REFIID riid, void** ppobj);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderGenericStream_IDirectMusicGetLoader_AddRef (LPDIRECTMUSICGETLOADER iface);
|
|
|
|
extern ULONG WINAPI IDirectMusicLoaderGenericStream_IDirectMusicGetLoader_Release (LPDIRECTMUSICGETLOADER iface);
|
|
|
|
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_IDirectMusicGetLoader_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader **ppLoader);
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* Misc.
|
|
|
|
*/
|
|
|
|
/* for simpler reading */
|
2004-05-13 02:00:22 +02:00
|
|
|
typedef struct _WINE_CHUNK {
|
2004-01-20 01:21:40 +01:00
|
|
|
FOURCC fccID; /* FOURCC ID of the chunk */
|
|
|
|
DWORD dwSize; /* size of the chunk */
|
2004-05-13 02:00:22 +02:00
|
|
|
} WINE_CHUNK, *LPWINE_CHUNK;
|
|
|
|
|
|
|
|
extern HRESULT WINAPI DMUSIC_GetDefaultGMPath (WCHAR wszPath[MAX_PATH]);
|
|
|
|
extern HRESULT WINAPI DMUSIC_GetLoaderSettings (LPDIRECTMUSICLOADER8 iface, REFGUID pClassID, WCHAR* wszSearchPath, LPBOOL pbCache);
|
|
|
|
extern HRESULT WINAPI DMUSIC_SetLoaderSettings (LPDIRECTMUSICLOADER8 iface, REFGUID pClassID, WCHAR* wszSearchPath, LPBOOL pbCache);
|
|
|
|
extern HRESULT WINAPI DMUSIC_InitLoaderSettings (LPDIRECTMUSICLOADER8 iface);
|
|
|
|
extern HRESULT WINAPI DMUSIC_CopyDescriptor (LPDMUS_OBJECTDESC pDst, LPDMUS_OBJECTDESC pSrc);
|
|
|
|
extern BOOL WINAPI DMUSIC_IsValidLoadableClass (REFCLSID pClassID);
|
|
|
|
|
|
|
|
#include "debug.h"
|
2004-01-20 01:21:40 +01:00
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
#endif /* __WINE_DMLOADER_PRIVATE_H */
|