Release 1.1.37.
[wine/gsoc-2012-control.git] / dlls / mciavi32 / info.c
blobe10bfd046c25b11e2157b808c726069e88149ac8
1 /*
2 * Digital video MCI Wine Driver
4 * Copyright 1999, 2000 Eric POUECH
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.
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.
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 St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <string.h>
22 #include "private_mciavi.h"
23 #include "wine/debug.h"
24 #include "wine/unicode.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(mciavi);
28 /**************************************************************************
29 * MCIAVI_ConvertFrameToTimeFormat [internal]
31 static DWORD MCIAVI_ConvertFrameToTimeFormat(WINE_MCIAVI* wma, DWORD val, LPDWORD lpRet)
33 DWORD ret = 0;
35 switch (wma->dwMciTimeFormat) {
36 case MCI_FORMAT_MILLISECONDS:
37 ret = (val * wma->mah.dwMicroSecPerFrame) / 1000;
38 break;
39 case MCI_FORMAT_FRAMES:
40 ret = val;
41 break;
42 default:
43 WARN("Bad time format %u!\n", wma->dwMciTimeFormat);
45 TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val, wma->dwMciTimeFormat, ret);
46 *lpRet = 0;
47 return ret;
50 /**************************************************************************
51 * MCIAVI_ConvertTimeFormatToFrame [internal]
53 DWORD MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val)
55 DWORD ret = 0;
57 switch (wma->dwMciTimeFormat) {
58 case MCI_FORMAT_MILLISECONDS:
59 ret = (val * 1000) / wma->mah.dwMicroSecPerFrame;
60 break;
61 case MCI_FORMAT_FRAMES:
62 ret = val;
63 break;
64 default:
65 WARN("Bad time format %u!\n", wma->dwMciTimeFormat);
67 TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val, wma->dwMciTimeFormat, ret);
68 return ret;
71 /***************************************************************************
72 * MCIAVI_mciGetDevCaps [internal]
74 DWORD MCIAVI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms)
76 WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
77 DWORD ret;
79 TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
81 if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
82 if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
83 if (!(dwFlags & MCI_GETDEVCAPS_ITEM)) return MCIERR_MISSING_PARAMETER;
85 EnterCriticalSection(&wma->cs);
87 if (dwFlags & MCI_GETDEVCAPS_ITEM) {
88 switch (lpParms->dwItem) {
89 case MCI_GETDEVCAPS_DEVICE_TYPE:
90 TRACE("MCI_GETDEVCAPS_DEVICE_TYPE !\n");
91 lpParms->dwReturn = MAKEMCIRESOURCE(MCI_DEVTYPE_DIGITAL_VIDEO, MCI_DEVTYPE_DIGITAL_VIDEO);
92 ret = MCI_RESOURCE_RETURNED;
93 break;
94 case MCI_GETDEVCAPS_HAS_AUDIO:
95 TRACE("MCI_GETDEVCAPS_HAS_AUDIO !\n");
96 lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
97 ret = MCI_RESOURCE_RETURNED;
98 break;
99 case MCI_GETDEVCAPS_HAS_VIDEO:
100 TRACE("MCI_GETDEVCAPS_HAS_VIDEO !\n");
101 lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
102 ret = MCI_RESOURCE_RETURNED;
103 break;
104 case MCI_GETDEVCAPS_USES_FILES:
105 TRACE("MCI_GETDEVCAPS_USES_FILES !\n");
106 lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
107 ret = MCI_RESOURCE_RETURNED;
108 break;
109 case MCI_GETDEVCAPS_COMPOUND_DEVICE:
110 TRACE("MCI_GETDEVCAPS_COMPOUND_DEVICE !\n");
111 lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
112 ret = MCI_RESOURCE_RETURNED;
113 break;
114 case MCI_GETDEVCAPS_CAN_EJECT:
115 TRACE("MCI_GETDEVCAPS_CAN_EJECT !\n");
116 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
117 ret = MCI_RESOURCE_RETURNED;
118 break;
119 case MCI_GETDEVCAPS_CAN_PLAY:
120 TRACE("MCI_GETDEVCAPS_CAN_PLAY !\n");
121 lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
122 ret = MCI_RESOURCE_RETURNED;
123 break;
124 case MCI_GETDEVCAPS_CAN_RECORD:
125 TRACE("MCI_GETDEVCAPS_CAN_RECORD !\n");
126 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
127 ret = MCI_RESOURCE_RETURNED;
128 break;
129 case MCI_GETDEVCAPS_CAN_SAVE:
130 TRACE("MCI_GETDEVCAPS_CAN_SAVE !\n");
131 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
132 ret = MCI_RESOURCE_RETURNED;
133 break;
134 case MCI_DGV_GETDEVCAPS_CAN_REVERSE:
135 TRACE("MCI_DGV_GETDEVCAPS_CAN_REVERSE !\n");
136 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE); /* FIXME */
137 ret = MCI_RESOURCE_RETURNED;
138 break;
139 case MCI_DGV_GETDEVCAPS_CAN_STRETCH:
140 TRACE("MCI_DGV_GETDEVCAPS_CAN_STRETCH !\n");
141 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE); /* FIXME */
142 ret = MCI_RESOURCE_RETURNED;
143 break;
144 case MCI_DGV_GETDEVCAPS_CAN_LOCK:
145 TRACE("MCI_DGV_GETDEVCAPS_CAN_LOCK !\n");
146 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
147 ret = MCI_RESOURCE_RETURNED;
148 break;
149 case MCI_DGV_GETDEVCAPS_CAN_FREEZE:
150 TRACE("MCI_DGV_GETDEVCAPS_CAN_FREEZE !\n");
151 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
152 ret = MCI_RESOURCE_RETURNED;
153 break;
154 case MCI_DGV_GETDEVCAPS_CAN_STR_IN:
155 TRACE("MCI_DGV_GETDEVCAPS_CAN_STRETCH_INPUT !\n");
156 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
157 ret = MCI_RESOURCE_RETURNED;
158 break;
159 case MCI_DGV_GETDEVCAPS_HAS_STILL:
160 TRACE("MCI_DGV_GETDEVCAPS_HAS_STILL !\n");
161 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
162 ret = MCI_RESOURCE_RETURNED;
163 break;
164 case MCI_DGV_GETDEVCAPS_CAN_TEST:
165 TRACE("MCI_DGV_GETDEVCAPS_CAN_TEST !\n");
166 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE); /* FIXME */
167 ret = MCI_RESOURCE_RETURNED;
168 break;
169 case MCI_DGV_GETDEVCAPS_PALETTES:
170 TRACE("MCI_DGV_GETDEVCAPS_PALETTES !\n");
171 lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE); /* FIXME */
172 ret = MCI_RESOURCE_RETURNED;
173 break;
174 /* w2k does not know MAX_WINDOWS or MAX/MINIMUM_RATE */
175 default:
176 FIXME("Unknown capability (%08x) !\n", lpParms->dwItem);
177 ret = MCIERR_UNSUPPORTED_FUNCTION;
178 break;
182 LeaveCriticalSection(&wma->cs);
183 return ret;
186 /***************************************************************************
187 * MCIAVI_mciInfo [internal]
189 DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms)
191 LPCWSTR str = 0;
192 WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
193 DWORD ret = 0;
194 static const WCHAR wszAviPlayer[] = {'W','i','n','e','\'','s',' ','A','V','I',' ','p','l','a','y','e','r',0};
196 if (lpParms == NULL || lpParms->lpstrReturn == NULL)
197 return MCIERR_NULL_PARAMETER_BLOCK;
198 if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
200 TRACE("buf=%p, len=%u\n", lpParms->lpstrReturn, lpParms->dwRetSize);
202 EnterCriticalSection(&wma->cs);
204 if (dwFlags & MCI_INFO_PRODUCT)
205 str = wszAviPlayer;
206 else if (dwFlags & MCI_INFO_FILE)
207 str = wma->lpFileName;
208 else {
209 WARN("Don't know this info command (%u)\n", dwFlags);
210 ret = MCIERR_UNRECOGNIZED_COMMAND;
212 if (str) {
213 if (strlenW(str) + 1 > lpParms->dwRetSize) {
214 ret = MCIERR_PARAM_OVERFLOW;
215 } else {
216 lstrcpynW(lpParms->lpstrReturn, str, lpParms->dwRetSize);
218 } else {
219 lpParms->lpstrReturn[0] = 0;
222 LeaveCriticalSection(&wma->cs);
223 return ret;
226 /***************************************************************************
227 * MCIAVI_mciSet [internal]
229 DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
231 WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
233 if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
234 if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
236 EnterCriticalSection(&wma->cs);
238 if (dwFlags & MCI_SET_TIME_FORMAT) {
239 switch (lpParms->dwTimeFormat) {
240 case MCI_FORMAT_MILLISECONDS:
241 TRACE("MCI_FORMAT_MILLISECONDS !\n");
242 wma->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS;
243 break;
244 case MCI_FORMAT_FRAMES:
245 TRACE("MCI_FORMAT_FRAMES !\n");
246 wma->dwMciTimeFormat = MCI_FORMAT_FRAMES;
247 break;
248 default:
249 WARN("Bad time format %u!\n", lpParms->dwTimeFormat);
250 LeaveCriticalSection(&wma->cs);
251 return MCIERR_BAD_TIME_FORMAT;
255 if (dwFlags & MCI_SET_DOOR_OPEN) {
256 TRACE("No support for door open !\n");
257 LeaveCriticalSection(&wma->cs);
258 return MCIERR_UNSUPPORTED_FUNCTION;
260 if (dwFlags & MCI_SET_DOOR_CLOSED) {
261 TRACE("No support for door close !\n");
262 LeaveCriticalSection(&wma->cs);
263 return MCIERR_UNSUPPORTED_FUNCTION;
266 if (dwFlags & MCI_SET_ON) {
267 const char *szVideo="";
268 const char *szAudio="";
269 const char *szSeek="";
271 if (dwFlags & MCI_SET_VIDEO) {
272 szVideo = " video";
273 wma->dwSet |= 4;
275 if (dwFlags & MCI_SET_AUDIO) {
276 switch (lpParms->dwAudio) {
277 case MCI_SET_AUDIO_ALL:
278 szAudio = " audio all";
279 wma->dwSet |= 3;
280 break;
281 case MCI_SET_AUDIO_LEFT:
282 szAudio = " audio left";
283 wma->dwSet |= 1;
284 break;
285 case MCI_SET_AUDIO_RIGHT:
286 szAudio = " audio right";
287 wma->dwSet |= 2;
288 break;
289 default:
290 szAudio = " audio unknown";
291 WARN("Unknown audio channel %u\n", lpParms->dwAudio);
292 break;
295 if (dwFlags & MCI_DGV_SET_SEEK_EXACTLY) {
296 szSeek = " seek_exactly";
298 FIXME("MCI_SET_ON:%s%s%s\n", szVideo, szAudio, szSeek);
301 if (dwFlags & MCI_SET_OFF) {
302 const char *szVideo="";
303 const char *szAudio="";
304 const char *szSeek="";
306 if (dwFlags & MCI_SET_VIDEO) {
307 szVideo = " video";
308 wma->dwSet &= ~4;
310 if (dwFlags & MCI_SET_AUDIO) {
311 switch (lpParms->dwAudio) {
312 case MCI_SET_AUDIO_ALL:
313 szAudio = " audio all";
314 wma->dwSet &= ~3;
315 break;
316 case MCI_SET_AUDIO_LEFT:
317 szAudio = " audio left";
318 wma->dwSet &= ~2;
319 break;
320 case MCI_SET_AUDIO_RIGHT:
321 szAudio = " audio right";
322 wma->dwSet &= ~2;
323 break;
324 default:
325 szAudio = " audio unknown";
326 WARN("Unknown audio channel %u\n", lpParms->dwAudio);
327 break;
330 if (dwFlags & MCI_DGV_SET_SEEK_EXACTLY) {
331 szSeek = " seek_exactly";
333 FIXME("MCI_SET_OFF:%s%s%s\n", szVideo, szAudio, szSeek);
335 if (dwFlags & MCI_DGV_SET_FILEFORMAT) {
336 LPCSTR str = "save";
337 if (dwFlags & MCI_DGV_SET_STILL)
338 str = "capture";
340 switch (lpParms->dwFileFormat) {
341 case MCI_DGV_FF_AVI: FIXME("Setting file format (%s) to 'AVI'\n", str); break;
342 case MCI_DGV_FF_AVSS: FIXME("Setting file format (%s) to 'AVSS'\n", str); break;
343 case MCI_DGV_FF_DIB: FIXME("Setting file format (%s) to 'DIB'\n", str); break;
344 case MCI_DGV_FF_JFIF: FIXME("Setting file format (%s) to 'JFIF'\n", str); break;
345 case MCI_DGV_FF_JPEG: FIXME("Setting file format (%s) to 'JPEG'\n", str); break;
346 case MCI_DGV_FF_MPEG: FIXME("Setting file format (%s) to 'MPEG'\n", str); break;
347 case MCI_DGV_FF_RDIB: FIXME("Setting file format (%s) to 'RLE DIB'\n", str); break;
348 case MCI_DGV_FF_RJPEG: FIXME("Setting file format (%s) to 'RJPEG'\n", str); break;
349 default: FIXME("Setting unknown file format (%s): %d\n", str, lpParms->dwFileFormat);
353 if (dwFlags & MCI_DGV_SET_SPEED) {
354 FIXME("Setting speed to %d\n", lpParms->dwSpeed);
357 LeaveCriticalSection(&wma->cs);
358 return 0;
361 /***************************************************************************
362 * MCIAVI_mciStatus [internal]
364 DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms)
366 WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID);
367 DWORD ret = 0;
369 if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
370 if (wma == NULL) return MCIERR_INVALID_DEVICE_ID;
372 EnterCriticalSection(&wma->cs);
374 if (dwFlags & MCI_STATUS_ITEM) {
375 switch (lpParms->dwItem) {
376 case MCI_STATUS_CURRENT_TRACK:
377 lpParms->dwReturn = 1;
378 TRACE("MCI_STATUS_CURRENT_TRACK => %lu\n", lpParms->dwReturn);
379 break;
380 case MCI_STATUS_LENGTH:
381 if (!wma->hFile) {
382 lpParms->dwReturn = 0;
383 LeaveCriticalSection(&wma->cs);
384 return MCIERR_UNSUPPORTED_FUNCTION;
386 /* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
387 lpParms->dwReturn = MCIAVI_ConvertFrameToTimeFormat(wma, wma->mah.dwTotalFrames, &ret);
388 TRACE("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn);
389 break;
390 case MCI_STATUS_MODE:
391 lpParms->dwReturn = MAKEMCIRESOURCE(wma->dwStatus, wma->dwStatus);
392 ret = MCI_RESOURCE_RETURNED;
393 TRACE("MCI_STATUS_MODE => 0x%04x\n", LOWORD(lpParms->dwReturn));
394 break;
395 case MCI_STATUS_MEDIA_PRESENT:
396 TRACE("MCI_STATUS_MEDIA_PRESENT => TRUE\n");
397 lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
398 ret = MCI_RESOURCE_RETURNED;
399 break;
400 case MCI_STATUS_NUMBER_OF_TRACKS:
401 lpParms->dwReturn = 1;
402 TRACE("MCI_STATUS_NUMBER_OF_TRACKS => %lu\n", lpParms->dwReturn);
403 break;
404 case MCI_STATUS_POSITION:
405 if (!wma->hFile) {
406 lpParms->dwReturn = 0;
407 LeaveCriticalSection(&wma->cs);
408 return MCIERR_UNSUPPORTED_FUNCTION;
410 /* only one track in file is currently handled, so don't take care of MCI_TRACK flag */
411 lpParms->dwReturn = MCIAVI_ConvertFrameToTimeFormat(wma,
412 (dwFlags & MCI_STATUS_START) ? 0 : wma->dwCurrVideoFrame,
413 &ret);
414 TRACE("MCI_STATUS_POSITION %s => %lu\n",
415 (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn);
416 break;
417 case MCI_STATUS_READY:
418 lpParms->dwReturn = (wma->dwStatus == MCI_MODE_NOT_READY) ?
419 MAKEMCIRESOURCE(FALSE, MCI_FALSE) : MAKEMCIRESOURCE(TRUE, MCI_TRUE);
420 ret = MCI_RESOURCE_RETURNED;
421 TRACE("MCI_STATUS_READY = %u\n", LOWORD(lpParms->dwReturn));
422 break;
423 case MCI_STATUS_TIME_FORMAT:
424 lpParms->dwReturn = MAKEMCIRESOURCE(wma->dwMciTimeFormat,
425 wma->dwMciTimeFormat + MCI_FORMAT_RETURN_BASE);
426 TRACE("MCI_STATUS_TIME_FORMAT => %u\n", LOWORD(lpParms->dwReturn));
427 ret = MCI_RESOURCE_RETURNED;
428 break;
429 #if 0
430 case MCI_AVI_STATUS_AUDIO_BREAKS:
431 case MCI_AVI_STATUS_FRAMES_SKIPPED:
432 case MCI_AVI_STATUS_LAST_PLAY_SPEED:
433 case MCI_DGV_STATUS_AUDIO:
434 case MCI_DGV_STATUS_AUDIO_INPUT:
435 case MCI_DGV_STATUS_AUDIO_RECORD:
436 case MCI_DGV_STATUS_AUDIO_SOURCE:
437 case MCI_DGV_SETAUDIO_AVERAGE:
438 case MCI_DGV_SETAUDIO_LEFT:
439 case MCI_DGV_SETAUDIO_RIGHT:
440 case MCI_DGV_SETAUDIO_STEREO:
441 case MCI_DGV_STATUS_AUDIO_STREAM:
442 case MCI_DGV_STATUS_AVGBYTESPERSEC:
443 case MCI_DGV_STATUS_BASS:
444 case MCI_DGV_STATUS_BITSPERPEL:
445 case MCI_DGV_STATUS_BITSPERSAMPLE:
446 case MCI_DGV_STATUS_BLOCKALIGN:
447 case MCI_DGV_STATUS_BRIGHTNESS:
448 case MCI_DGV_STATUS_COLOR:
449 case MCI_DGV_STATUS_CONTRAST:
450 case MCI_DGV_STATUS_FILEFORMAT:
451 case MCI_DGV_STATUS_FILE_MODE:
452 case MCI_DGV_STATUS_FILE_COMPLETION:
453 case MCI_DGV_STATUS_FORWARD:
454 case MCI_DGV_STATUS_FRAME_RATE:
455 case MCI_DGV_STATUS_GAMMA:
456 #endif
457 case MCI_DGV_STATUS_HPAL:
458 lpParms->dwReturn = 0;
459 TRACE("MCI_DGV_STATUS_HPAL => %lx\n", lpParms->dwReturn);
460 break;
461 case MCI_DGV_STATUS_HWND:
462 lpParms->dwReturn = (DWORD_PTR)wma->hWndPaint;
463 TRACE("MCI_DGV_STATUS_HWND => %p\n", wma->hWndPaint);
464 break;
465 #if 0
466 case MCI_DGV_STATUS_KEY_COLOR:
467 case MCI_DGV_STATUS_KEY_INDEX:
468 case MCI_DGV_STATUS_MONITOR:
469 case MCI_DGV_MONITOR_FILE:
470 case MCI_DGV_MONITOR_INPUT:
471 case MCI_DGV_STATUS_MONITOR_METHOD:
472 case MCI_DGV_STATUS_PAUSE_MODE:
473 case MCI_DGV_STATUS_SAMPLESPERSECOND:
474 case MCI_DGV_STATUS_SEEK_EXACTLY:
475 case MCI_DGV_STATUS_SHARPNESS:
476 case MCI_DGV_STATUS_SIZE:
477 case MCI_DGV_STATUS_SMPTE:
478 case MCI_DGV_STATUS_SPEED:
479 case MCI_DGV_STATUS_STILL_FILEFORMAT:
480 case MCI_DGV_STATUS_TINT:
481 case MCI_DGV_STATUS_TREBLE:
482 case MCI_DGV_STATUS_UNSAVED:
483 case MCI_DGV_STATUS_VIDEO:
484 case MCI_DGV_STATUS_VIDEO_RECORD:
485 case MCI_DGV_STATUS_VIDEO_SOURCE:
486 case MCI_DGV_STATUS_VIDEO_SRC_NUM:
487 case MCI_DGV_STATUS_VIDEO_STREAM:
488 case MCI_DGV_STATUS_VOLUME:
489 case MCI_DGV_STATUS_WINDOW_VISIBLE:
490 case MCI_DGV_STATUS_WINDOW_MINIMIZED:
491 case MCI_DGV_STATUS_WINDOW_MAXIMIZED:
492 case MCI_STATUS_MEDIA_PRESENT:
493 #endif
494 default:
495 FIXME("Unknown command %08X !\n", lpParms->dwItem);
496 TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
497 LeaveCriticalSection(&wma->cs);
498 return MCIERR_UNRECOGNIZED_COMMAND;
500 } else {
501 WARN("No Status-Item!\n");
502 LeaveCriticalSection(&wma->cs);
503 return MCIERR_UNRECOGNIZED_COMMAND;
506 if (dwFlags & MCI_NOTIFY) {
507 TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
508 mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
509 wDevID, MCI_NOTIFY_SUCCESSFUL);
511 LeaveCriticalSection(&wma->cs);
512 return ret;