1 /* DirectMusicLoader Private Include
3 * Copyright (C) 2003-2004 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_DMLOADER_PRIVATE_H
21 #define __WINE_DMLOADER_PRIVATE_H
35 #include "wine/debug.h"
36 #include "wine/list.h"
45 #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
47 /* dmloader.dll global (for DllCanUnloadNow) */
48 extern LONG module_ref DECLSPEC_HIDDEN
;
49 static inline void lock_module(void) { InterlockedIncrement( &module_ref
); }
50 static inline void unlock_module(void) { InterlockedDecrement( &module_ref
); }
52 /*****************************************************************************
55 typedef struct IDirectMusicLoaderCF IDirectMusicLoaderCF
;
56 typedef struct IDirectMusicContainerCF IDirectMusicContainerCF
;
58 typedef struct IDirectMusicLoaderFileStream IDirectMusicLoaderFileStream
;
59 typedef struct IDirectMusicLoaderResourceStream IDirectMusicLoaderResourceStream
;
60 typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream
;
62 /*****************************************************************************
65 extern HRESULT WINAPI
create_dmloader(REFIID riid
, void **ret_iface
) DECLSPEC_HIDDEN
;
66 extern HRESULT WINAPI
create_dmcontainer(REFIID riid
, void **ret_iface
) DECLSPEC_HIDDEN
;
67 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID
*ppobj
) DECLSPEC_HIDDEN
;
68 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID
*ppobj
) DECLSPEC_HIDDEN
;
69 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID
*ppobj
) DECLSPEC_HIDDEN
;
71 /*****************************************************************************
72 * IDirectMusicLoaderFileStream implementation structure
74 struct IDirectMusicLoaderFileStream
{
76 const IStreamVtbl
*StreamVtbl
;
77 const IDirectMusicGetLoaderVtbl
*GetLoaderVtbl
;
78 /* reference counter */
81 WCHAR wzFileName
[MAX_PATH
]; /* for clone */
84 LPDIRECTMUSICLOADER8 pLoader
;
88 extern HRESULT WINAPI
IDirectMusicLoaderFileStream_Attach (LPSTREAM iface
, LPCWSTR wzFile
, LPDIRECTMUSICLOADER8 pLoader
) DECLSPEC_HIDDEN
;
90 /*****************************************************************************
91 * IDirectMusicLoaderResourceStream implementation structure
93 struct IDirectMusicLoaderResourceStream
{
95 const IStreamVtbl
*StreamVtbl
;
96 const IDirectMusicGetLoaderVtbl
*GetLoaderVtbl
;
97 /* reference counter */
101 LONGLONG llMemLength
;
102 /* current position */
105 LPDIRECTMUSICLOADER8 pLoader
;
109 extern HRESULT WINAPI
IDirectMusicLoaderResourceStream_Attach (LPSTREAM iface
, LPBYTE pbMemData
, LONGLONG llMemLength
, LONGLONG llPos
, LPDIRECTMUSICLOADER8 pLoader
) DECLSPEC_HIDDEN
;
111 /*****************************************************************************
112 * IDirectMusicLoaderGenericStream implementation structure
114 struct IDirectMusicLoaderGenericStream
{
115 /* IUnknown fields */
116 const IStreamVtbl
*StreamVtbl
;
117 const IDirectMusicGetLoaderVtbl
*GetLoaderVtbl
;
118 /* reference counter */
123 LPDIRECTMUSICLOADER8 pLoader
;
127 extern HRESULT WINAPI
IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface
, LPSTREAM pStream
, LPDIRECTMUSICLOADER8 pLoader
) DECLSPEC_HIDDEN
;
131 #endif /* __WINE_DMLOADER_PRIVATE_H */