Implemented RtlCreateProcessParameters and related functions.
[wine] / dlls / dmime / tool.c
1 /* IDirectMusicTool8 Implementation
2  *
3  * Copyright (C) 2003 Rok Mandeljc
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
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
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #include <stdarg.h>
21
22 #include "windef.h"
23 #include "winbase.h"
24 #include "winuser.h"
25 #include "wingdi.h"
26 #include "wine/debug.h"
27
28 #include "dmime_private.h"
29
30 WINE_DEFAULT_DEBUG_CHANNEL(dmime);
31
32
33 /* IDirectMusicTool8 IUnknown part: */
34 HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
35 {
36         ICOM_THIS(IDirectMusicTool8Impl,iface);
37
38         if (IsEqualIID (riid, &IID_IUnknown) || 
39             IsEqualIID (riid, &IID_IDirectMusicTool) ||
40             IsEqualIID (riid, &IID_IDirectMusicTool8)) {
41                 IDirectMusicTool8Impl_AddRef(iface);
42                 *ppobj = This;
43                 return S_OK;
44         }
45         WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
46         return E_NOINTERFACE;
47 }
48
49 ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface)
50 {
51         ICOM_THIS(IDirectMusicTool8Impl,iface);
52         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
53         return ++(This->ref);
54 }
55
56 ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface)
57 {
58         ICOM_THIS(IDirectMusicTool8Impl,iface);
59         ULONG ref = --This->ref;
60         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
61         if (ref == 0) {
62                 HeapFree(GetProcessHeap(), 0, This);
63         }
64         return ref;
65 }
66
67 /* IDirectMusicTool8 IDirectMusicTool part: */
68 HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph)
69 {
70         ICOM_THIS(IDirectMusicTool8Impl,iface);
71
72         FIXME("(%p, %p): stub\n", This, pGraph);
73
74         return S_OK;
75 }
76
77 HRESULT WINAPI IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface, DWORD* pdwDeliveryType)
78 {
79         ICOM_THIS(IDirectMusicTool8Impl,iface);
80
81         FIXME("(%p, %p): stub\n", This, pdwDeliveryType);
82
83         return S_OK;
84 }
85
86 HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface, DWORD* pdwNumElements)
87 {
88         ICOM_THIS(IDirectMusicTool8Impl,iface);
89
90         FIXME("(%p, %p): stub\n", This, pdwNumElements);
91
92         return S_OK;
93 }
94
95 HRESULT WINAPI IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface, DWORD** padwMediaTypes, DWORD dwNumElements)
96 {
97         ICOM_THIS(IDirectMusicTool8Impl,iface);
98
99         FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements);
100
101         return S_OK;
102 }
103
104 HRESULT WINAPI IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
105 {
106         ICOM_THIS(IDirectMusicTool8Impl,iface);
107
108         FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG);
109
110         return S_OK;
111 }
112
113 HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
114 {
115         ICOM_THIS(IDirectMusicTool8Impl,iface);
116
117         FIXME("(%p, %p, %p, %lli): stub\n", This, pPerf, pPMSG, rtTime);
118
119         return S_OK;
120 }
121
122 /* IDirectMusicTool8 IDirectMusicTool8 part: */
123 HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool)
124 {
125         ICOM_THIS(IDirectMusicTool8Impl,iface);
126
127         FIXME("(%p, %p): stub\n", This, ppTool);
128
129         return S_OK;
130 }
131
132 ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl =
133 {
134     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
135         IDirectMusicTool8Impl_QueryInterface,
136         IDirectMusicTool8Impl_AddRef,
137         IDirectMusicTool8Impl_Release,
138         IDirectMusicTool8Impl_Init,
139         IDirectMusicTool8Impl_GetMsgDeliveryType,
140         IDirectMusicTool8Impl_GetMediaTypeArraySize,
141         IDirectMusicTool8Impl_GetMediaTypes,
142         IDirectMusicTool8Impl_ProcessPMsg,
143         IDirectMusicTool8Impl_Flush,
144         IDirectMusicTool8Impl_Clone
145 };
146
147 /* for ClassFactory */
148 HRESULT WINAPI DMUSIC_CreateDirectMusicTool (LPCGUID lpcGUID, LPDIRECTMUSICTOOL8 *ppDMTool, LPUNKNOWN pUnkOuter)
149 {
150         if (IsEqualIID (lpcGUID, &IID_IDirectMusicComposer)) {
151                 FIXME("Not yet\n");
152                 return E_NOINTERFACE;
153         }
154         WARN("No interface found\n");
155         
156         return E_NOINTERFACE;   
157 }