dbghelp: Use RtlGetVersion() for system version detection instead.
[wine.git] / dlls / dmloader / dmloader_private.h
blob94bb9ddf1bde60d7ad88fe70919879fcff73db9d
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 "winreg.h"
38 #include "objbase.h"
40 #include "dmusici.h"
41 #include "dmusicf.h"
42 #include "dmusics.h"
43 #include "dmobject.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 /*****************************************************************************
53 * Interfaces
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 /*****************************************************************************
63 * Creation helpers
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 {
75 /* VTABLEs */
76 const IStreamVtbl *StreamVtbl;
77 const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
78 /* reference counter */
79 LONG dwRef;
80 /* file */
81 WCHAR wzFileName[MAX_PATH]; /* for clone */
82 HANDLE hFile;
83 /* loader */
84 LPDIRECTMUSICLOADER8 pLoader;
87 /* Custom: */
88 extern HRESULT WINAPI IDirectMusicLoaderFileStream_Attach (LPSTREAM iface, LPCWSTR wzFile, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
90 /*****************************************************************************
91 * IDirectMusicLoaderResourceStream implementation structure
93 struct IDirectMusicLoaderResourceStream {
94 /* IUnknown fields */
95 const IStreamVtbl *StreamVtbl;
96 const IDirectMusicGetLoaderVtbl *GetLoaderVtbl;
97 /* reference counter */
98 LONG dwRef;
99 /* data */
100 LPBYTE pbMemData;
101 LONGLONG llMemLength;
102 /* current position */
103 LONGLONG llPos;
104 /* loader */
105 LPDIRECTMUSICLOADER8 pLoader;
108 /* Custom: */
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 */
119 LONG dwRef;
120 /* stream */
121 LPSTREAM pStream;
122 /* loader */
123 LPDIRECTMUSICLOADER8 pLoader;
126 /* Custom: */
127 extern HRESULT WINAPI IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface, LPSTREAM pStream, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
129 #include "debug.h"
131 #endif /* __WINE_DMLOADER_PRIVATE_H */