gameux/tests: Add a trailing '\n' to an ok() call.
[wine.git] / dlls / dmloader / dmloader_private.h
blobecda299fb895154167b931d39cb16c8fb10d75e7
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
23 #include <stdio.h>
24 #include <stdarg.h>
25 #include <string.h>
27 #define COBJMACROS
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winnt.h"
32 #include "wingdi.h"
33 #include "winuser.h"
35 #include "wine/debug.h"
36 #include "wine/list.h"
37 #include "wine/unicode.h"
38 #include "winreg.h"
39 #include "objbase.h"
41 #include "dmusici.h"
42 #include "dmusicf.h"
43 #include "dmusics.h"
45 #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
46 #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
48 /* dmloader.dll global (for DllCanUnloadNow) */
49 extern LONG module_ref DECLSPEC_HIDDEN;
50 static inline void lock_module(void) { InterlockedIncrement( &module_ref ); }
51 static inline void unlock_module(void) { InterlockedDecrement( &module_ref ); }
53 /*****************************************************************************
54 * Interfaces
56 typedef struct IDirectMusicLoaderCF IDirectMusicLoaderCF;
57 typedef struct IDirectMusicContainerCF IDirectMusicContainerCF;
59 typedef struct IDirectMusicLoaderFileStream IDirectMusicLoaderFileStream;
60 typedef struct IDirectMusicLoaderResourceStream IDirectMusicLoaderResourceStream;
61 typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream;
63 /*****************************************************************************
64 * Creation helpers
66 extern HRESULT WINAPI create_dmloader(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
67 extern HRESULT WINAPI create_dmcontainer(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
68 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
69 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
70 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
72 /*****************************************************************************
73 * IDirectMusicLoaderFileStream implementation structure
75 struct IDirectMusicLoaderFileStream {
76 /* VTABLEs */
77 const IStreamVtbl *StreamVtbl;
78 const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
79 /* reference counter */
80 LONG dwRef;
81 /* file */
82 WCHAR wzFileName[MAX_PATH]; /* for clone */
83 HANDLE hFile;
84 /* loader */
85 LPDIRECTMUSICLOADER8 pLoader;
88 /* Custom: */
89 extern HRESULT WINAPI IDirectMusicLoaderFileStream_Attach (LPSTREAM iface, LPCWSTR wzFile, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
91 /*****************************************************************************
92 * IDirectMusicLoaderResourceStream implementation structure
94 struct IDirectMusicLoaderResourceStream {
95 /* IUnknown fields */
96 const IStreamVtbl *StreamVtbl;
97 const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
98 /* reference counter */
99 LONG dwRef;
100 /* data */
101 LPBYTE pbMemData;
102 LONGLONG llMemLength;
103 /* current position */
104 LONGLONG llPos;
105 /* loader */
106 LPDIRECTMUSICLOADER8 pLoader;
109 /* Custom: */
110 extern HRESULT WINAPI IDirectMusicLoaderResourceStream_Attach (LPSTREAM iface, LPBYTE pbMemData, LONGLONG llMemLength, LONGLONG llPos, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
112 /*****************************************************************************
113 * IDirectMusicLoaderGenericStream implementation structure
115 struct IDirectMusicLoaderGenericStream {
116 /* IUnknown fields */
117 const IStreamVtbl *StreamVtbl;
118 const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
119 /* reference counter */
120 LONG dwRef;
121 /* stream */
122 LPSTREAM pStream;
123 /* loader */
124 LPDIRECTMUSICLOADER8 pLoader;
127 /* Custom: */
128 extern HRESULT WINAPI IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface, LPSTREAM pStream, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
130 #include "debug.h"
132 #endif /* __WINE_DMLOADER_PRIVATE_H */