[MSACM32]
[reactos.git] / reactos / dll / win32 / msacm32 / msacm_main.c
1 /*
2 * MSACM library
3 *
4 * Copyright 1998 Patrik Stridvall
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "wineacm.h"
22
23 /**************************************************************************
24 * DllEntryPoint (MSACM.255)
25 *
26 * MSACM DLL entry point
27 *
28 */
29 BOOL WINAPI MSACM_DllEntryPoint(DWORD fdwReason, HINSTANCE16 hinstDLL, WORD ds,
30 WORD wHeapSize, DWORD dwReserved1, WORD wReserved2)
31 {
32 static HANDLE hndl;
33
34 TRACE("0x%x 0x%lx\n", hinstDLL, fdwReason);
35
36 switch (fdwReason) {
37 case DLL_PROCESS_ATTACH:
38 if (!hndl && !(hndl = LoadLibraryA("MSACM32.DLL"))) {
39 ERR("Could not load sibling MsAcm32.dll\n");
40 return FALSE;
41 }
42 break;
43 case DLL_PROCESS_DETACH:
44 FreeLibrary(hndl);
45 hndl = 0;
46 break;
47 case DLL_THREAD_ATTACH:
48 case DLL_THREAD_DETACH:
49 break;
50 }
51 return TRUE;
52 }
53
54 /***********************************************************************
55 * acmGetVersion (MSACM.7)
56 */
57 DWORD WINAPI acmGetVersion16(void)
58 {
59 return acmGetVersion();
60 }
61
62 /***********************************************************************
63 * acmMetrics (MSACM.8)
64 */
65
66 MMRESULT16 WINAPI acmMetrics16(
67 HACMOBJ16 hao, UINT16 uMetric, LPVOID pMetric)
68 {
69 FIXME("(0x%04x, %d, %p): semi-stub\n", hao, uMetric, pMetric);
70
71 if(!hao) return acmMetrics(0, uMetric, pMetric);
72 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
73 return MMSYSERR_ERROR;
74 }
75
76 /***********************************************************************
77 * acmDriverEnum (MSACM.10)
78 */
79 MMRESULT16 WINAPI acmDriverEnum16(
80 ACMDRIVERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
81 {
82 FIXME("(%p, %ld, %ld): stub\n",
83 fnCallback, dwInstance, fdwEnum
84 );
85 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
86 return MMSYSERR_ERROR;
87 }
88
89 /***********************************************************************
90 * acmDriverDetails (MSACM.11)
91 */
92
93 MMRESULT16 WINAPI acmDriverDetails16(
94 HACMDRIVERID16 hadid, LPACMDRIVERDETAILS16 padd, DWORD fdwDetails)
95 {
96 FIXME("(0x%04x, %p, %ld): stub\n", hadid, padd, fdwDetails);
97 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
98 return MMSYSERR_ERROR;
99 }
100
101 /***********************************************************************
102 * acmDriverAdd (MSACM.12)
103 */
104 MMRESULT16 WINAPI acmDriverAdd16(
105 LPHACMDRIVERID16 phadid, HINSTANCE16 hinstModule,
106 LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
107 {
108 FIXME("(%p, 0x%04x, %ld, %ld, %ld): stub\n",
109 phadid, hinstModule, lParam, dwPriority, fdwAdd
110 );
111 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
112 return MMSYSERR_ERROR;
113 }
114
115 /***********************************************************************
116 * acmDriverRemove (MSACM.13)
117 */
118 MMRESULT16 WINAPI acmDriverRemove16(
119 HACMDRIVERID16 hadid, DWORD fdwRemove)
120 {
121 FIXME("(0x%04x, %ld): stub\n", hadid, fdwRemove);
122 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
123 return MMSYSERR_ERROR;
124 }
125
126 /***********************************************************************
127 * acmDriverOpen (MSACM.14)
128 */
129 MMRESULT16 WINAPI acmDriverOpen16(
130 LPHACMDRIVER16 phad, HACMDRIVERID16 hadid, DWORD fdwOpen)
131 {
132 FIXME("(%p, 0x%04x, %ld): stub\n", phad, hadid, fdwOpen);
133 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
134 return MMSYSERR_ERROR;
135 }
136
137 /***********************************************************************
138 * acmDriverClose (MSACM.15)
139 */
140 MMRESULT16 WINAPI acmDriverClose16(
141 HACMDRIVER16 had, DWORD fdwClose)
142 {
143 FIXME("(0x%04x, %ld): stub\n", had, fdwClose);
144 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
145 return MMSYSERR_ERROR;
146 }
147
148 /***********************************************************************
149 * acmDriverMessage (MSACM.16)
150 */
151 LRESULT WINAPI acmDriverMessage16(
152 HACMDRIVER16 had, UINT16 uMsg, LPARAM lParam1, LPARAM lParam2)
153 {
154 FIXME("(0x%04x, %d, %ld, %ld): stub\n",
155 had, uMsg, lParam1, lParam2
156 );
157 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
158 return 0;
159 }
160
161 /***********************************************************************
162 * acmDriverID (MSACM.17)
163 */
164 MMRESULT16 WINAPI acmDriverID16(
165 HACMOBJ16 hao, LPHACMDRIVERID16 phadid, DWORD fdwDriverID)
166 {
167 FIXME("(0x%04x, %p, %ld): stub\n", hao, phadid, fdwDriverID);
168 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
169 return MMSYSERR_ERROR;
170 }
171
172 /***********************************************************************
173 * acmDriverPriority (MSACM.18)
174 */
175 MMRESULT16 WINAPI acmDriverPriority16(
176 HACMDRIVERID16 hadid, DWORD dwPriority, DWORD fdwPriority)
177 {
178 FIXME("(0x%04x, %ld, %ld): stub\n",
179 hadid, dwPriority, fdwPriority
180 );
181 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
182 return MMSYSERR_ERROR;
183 }
184
185 /***********************************************************************
186 * acmFormatTagDetails (MSACM.30)
187 */
188 MMRESULT16 WINAPI acmFormatTagDetails16(
189 HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd, DWORD fdwDetails)
190 {
191 FIXME("(0x%04x, %p, %ld): stub\n", had, paftd, fdwDetails);
192 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
193 return MMSYSERR_ERROR;
194 }
195
196 /***********************************************************************
197 * acmFormatTagEnum (MSACM.31)
198 */
199 MMRESULT16 WINAPI acmFormatTagEnum16(
200 HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd,
201 ACMFORMATTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
202 {
203 FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
204 had, paftd, fnCallback, dwInstance, fdwEnum
205 );
206 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
207 return MMSYSERR_ERROR;
208 }
209
210 /***********************************************************************
211 * acmFormatChoose (MSACM.40)
212 */
213 MMRESULT16 WINAPI acmFormatChoose16(
214 LPACMFORMATCHOOSE16 pafmtc)
215 {
216 FIXME("(%p): stub\n", pafmtc);
217 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
218 return MMSYSERR_ERROR;
219 }
220
221 /***********************************************************************
222 * acmFormatDetails (MSACM.41)
223 */
224 MMRESULT16 WINAPI acmFormatDetails16(
225 HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd, DWORD fdwDetails)
226 {
227 FIXME("(0x%04x, %p, %ld): stub\n", had, pafd, fdwDetails);
228 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
229 return MMSYSERR_ERROR;
230 }
231
232 /***********************************************************************
233 * acmFormatEnum (MSACM.42)
234 */
235 MMRESULT16 WINAPI acmFormatEnum16(
236 HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd,
237 ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
238 {
239 FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
240 had, pafd, fnCallback, dwInstance, fdwEnum
241 );
242 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
243 return MMSYSERR_ERROR;
244 }
245
246 /***********************************************************************
247 * acmFormatSuggest (MSACM.45)
248 */
249 MMRESULT16 WINAPI acmFormatSuggest16(
250 HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
251 LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest)
252 {
253 FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
254 had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest
255 );
256 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
257 return MMSYSERR_ERROR;
258 }
259
260 /***********************************************************************
261 * acmFilterTagDetails (MSACM.50)
262 */
263 MMRESULT16 WINAPI acmFilterTagDetails16(
264 HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd, DWORD fdwDetails)
265 {
266 FIXME("(0x%04x, %p, %ld): stub\n", had, paftd, fdwDetails);
267 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
268 return MMSYSERR_ERROR;
269 }
270
271 /***********************************************************************
272 * acmFilterTagEnum (MSACM.51)
273 */
274 MMRESULT16 WINAPI acmFilterTagEnum16(
275 HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd,
276 ACMFILTERTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
277 {
278 FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
279 had, paftd, fnCallback, dwInstance, fdwEnum
280 );
281 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
282 return MMSYSERR_ERROR;
283 }
284
285 /***********************************************************************
286 * acmFilterChoose (MSACM.60)
287 */
288 MMRESULT16 WINAPI acmFilterChoose16(
289 LPACMFILTERCHOOSE16 pafltrc)
290 {
291 FIXME("(%p): stub\n", pafltrc);
292 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
293 return MMSYSERR_ERROR;
294 }
295
296 /***********************************************************************
297 * acmFilterDetails (MSACM.61)
298 */
299 MMRESULT16 WINAPI acmFilterDetails16(
300 HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd, DWORD fdwDetails)
301 {
302 FIXME("(0x%04x, %p, %ld): stub\n", had, pafd, fdwDetails);
303 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
304 return MMSYSERR_ERROR;
305 }
306
307 /***********************************************************************
308 * acmFilterEnum (MSACM.62)
309 */
310 MMRESULT16 WINAPI acmFilterEnum16(
311 HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd,
312 ACMFILTERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
313 {
314 FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
315 had, pafd, fnCallback, dwInstance, fdwEnum
316 );
317 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
318 return MMSYSERR_ERROR;
319 }
320
321 /***********************************************************************
322 * acmStreamOpen (MSACM.70)
323 */
324 MMRESULT16 WINAPI acmStreamOpen16(
325 LPHACMSTREAM16 phas, HACMDRIVER16 had,
326 LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst,
327 LPWAVEFILTER pwfltr, DWORD dwCallback,
328 DWORD dwInstance, DWORD fdwOpen)
329 {
330 FIXME("(%p, 0x%04x, %p, %p, %p, %ld, %ld, %ld): stub\n",
331 phas, had, pwfxSrc, pwfxDst, pwfltr,
332 dwCallback, dwInstance, fdwOpen
333 );
334 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
335 return MMSYSERR_ERROR;
336 }
337
338 /***********************************************************************
339 * acmStreamClose (MSACM.71)
340 */
341 MMRESULT16 WINAPI acmStreamClose16(
342 HACMSTREAM16 has, DWORD fdwClose)
343 {
344 FIXME("(0x%04x, %ld): stub\n", has, fdwClose);
345 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
346 return MMSYSERR_ERROR;
347 }
348
349 /***********************************************************************
350 * acmStreamSize (MSACM.72)
351 */
352 MMRESULT16 WINAPI acmStreamSize16(
353 HACMSTREAM16 has, DWORD cbInput,
354 LPDWORD pdwOutputBytes, DWORD fdwSize)
355 {
356 FIXME("(0x%04x, %ld, %p, %ld): stub\n",
357 has, cbInput, pdwOutputBytes, fdwSize
358 );
359 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
360 return MMSYSERR_ERROR;
361 }
362
363 /***********************************************************************
364 * acmStreamConvert (MSACM.75)
365 */
366 MMRESULT16 WINAPI acmStreamConvert16(
367 HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwConvert)
368 {
369 FIXME("(0x%04x, %p, %ld): stub\n", has, pash, fdwConvert);
370 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
371 return MMSYSERR_ERROR;
372 }
373
374 /***********************************************************************
375 * acmStreamReset (MSACM.76)
376 */
377 MMRESULT16 WINAPI acmStreamReset16(
378 HACMSTREAM16 has, DWORD fdwReset)
379 {
380 FIXME("(0x%04x, %ld): stub\n", has, fdwReset);
381 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
382 return MMSYSERR_ERROR;
383 }
384
385 /***********************************************************************
386 * acmStreamPrepareHeader (MSACM.77)
387 */
388 MMRESULT16 WINAPI acmStreamPrepareHeader16(
389 HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwPrepare)
390 {
391 FIXME("(0x%04x, %p, %ld): stub\n", has, pash, fdwPrepare);
392 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
393 return MMSYSERR_ERROR;
394 }
395
396 /***********************************************************************
397 * acmStreamUnprepareHeader (MSACM.78)
398 */
399 MMRESULT16 WINAPI acmStreamUnprepareHeader16(
400 HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwUnprepare)
401 {
402 FIXME("(0x%04x, %p, %ld): stub\n",
403 has, pash, fdwUnprepare
404 );
405 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
406 return MMSYSERR_ERROR;
407 }
408
409 /***********************************************************************
410 * ACMAPPLICATIONEXIT (MSACM.150)
411 * FIXME
412 * No documentation found.
413 */
414
415 /***********************************************************************
416 * ACMHUGEPAGELOCK (MSACM.175)
417 *FIXME
418 * No documentation found.
419 */
420
421 /***********************************************************************
422 * ACMHUGEPAGEUNLOCK (MSACM.176)
423 * FIXME
424 * No documentation found.
425 */
426
427 /***********************************************************************
428 * ACMOPENCONVERSION (MSACM.200)
429 * FIXME
430 * No documentation found.
431 */
432
433 /***********************************************************************
434 * ACMCLOSECONVERSION (MSACM.201)
435 * FIXME
436 * No documentation found.
437 */
438
439 /***********************************************************************
440 * ACMCONVERT (MSACM.202)
441 * FIXME
442 * No documentation found.
443 */
444
445 /***********************************************************************
446 * ACMCHOOSEFORMAT (MSACM.203)
447 * FIXME
448 * No documentation found.
449 */
450
451