Sweden-Number/dlls/dmloader/dmloader_private.h

131 lines
4.4 KiB
C
Raw Normal View History

2003-07-22 00:10:14 +02:00
/* DirectMusicLoader Private Include
*
* 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 Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
2003-07-22 00:10:14 +02:00
*
* 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
* Lesser General Public License for more details.
2003-07-22 00:10:14 +02:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
2003-07-22 00:10:14 +02:00
*/
#ifndef __WINE_DMLOADER_PRIVATE_H
#define __WINE_DMLOADER_PRIVATE_H
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#define COBJMACROS
2003-07-22 00:10:14 +02:00
#include "windef.h"
#include "winbase.h"
#include "winnt.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "winreg.h"
#include "objbase.h"
2003-07-22 00:10:14 +02:00
#include "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
/* dmloader.dll global (for DllCanUnloadNow) */
extern LONG module_ref DECLSPEC_HIDDEN;
static inline void lock_module(void) { InterlockedIncrement( &module_ref ); }
static inline void unlock_module(void) { InterlockedDecrement( &module_ref ); }
2003-07-22 00:10:14 +02:00
/*****************************************************************************
* Interfaces
*/
typedef struct IDirectMusicLoaderCF IDirectMusicLoaderCF;
typedef struct IDirectMusicContainerCF IDirectMusicContainerCF;
typedef struct IDirectMusicLoaderFileStream IDirectMusicLoaderFileStream;
typedef struct IDirectMusicLoaderResourceStream IDirectMusicLoaderResourceStream;
typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream;
2003-07-22 00:10:14 +02:00
/*****************************************************************************
* Creation helpers
2003-07-22 00:10:14 +02:00
*/
extern HRESULT WINAPI create_dmloader(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmcontainer(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
2003-07-22 00:10:14 +02:00
/*****************************************************************************
* IDirectMusicLoaderFileStream implementation structure
*/
struct IDirectMusicLoaderFileStream {
/* VTABLEs */
const IStreamVtbl *StreamVtbl;
const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
/* reference counter */
2005-07-05 13:02:54 +02:00
LONG dwRef;
/* file */
WCHAR wzFileName[MAX_PATH]; /* for clone */
HANDLE hFile;
/* loader */
LPDIRECTMUSICLOADER8 pLoader;
};
/* Custom: */
extern HRESULT WINAPI IDirectMusicLoaderFileStream_Attach (LPSTREAM iface, LPCWSTR wzFile, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
/*****************************************************************************
* IDirectMusicLoaderResourceStream implementation structure
*/
struct IDirectMusicLoaderResourceStream {
/* IUnknown fields */
const IStreamVtbl *StreamVtbl;
const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
/* reference counter */
2005-07-05 13:02:54 +02:00
LONG 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, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
/*****************************************************************************
* IDirectMusicLoaderGenericStream implementation structure
*/
struct IDirectMusicLoaderGenericStream {
/* IUnknown fields */
const IStreamVtbl *StreamVtbl;
const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
/* reference counter */
2005-07-05 13:02:54 +02:00
LONG dwRef;
/* stream */
LPSTREAM pStream;
/* loader */
LPDIRECTMUSICLOADER8 pLoader;
};
/* Custom: */
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface, LPSTREAM pStream, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
#include "debug.h"
2003-07-22 00:10:14 +02:00
#endif /* __WINE_DMLOADER_PRIVATE_H */