ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mciqtz.c
Go to the documentation of this file.
00001 /*
00002  * DirectShow MCI Driver
00003  *
00004  * Copyright 2009 Christian Costa
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00019  */
00020 
00021 #include <stdarg.h>
00022 #include "windef.h"
00023 #include "winbase.h"
00024 #include "winuser.h"
00025 #include "mmddk.h"
00026 #include "wine/debug.h"
00027 #include "mciqtz_private.h"
00028 #include "digitalv.h"
00029 #include "wownt32.h"
00030 
00031 WINE_DEFAULT_DEBUG_CHANNEL(mciqtz);
00032 
00033 static DWORD MCIQTZ_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS);
00034 static DWORD MCIQTZ_mciStop(UINT, DWORD, LPMCI_GENERIC_PARMS);
00035 
00036 /*======================================================================*
00037  *                          MCI QTZ implementation                      *
00038  *======================================================================*/
00039 
00040 static HINSTANCE MCIQTZ_hInstance = 0;
00041 
00042 /***********************************************************************
00043  *              DllMain (MCIQTZ.0)
00044  */
00045 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
00046 {
00047     switch (fdwReason) {
00048     case DLL_PROCESS_ATTACH:
00049         DisableThreadLibraryCalls(hInstDLL);
00050         MCIQTZ_hInstance = hInstDLL;
00051         break;
00052     }
00053     return TRUE;
00054 }
00055 
00056 /**************************************************************************
00057  *                              MCIQTZ_mciGetOpenDev            [internal]
00058  */
00059 static WINE_MCIQTZ* MCIQTZ_mciGetOpenDev(UINT wDevID)
00060 {
00061     WINE_MCIQTZ* wma = (WINE_MCIQTZ*)mciGetDriverData(wDevID);
00062 
00063     if (!wma) {
00064         WARN("Invalid wDevID=%u\n", wDevID);
00065         return NULL;
00066     }
00067     return wma;
00068 }
00069 
00070 /**************************************************************************
00071  *                              MCIQTZ_drvOpen                  [internal]
00072  */
00073 static DWORD MCIQTZ_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp)
00074 {
00075     WINE_MCIQTZ* wma;
00076     static const WCHAR mciAviWStr[] = {'M','C','I','A','V','I',0};
00077 
00078     TRACE("(%s, %p)\n", debugstr_w(str), modp);
00079 
00080     /* session instance */
00081     if (!modp)
00082         return 0xFFFFFFFF;
00083 
00084     wma = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIQTZ));
00085     if (!wma)
00086         return 0;
00087 
00088     modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO;
00089     wma->wDevID = modp->wDeviceID;
00090     modp->wCustomCommandTable = wma->command_table = mciLoadCommandResource(MCIQTZ_hInstance, mciAviWStr, 0);
00091     mciSetDriverData(wma->wDevID, (DWORD_PTR)wma);
00092 
00093     return modp->wDeviceID;
00094 }
00095 
00096 /**************************************************************************
00097  *                              MCIQTZ_drvClose         [internal]
00098  */
00099 static DWORD MCIQTZ_drvClose(DWORD dwDevID)
00100 {
00101     WINE_MCIQTZ* wma;
00102 
00103     TRACE("(%04x)\n", dwDevID);
00104 
00105     wma = MCIQTZ_mciGetOpenDev(dwDevID);
00106 
00107     if (wma) {
00108         /* finish all outstanding things */
00109         MCIQTZ_mciClose(dwDevID, MCI_WAIT, NULL);
00110 
00111         mciFreeCommandResource(wma->command_table);
00112         mciSetDriverData(dwDevID, 0);
00113         HeapFree(GetProcessHeap(), 0, wma);
00114         return 1;
00115     }
00116 
00117     return (dwDevID == 0xFFFFFFFF) ? 1 : 0;
00118 }
00119 
00120 /**************************************************************************
00121  *                              MCIQTZ_drvConfigure             [internal]
00122  */
00123 static DWORD MCIQTZ_drvConfigure(DWORD dwDevID)
00124 {
00125     WINE_MCIQTZ* wma;
00126 
00127     TRACE("(%04x)\n", dwDevID);
00128 
00129     wma = MCIQTZ_mciGetOpenDev(dwDevID);
00130     if (!wma)
00131         return 0;
00132 
00133     MCIQTZ_mciStop(dwDevID, MCI_WAIT, NULL);
00134 
00135     MessageBoxA(0, "Sample QTZ Wine Driver !", "MM-Wine Driver", MB_OK);
00136 
00137     return 1;
00138 }
00139 
00140 /***************************************************************************
00141  *                              MCIQTZ_mciOpen                  [internal]
00142  */
00143 static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags,
00144                             LPMCI_DGV_OPEN_PARMSW lpOpenParms)
00145 {
00146     WINE_MCIQTZ* wma;
00147     HRESULT hr;
00148     DWORD style = 0;
00149     RECT rc = { 0, 0, 0, 0 };
00150 
00151     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpOpenParms);
00152 
00153     if (!lpOpenParms)
00154         return MCIERR_NULL_PARAMETER_BLOCK;
00155 
00156     wma = MCIQTZ_mciGetOpenDev(wDevID);
00157     if (!wma)
00158         return MCIERR_INVALID_DEVICE_ID;
00159 
00160     MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
00161 
00162     hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
00163     wma->uninit = SUCCEEDED(hr);
00164 
00165     hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&wma->pgraph);
00166     if (FAILED(hr)) {
00167         TRACE("Cannot create filtergraph (hr = %x)\n", hr);
00168         goto err;
00169     }
00170 
00171     hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaControl, (LPVOID*)&wma->pmctrl);
00172     if (FAILED(hr)) {
00173         TRACE("Cannot get IMediaControl interface (hr = %x)\n", hr);
00174         goto err;
00175     }
00176 
00177     hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaSeeking, (void**)&wma->seek);
00178     if (FAILED(hr)) {
00179         TRACE("Cannot get IMediaSeeking interface (hr = %x)\n", hr);
00180         goto err;
00181     }
00182 
00183     hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaEvent, (void**)&wma->mevent);
00184     if (FAILED(hr)) {
00185         TRACE("Cannot get IMediaEvent interface (hr = %x)\n", hr);
00186         goto err;
00187     }
00188 
00189     hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&wma->vidwin);
00190     if (FAILED(hr)) {
00191         TRACE("Cannot get IVideoWindow interface (hr = %x)\n", hr);
00192         goto err;
00193     }
00194 
00195     hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IBasicVideo, (void**)&wma->vidbasic);
00196     if (FAILED(hr)) {
00197         TRACE("Cannot get IBasicVideo interface (hr = %x)\n", hr);
00198         goto err;
00199     }
00200 
00201     if (!(dwFlags & MCI_OPEN_ELEMENT) || (dwFlags & MCI_OPEN_ELEMENT_ID)) {
00202         TRACE("Wrong dwFlags %x\n", dwFlags);
00203         goto err;
00204     }
00205 
00206     if (!lpOpenParms->lpstrElementName || !lpOpenParms->lpstrElementName[0]) {
00207         TRACE("Invalid filename specified\n");
00208         goto err;
00209     }
00210 
00211     TRACE("Open file %s\n", debugstr_w(lpOpenParms->lpstrElementName));
00212 
00213     hr = IGraphBuilder_RenderFile(wma->pgraph, lpOpenParms->lpstrElementName, NULL);
00214     if (FAILED(hr)) {
00215         TRACE("Cannot render file (hr = %x)\n", hr);
00216         goto err;
00217     }
00218 
00219     IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE);
00220     IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
00221     if (dwFlags & MCI_DGV_OPEN_WS)
00222         style = lpOpenParms->dwStyle;
00223     if (dwFlags & MCI_DGV_OPEN_PARENT) {
00224         IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpOpenParms->hWndParent);
00225         IVideoWindow_put_WindowState(wma->vidwin, SW_HIDE);
00226         IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD);
00227         IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpOpenParms->hWndParent);
00228         GetClientRect(lpOpenParms->hWndParent, &rc);
00229         IVideoWindow_SetWindowPosition(wma->vidwin, rc.left, rc.top, rc.right - rc.top, rc.bottom - rc.top);
00230         wma->parent = (HWND)lpOpenParms->hWndParent;
00231     }
00232     else if (style)
00233         IVideoWindow_put_WindowStyle(wma->vidwin, style);
00234     IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom);
00235     wma->opened = TRUE;
00236 
00237     if (dwFlags & MCI_NOTIFY)
00238         mciDriverNotify(HWND_32(LOWORD(lpOpenParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
00239 
00240     return 0;
00241 
00242 err:
00243     if (wma->vidbasic)
00244         IUnknown_Release(wma->vidbasic);
00245     wma->vidbasic = NULL;
00246     if (wma->seek)
00247         IUnknown_Release(wma->seek);
00248     wma->seek = NULL;
00249     if (wma->vidwin)
00250         IUnknown_Release(wma->vidwin);
00251     wma->vidwin = NULL;
00252     if (wma->pgraph)
00253         IGraphBuilder_Release(wma->pgraph);
00254     wma->pgraph = NULL;
00255     if (wma->mevent)
00256         IMediaEvent_Release(wma->mevent);
00257     wma->mevent = NULL;
00258     if (wma->pmctrl)
00259         IMediaControl_Release(wma->pmctrl);
00260     wma->pmctrl = NULL;
00261 
00262     if (wma->uninit)
00263         CoUninitialize();
00264     wma->uninit = 0;
00265 
00266     return MCIERR_INTERNAL;
00267 }
00268 
00269 /***************************************************************************
00270  *                              MCIQTZ_mciClose                 [internal]
00271  */
00272 static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
00273 {
00274     WINE_MCIQTZ* wma;
00275 
00276     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00277 
00278     wma = MCIQTZ_mciGetOpenDev(wDevID);
00279     if (!wma)
00280         return MCIERR_INVALID_DEVICE_ID;
00281 
00282     MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
00283 
00284     if (wma->opened) {
00285         IUnknown_Release(wma->vidwin);
00286         IUnknown_Release(wma->vidbasic);
00287         IUnknown_Release(wma->seek);
00288         IMediaEvent_Release(wma->mevent);
00289         IGraphBuilder_Release(wma->pgraph);
00290         IMediaControl_Release(wma->pmctrl);
00291         if (wma->uninit)
00292             CoUninitialize();
00293         wma->opened = FALSE;
00294     }
00295 
00296     return 0;
00297 }
00298 
00299 /***************************************************************************
00300  *                              MCIQTZ_mciPlay                  [internal]
00301  */
00302 static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
00303 {
00304     WINE_MCIQTZ* wma;
00305     HRESULT hr;
00306     REFERENCE_TIME time1 = 0, time2 = 0;
00307     GUID format;
00308     DWORD pos1;
00309 
00310     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00311 
00312     if (!lpParms)
00313         return MCIERR_NULL_PARAMETER_BLOCK;
00314 
00315     wma = MCIQTZ_mciGetOpenDev(wDevID);
00316     if (!wma)
00317         return MCIERR_INVALID_DEVICE_ID;
00318 
00319     IMediaSeeking_GetTimeFormat(wma->seek, &format);
00320     if (dwFlags & MCI_FROM) {
00321         if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME))
00322             time1 = lpParms->dwFrom * 10000;
00323         else
00324             time1 = lpParms->dwFrom;
00325         pos1 = AM_SEEKING_AbsolutePositioning;
00326     } else
00327         pos1 = AM_SEEKING_NoPositioning;
00328     if (dwFlags & MCI_TO) {
00329         if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME))
00330             time2 = lpParms->dwTo * 10000;
00331         else
00332             time2 = lpParms->dwTo;
00333     } else
00334         IMediaSeeking_GetDuration(wma->seek, &time2);
00335     IMediaSeeking_SetPositions(wma->seek, &time1, pos1, &time2, AM_SEEKING_AbsolutePositioning);
00336 
00337     hr = IMediaControl_Run(wma->pmctrl);
00338     if (FAILED(hr)) {
00339         TRACE("Cannot run filtergraph (hr = %x)\n", hr);
00340         return MCIERR_INTERNAL;
00341     }
00342 
00343     IVideoWindow_put_Visible(wma->vidwin, OATRUE);
00344 
00345     if (dwFlags & MCI_NOTIFY)
00346         mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
00347     return 0;
00348 }
00349 
00350 /***************************************************************************
00351  *                              MCIQTZ_mciSeek                  [internal]
00352  */
00353 static DWORD MCIQTZ_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
00354 {
00355     WINE_MCIQTZ* wma;
00356     HRESULT hr;
00357     LONGLONG newpos;
00358 
00359     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00360 
00361     if (!lpParms)
00362         return MCIERR_NULL_PARAMETER_BLOCK;
00363 
00364     wma = MCIQTZ_mciGetOpenDev(wDevID);
00365     if (!wma)
00366         return MCIERR_INVALID_DEVICE_ID;
00367 
00368     MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
00369 
00370     if (dwFlags & MCI_SEEK_TO_START) {
00371         newpos = 0;
00372     } else if (dwFlags & MCI_SEEK_TO_END) {
00373         FIXME("MCI_SEEK_TO_END not implemented yet\n");
00374         return MCIERR_INTERNAL;
00375     } else if (dwFlags & MCI_TO) {
00376         FIXME("MCI_TO not implemented yet\n");
00377         return MCIERR_INTERNAL;
00378     } else {
00379         WARN("dwFlag doesn't tell where to seek to...\n");
00380         return MCIERR_MISSING_PARAMETER;
00381     }
00382 
00383     hr = IMediaSeeking_SetPositions(wma->seek, &newpos, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
00384     if (FAILED(hr)) {
00385         FIXME("Cannot set position (hr = %x)\n", hr);
00386         return MCIERR_INTERNAL;
00387     }
00388 
00389     if (dwFlags & MCI_NOTIFY)
00390         mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
00391 
00392     return 0;
00393 }
00394 
00395 /***************************************************************************
00396  *                              MCIQTZ_mciStop                  [internal]
00397  */
00398 static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
00399 {
00400     WINE_MCIQTZ* wma;
00401     HRESULT hr;
00402 
00403     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00404 
00405     wma = MCIQTZ_mciGetOpenDev(wDevID);
00406     if (!wma)
00407         return MCIERR_INVALID_DEVICE_ID;
00408 
00409     if (!wma->opened)
00410         return 0;
00411 
00412     hr = IMediaControl_Stop(wma->pmctrl);
00413     if (FAILED(hr)) {
00414         TRACE("Cannot stop filtergraph (hr = %x)\n", hr);
00415         return MCIERR_INTERNAL;
00416     }
00417 
00418     if (!wma->parent)
00419         IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
00420 
00421     return 0;
00422 }
00423 
00424 /***************************************************************************
00425  *                              MCIQTZ_mciPause                 [internal]
00426  */
00427 static DWORD MCIQTZ_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
00428 {
00429     WINE_MCIQTZ* wma;
00430     HRESULT hr;
00431 
00432     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00433 
00434     wma = MCIQTZ_mciGetOpenDev(wDevID);
00435     if (!wma)
00436         return MCIERR_INVALID_DEVICE_ID;
00437 
00438     hr = IMediaControl_Pause(wma->pmctrl);
00439     if (FAILED(hr)) {
00440         TRACE("Cannot pause filtergraph (hr = %x)\n", hr);
00441         return MCIERR_INTERNAL;
00442     }
00443 
00444     return 0;
00445 }
00446 
00447 /***************************************************************************
00448  *                              MCIQTZ_mciGetDevCaps            [internal]
00449  */
00450 static DWORD MCIQTZ_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms)
00451 {
00452     WINE_MCIQTZ* wma;
00453 
00454     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00455 
00456     if (!lpParms)
00457         return MCIERR_NULL_PARAMETER_BLOCK;
00458 
00459     wma = MCIQTZ_mciGetOpenDev(wDevID);
00460     if (!wma)
00461         return MCIERR_INVALID_DEVICE_ID;
00462 
00463     if (!(dwFlags & MCI_GETDEVCAPS_ITEM))
00464         return MCIERR_MISSING_PARAMETER;
00465 
00466     switch (lpParms->dwItem) {
00467         case MCI_GETDEVCAPS_CAN_RECORD:
00468             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00469             TRACE("MCI_GETDEVCAPS_CAN_RECORD = %08x\n", lpParms->dwReturn);
00470             break;
00471         case MCI_GETDEVCAPS_HAS_AUDIO:
00472             lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
00473             TRACE("MCI_GETDEVCAPS_HAS_AUDIO = %08x\n", lpParms->dwReturn);
00474             break;
00475         case MCI_GETDEVCAPS_HAS_VIDEO:
00476             lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
00477             TRACE("MCI_GETDEVCAPS_HAS_VIDEO = %08x\n", lpParms->dwReturn);
00478             break;
00479         case MCI_GETDEVCAPS_DEVICE_TYPE:
00480             lpParms->dwReturn = MAKEMCIRESOURCE(MCI_DEVTYPE_DIGITAL_VIDEO, MCI_DEVTYPE_DIGITAL_VIDEO);
00481             TRACE("MCI_GETDEVCAPS_DEVICE_TYPE = %08x\n", lpParms->dwReturn);
00482             break;
00483         case MCI_GETDEVCAPS_USES_FILES:
00484             lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
00485             TRACE("MCI_GETDEVCAPS_USES_FILES = %08x\n", lpParms->dwReturn);
00486             break;
00487         case MCI_GETDEVCAPS_COMPOUND_DEVICE:
00488             lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
00489             TRACE("MCI_GETDEVCAPS_COMPOUND_DEVICE = %08x\n", lpParms->dwReturn);
00490             break;
00491         case MCI_GETDEVCAPS_CAN_EJECT:
00492             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00493             TRACE("MCI_GETDEVCAPS_EJECT = %08x\n", lpParms->dwReturn);
00494             break;
00495         case MCI_GETDEVCAPS_CAN_PLAY:
00496             lpParms->dwReturn = MAKEMCIRESOURCE(TRUE, MCI_TRUE);
00497             TRACE("MCI_GETDEVCAPS_CAN_PLAY = %08x\n", lpParms->dwReturn);
00498             break;
00499         case MCI_GETDEVCAPS_CAN_SAVE:
00500             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00501             TRACE("MCI_GETDEVCAPS_CAN_SAVE = %08x\n", lpParms->dwReturn);
00502             break;
00503         case MCI_DGV_GETDEVCAPS_CAN_REVERSE:
00504             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00505             TRACE("MCI_DGV_GETDEVCAPS_CAN_REVERSE = %08x\n", lpParms->dwReturn);
00506             break;
00507         case MCI_DGV_GETDEVCAPS_CAN_STRETCH:
00508             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE); /* FIXME */
00509             TRACE("MCI_DGV_GETDEVCAPS_CAN_STRETCH = %08x\n", lpParms->dwReturn);
00510             break;
00511         case MCI_DGV_GETDEVCAPS_CAN_LOCK:
00512             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00513             TRACE("MCI_DGV_GETDEVCAPS_CAN_LOCK = %08x\n", lpParms->dwReturn);
00514             break;
00515         case MCI_DGV_GETDEVCAPS_CAN_FREEZE:
00516             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00517             TRACE("MCI_DGV_GETDEVCAPS_CAN_FREEZE = %08x\n", lpParms->dwReturn);
00518             break;
00519         case MCI_DGV_GETDEVCAPS_CAN_STR_IN:
00520             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00521             TRACE("MCI_DGV_GETDEVCAPS_CAN_STRETCH_INPUT = %08x\n", lpParms->dwReturn);
00522             break;
00523         case MCI_DGV_GETDEVCAPS_HAS_STILL:
00524             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE);
00525             TRACE("MCI_DGV_GETDEVCAPS_HAS_STILL = %08x\n", lpParms->dwReturn);
00526             break;
00527         case MCI_DGV_GETDEVCAPS_CAN_TEST:
00528             lpParms->dwReturn = MAKEMCIRESOURCE(FALSE, MCI_FALSE); /* FIXME */
00529             TRACE("MCI_DGV_GETDEVCAPS_CAN_TEST = %08x\n", lpParms->dwReturn);
00530             break;
00531         case MCI_DGV_GETDEVCAPS_MAX_WINDOWS:
00532             lpParms->dwReturn = 1;
00533             TRACE("MCI_DGV_GETDEVCAPS_MAX_WINDOWS = %u\n", lpParms->dwReturn);
00534             return 0;
00535         default:
00536             WARN("Unknown capability %08x\n", lpParms->dwItem);
00537             /* Fall through */
00538         case MCI_DGV_GETDEVCAPS_MAXIMUM_RATE: /* unknown to w2k */
00539         case MCI_DGV_GETDEVCAPS_MINIMUM_RATE: /* unknown to w2k */
00540             return MCIERR_UNSUPPORTED_FUNCTION;
00541     }
00542 
00543     return MCI_RESOURCE_RETURNED;
00544 }
00545 
00546 /***************************************************************************
00547  *                              MCIQTZ_mciSet                   [internal]
00548  */
00549 static DWORD MCIQTZ_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
00550 {
00551     WINE_MCIQTZ* wma;
00552 
00553     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00554 
00555     if (!lpParms)
00556         return MCIERR_NULL_PARAMETER_BLOCK;
00557 
00558     wma = MCIQTZ_mciGetOpenDev(wDevID);
00559     if (!wma)
00560         return MCIERR_INVALID_DEVICE_ID;
00561 
00562     if (dwFlags & MCI_SET_TIME_FORMAT) {
00563         switch (lpParms->dwTimeFormat) {
00564             case MCI_FORMAT_MILLISECONDS:
00565                 TRACE("MCI_SET_TIME_FORMAT = MCI_FORMAT_MILLISECONDS\n");
00566                 wma->time_format = MCI_FORMAT_MILLISECONDS;
00567                 break;
00568             case MCI_FORMAT_FRAMES:
00569                 TRACE("MCI_SET_TIME_FORMAT = MCI_FORMAT_FRAMES\n");
00570                 wma->time_format = MCI_FORMAT_FRAMES;
00571                 break;
00572             default:
00573                 WARN("Bad time format %u\n", lpParms->dwTimeFormat);
00574                 return MCIERR_BAD_TIME_FORMAT;
00575         }
00576     }
00577 
00578     if (dwFlags & MCI_SET_DOOR_OPEN)
00579         FIXME("MCI_SET_DOOR_OPEN not implemented yet\n");
00580     if (dwFlags & MCI_SET_DOOR_CLOSED)
00581         FIXME("MCI_SET_DOOR_CLOSED not implemented yet\n");
00582     if (dwFlags & MCI_SET_AUDIO)
00583         FIXME("MCI_SET_AUDIO not implemented yet\n");
00584     if (dwFlags & MCI_SET_VIDEO)
00585         FIXME("MCI_SET_VIDEO not implemented yet\n");
00586     if (dwFlags & MCI_SET_ON)
00587         FIXME("MCI_SET_ON not implemented yet\n");
00588     if (dwFlags & MCI_SET_OFF)
00589         FIXME("MCI_SET_OFF not implemented yet\n");
00590     if (dwFlags & MCI_SET_AUDIO_LEFT)
00591         FIXME("MCI_SET_AUDIO_LEFT not implemented yet\n");
00592     if (dwFlags & MCI_SET_AUDIO_RIGHT)
00593         FIXME("MCI_SET_AUDIO_RIGHT not implemented yet\n");
00594 
00595     if (dwFlags & ~0x7f03 /* All MCI_SET flags mask */)
00596         ERR("Unknown flags %08x\n", dwFlags & ~0x7f03);
00597 
00598     return 0;
00599 }
00600 
00601 /***************************************************************************
00602  *                              MCIQTZ_mciStatus                [internal]
00603  */
00604 static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms)
00605 {
00606     WINE_MCIQTZ* wma;
00607     HRESULT hr;
00608 
00609     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00610 
00611     if (!lpParms)
00612         return MCIERR_NULL_PARAMETER_BLOCK;
00613 
00614     wma = MCIQTZ_mciGetOpenDev(wDevID);
00615     if (!wma)
00616         return MCIERR_INVALID_DEVICE_ID;
00617 
00618     if (!(dwFlags & MCI_STATUS_ITEM)) {
00619         WARN("No status item specified\n");
00620         return MCIERR_UNRECOGNIZED_COMMAND;
00621     }
00622 
00623     switch (lpParms->dwItem) {
00624         case MCI_STATUS_LENGTH: {
00625             LONGLONG duration = -1;
00626             GUID format;
00627             switch (wma->time_format) {
00628                 case MCI_FORMAT_MILLISECONDS: format = TIME_FORMAT_MEDIA_TIME; break;
00629                 case MCI_FORMAT_FRAMES: format = TIME_FORMAT_FRAME; break;
00630                 default: ERR("Unhandled format %x\n", wma->time_format); break;
00631             }
00632             hr = IMediaSeeking_SetTimeFormat(wma->seek, &format);
00633             if (FAILED(hr)) {
00634                 FIXME("Cannot set time format (hr = %x)\n", hr);
00635                 lpParms->dwReturn = 0;
00636                 break;
00637             }
00638             hr = IMediaSeeking_GetDuration(wma->seek, &duration);
00639             if (FAILED(hr) || duration < 0) {
00640                 FIXME("Cannot read duration (hr = %x)\n", hr);
00641                 lpParms->dwReturn = 0;
00642             } else if (wma->time_format != MCI_FORMAT_MILLISECONDS)
00643                 lpParms->dwReturn = duration;
00644             else
00645                 lpParms->dwReturn = duration / 10000;
00646             break;
00647         }
00648         case MCI_STATUS_POSITION: {
00649             REFERENCE_TIME curpos;
00650 
00651             hr = IMediaSeeking_GetCurrentPosition(wma->seek, &curpos);
00652             if (FAILED(hr)) {
00653                 FIXME("Cannot get position (hr = %x)\n", hr);
00654                 return MCIERR_INTERNAL;
00655             }
00656             lpParms->dwReturn = curpos / 10000;
00657             break;
00658         }
00659         case MCI_STATUS_NUMBER_OF_TRACKS:
00660             FIXME("MCI_STATUS_NUMBER_OF_TRACKS not implemented yet\n");
00661             return MCIERR_UNRECOGNIZED_COMMAND;
00662         case MCI_STATUS_MODE: {
00663             LONG state = State_Stopped;
00664             IMediaControl_GetState(wma->pmctrl, -1, &state);
00665             if (state == State_Stopped)
00666                 lpParms->dwReturn = MCI_MODE_STOP;
00667             else if (state == State_Running) {
00668                 LONG code;
00669                 LONG_PTR p1, p2;
00670 
00671                 lpParms->dwReturn = MCI_MODE_PLAY;
00672 
00673                 do {
00674                     hr = IMediaEvent_GetEvent(wma->mevent, &code, &p1, &p2, 0);
00675                     if (hr == S_OK && code == EC_COMPLETE){
00676                         lpParms->dwReturn = MCI_MODE_STOP;
00677                         IMediaControl_Stop(wma->pmctrl);
00678                     }
00679                 } while (hr == S_OK);
00680 
00681             } else if (state == State_Paused)
00682                 lpParms->dwReturn = MCI_MODE_PAUSE;
00683             break;
00684         }
00685         case MCI_STATUS_MEDIA_PRESENT:
00686             FIXME("MCI_STATUS_MEDIA_PRESENT not implemented yet\n");
00687             return MCIERR_UNRECOGNIZED_COMMAND;
00688         case MCI_STATUS_TIME_FORMAT:
00689             lpParms->dwReturn = wma->time_format;
00690             break;
00691         case MCI_STATUS_READY:
00692             FIXME("MCI_STATUS_READY not implemented yet\n");
00693             return MCIERR_UNRECOGNIZED_COMMAND;
00694         case MCI_STATUS_CURRENT_TRACK:
00695             FIXME("MCI_STATUS_CURRENT_TRACK not implemented yet\n");
00696             return MCIERR_UNRECOGNIZED_COMMAND;
00697         default:
00698             FIXME("Unknown command %08X\n", lpParms->dwItem);
00699             return MCIERR_UNRECOGNIZED_COMMAND;
00700     }
00701 
00702     if (dwFlags & MCI_NOTIFY)
00703         mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
00704 
00705     return 0;
00706 }
00707 
00708 /***************************************************************************
00709  *                              MCIQTZ_mciWhere                 [internal]
00710  */
00711 static DWORD MCIQTZ_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms)
00712 {
00713     WINE_MCIQTZ* wma;
00714     HRESULT hr;
00715     HWND hWnd;
00716     RECT rc;
00717     DWORD ret = MCIERR_UNRECOGNIZED_COMMAND;
00718 
00719     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00720 
00721     if (!lpParms)
00722         return MCIERR_NULL_PARAMETER_BLOCK;
00723 
00724     wma = MCIQTZ_mciGetOpenDev(wDevID);
00725     if (!wma)
00726         return MCIERR_INVALID_DEVICE_ID;
00727 
00728     hr = IVideoWindow_get_Owner(wma->vidwin, (OAHWND*)&hWnd);
00729     if (FAILED(hr)) {
00730         TRACE("No video stream, returning no window error\n");
00731         return MCIERR_NO_WINDOW;
00732     }
00733 
00734     if (dwFlags & MCI_DGV_WHERE_SOURCE) {
00735         if (dwFlags & MCI_DGV_WHERE_MAX)
00736             FIXME("MCI_DGV_WHERE_SOURCE_MAX stub %s\n", wine_dbgstr_rect(&rc));
00737         IBasicVideo_GetSourcePosition(wma->vidbasic, &rc.left, &rc.top, &rc.right, &rc.bottom);
00738         TRACE("MCI_DGV_WHERE_SOURCE %s\n", wine_dbgstr_rect(&rc));
00739     }
00740     if (dwFlags & MCI_DGV_WHERE_DESTINATION) {
00741         if (dwFlags & MCI_DGV_WHERE_MAX)
00742             FIXME("MCI_DGV_WHERE_DESTINATION_MAX stub %s\n", wine_dbgstr_rect(&rc));
00743         IBasicVideo_GetDestinationPosition(wma->vidbasic, &rc.left, &rc.top, &rc.right, &rc.bottom);
00744         TRACE("MCI_DGV_WHERE_DESTINATION %s\n", wine_dbgstr_rect(&rc));
00745     }
00746     if (dwFlags & MCI_DGV_WHERE_FRAME) {
00747         if (dwFlags & MCI_DGV_WHERE_MAX)
00748             FIXME("MCI_DGV_WHERE_FRAME_MAX not supported yet\n");
00749         else
00750             FIXME("MCI_DGV_WHERE_FRAME not supported yet\n");
00751         goto out;
00752     }
00753     if (dwFlags & MCI_DGV_WHERE_VIDEO) {
00754         if (dwFlags & MCI_DGV_WHERE_MAX)
00755             FIXME("MCI_DGV_WHERE_VIDEO_MAX not supported yet\n");
00756         else
00757             FIXME("MCI_DGV_WHERE_VIDEO not supported yet\n");
00758         goto out;
00759     }
00760     if (dwFlags & MCI_DGV_WHERE_WINDOW) {
00761         if (dwFlags & MCI_DGV_WHERE_MAX) {
00762             GetWindowRect(GetDesktopWindow(), &rc);
00763             rc.right -= rc.left;
00764             rc.bottom -= rc.top;
00765             TRACE("MCI_DGV_WHERE_WINDOW_MAX %s\n", wine_dbgstr_rect(&rc));
00766         } else {
00767             IVideoWindow_GetWindowPosition(wma->vidwin, &rc.left, &rc.top, &rc.right, &rc.bottom);
00768             TRACE("MCI_DGV_WHERE_WINDOW %s\n", wine_dbgstr_rect(&rc));
00769         }
00770     }
00771     ret = 0;
00772 out:
00773     lpParms->rc = rc;
00774     return ret;
00775 }
00776 
00777 /***************************************************************************
00778  *                              MCIQTZ_mciWindow                [internal]
00779  */
00780 static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms)
00781 {
00782     WINE_MCIQTZ *wma = MCIQTZ_mciGetOpenDev(wDevID);
00783 
00784     TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
00785 
00786     if (!lpParms)
00787         return MCIERR_NULL_PARAMETER_BLOCK;
00788     if (!wma)
00789         return MCIERR_INVALID_DEVICE_ID;
00790     if (dwFlags & MCI_TEST)
00791         return 0;
00792 
00793     if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) {
00794         LONG visible = OATRUE;
00795         LONG style = 0;
00796         TRACE("Setting hWnd to %p\n", lpParms->hWnd);
00797         IVideoWindow_get_Visible(wma->vidwin, &visible);
00798         IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
00799         IVideoWindow_get_WindowStyle(wma->vidwin, &style);
00800         style &= ~WS_CHILD;
00801         if (lpParms->hWnd)
00802             IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD);
00803         else
00804             IVideoWindow_put_WindowStyle(wma->vidwin, style);
00805         IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd);
00806         IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd);
00807         IVideoWindow_put_Visible(wma->vidwin, visible);
00808         wma->parent = lpParms->hWnd;
00809     }
00810     if (dwFlags & MCI_DGV_WINDOW_STATE) {
00811         TRACE("Setting nCmdShow to %d\n", lpParms->nCmdShow);
00812         IVideoWindow_put_WindowState(wma->vidwin, lpParms->nCmdShow);
00813     }
00814     if (dwFlags & MCI_DGV_WINDOW_TEXT) {
00815         TRACE("Setting caption to %s\n", debugstr_w(lpParms->lpstrText));
00816         IVideoWindow_put_Caption(wma->vidwin, lpParms->lpstrText);
00817     }
00818     return 0;
00819 }
00820 
00821 /******************************************************************************
00822  *              MCIAVI_mciUpdate            [internal]
00823  */
00824 static DWORD MCIQTZ_mciUpdate(UINT wDevID, DWORD dwFlags, LPMCI_DGV_UPDATE_PARMS lpParms)
00825 {
00826     WINE_MCIQTZ *wma;
00827     DWORD res = 0;
00828 
00829     TRACE("%04x, %08x, %p\n", wDevID, dwFlags, lpParms);
00830 
00831     if (!lpParms)
00832         return MCIERR_NULL_PARAMETER_BLOCK;
00833 
00834     wma = MCIQTZ_mciGetOpenDev(wDevID);
00835     if (!wma)
00836         return MCIERR_INVALID_DEVICE_ID;
00837 
00838     if (dwFlags & MCI_DGV_UPDATE_HDC) {
00839         LONG state, size;
00840         BYTE *data;
00841         BITMAPINFO *info;
00842         HRESULT hr;
00843         RECT src, dest;
00844         LONG visible = OATRUE;
00845 
00846         res = MCIERR_INTERNAL;
00847         IMediaControl_GetState(wma->pmctrl, -1, &state);
00848         if (state == State_Running)
00849             return MCIERR_UNSUPPORTED_FUNCTION;
00850         /* If in stopped state, nothing has been drawn to screen
00851          * moving to pause, which is needed for the old dib renderer, will result
00852          * in a single frame drawn, so hide the window here */
00853         IVideoWindow_get_Visible(wma->vidwin, &visible);
00854         if (wma->parent)
00855             IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
00856         /* FIXME: Should we check the original state and restore it? */
00857         IMediaControl_Pause(wma->pmctrl);
00858         IMediaControl_GetState(wma->pmctrl, -1, &state);
00859         if (FAILED(hr = IBasicVideo_GetCurrentImage(wma->vidbasic, &size, NULL))) {
00860             WARN("Could not get image size (hr = %x)\n", hr);
00861             goto out;
00862         }
00863         data = HeapAlloc(GetProcessHeap(), 0, size);
00864         info = (BITMAPINFO*)data;
00865         IBasicVideo_GetCurrentImage(wma->vidbasic, &size, (LONG*)data);
00866         data += info->bmiHeader.biSize;
00867 
00868         IBasicVideo_GetSourcePosition(wma->vidbasic, &src.left, &src.top, &src.right, &src.bottom);
00869         IBasicVideo_GetDestinationPosition(wma->vidbasic, &dest.left, &dest.top, &dest.right, &dest.bottom);
00870         StretchDIBits(lpParms->hDC,
00871               dest.left, dest.top, dest.right + dest.left, dest.bottom + dest.top,
00872               src.left, src.top, src.right + src.left, src.bottom + src.top,
00873               data, info, DIB_RGB_COLORS, SRCCOPY);
00874         HeapFree(GetProcessHeap(), 0, data);
00875         res = 0;
00876 out:
00877         if (wma->parent)
00878             IVideoWindow_put_Visible(wma->vidwin, visible);
00879     }
00880     else if (dwFlags)
00881         FIXME("Unhandled flags %x\n", dwFlags);
00882     return res;
00883 }
00884 
00885 /***************************************************************************
00886  *                              MCIQTZ_mciSetAudio              [internal]
00887  */
00888 static DWORD MCIQTZ_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PARMSW lpParms)
00889 {
00890     WINE_MCIQTZ *wma;
00891 
00892     FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms);
00893 
00894     if (!lpParms)
00895         return MCIERR_NULL_PARAMETER_BLOCK;
00896 
00897     wma = MCIQTZ_mciGetOpenDev(wDevID);
00898     if (!wma)
00899         return MCIERR_INVALID_DEVICE_ID;
00900 
00901     MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
00902 
00903     return 0;
00904 }
00905 
00906 /*======================================================================*
00907  *                          MCI QTZ entry points                        *
00908  *======================================================================*/
00909 
00910 /**************************************************************************
00911  *                              DriverProc (MCIQTZ.@)
00912  */
00913 LRESULT CALLBACK MCIQTZ_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
00914                                    LPARAM dwParam1, LPARAM dwParam2)
00915 {
00916     TRACE("(%08lX, %p, %08X, %08lX, %08lX)\n",
00917           dwDevID, hDriv, wMsg, dwParam1, dwParam2);
00918 
00919     switch (wMsg) {
00920         case DRV_LOAD:                  return 1;
00921         case DRV_FREE:                  return 1;
00922         case DRV_OPEN:                  return MCIQTZ_drvOpen((LPCWSTR)dwParam1, (LPMCI_OPEN_DRIVER_PARMSW)dwParam2);
00923         case DRV_CLOSE:                 return MCIQTZ_drvClose(dwDevID);
00924         case DRV_ENABLE:                return 1;
00925         case DRV_DISABLE:               return 1;
00926         case DRV_QUERYCONFIGURE:        return 1;
00927         case DRV_CONFIGURE:             return MCIQTZ_drvConfigure(dwDevID);
00928         case DRV_INSTALL:               return DRVCNF_RESTART;
00929         case DRV_REMOVE:                return DRVCNF_RESTART;
00930     }
00931 
00932     /* session instance */
00933     if (dwDevID == 0xFFFFFFFF)
00934         return 1;
00935 
00936     switch (wMsg) {
00937         case MCI_OPEN_DRIVER:   return MCIQTZ_mciOpen      (dwDevID, dwParam1, (LPMCI_DGV_OPEN_PARMSW)     dwParam2);
00938         case MCI_CLOSE_DRIVER:  return MCIQTZ_mciClose     (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)       dwParam2);
00939         case MCI_PLAY:          return MCIQTZ_mciPlay      (dwDevID, dwParam1, (LPMCI_PLAY_PARMS)          dwParam2);
00940         case MCI_SEEK:          return MCIQTZ_mciSeek      (dwDevID, dwParam1, (LPMCI_SEEK_PARMS)          dwParam2);
00941         case MCI_STOP:          return MCIQTZ_mciStop      (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)       dwParam2);
00942         case MCI_PAUSE:         return MCIQTZ_mciPause     (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS)       dwParam2);
00943         case MCI_GETDEVCAPS:    return MCIQTZ_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS)    dwParam2);
00944         case MCI_SET:           return MCIQTZ_mciSet       (dwDevID, dwParam1, (LPMCI_DGV_SET_PARMS)       dwParam2);
00945         case MCI_STATUS:        return MCIQTZ_mciStatus    (dwDevID, dwParam1, (LPMCI_DGV_STATUS_PARMSW)   dwParam2);
00946         case MCI_WHERE:         return MCIQTZ_mciWhere     (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS)      dwParam2);
00947         /* Digital Video specific */
00948         case MCI_SETAUDIO:      return MCIQTZ_mciSetAudio  (dwDevID, dwParam1, (LPMCI_DGV_SETAUDIO_PARMSW) dwParam2);
00949         case MCI_UPDATE:
00950             return MCIQTZ_mciUpdate(dwDevID, dwParam1, (LPMCI_DGV_UPDATE_PARMS)dwParam2);
00951         case MCI_WINDOW:
00952             return MCIQTZ_mciWindow(dwDevID, dwParam1, (LPMCI_DGV_WINDOW_PARMSW)dwParam2);
00953         case MCI_PUT:
00954         case MCI_RECORD:
00955         case MCI_RESUME:
00956         case MCI_INFO:
00957         case MCI_LOAD:
00958         case MCI_SAVE:
00959         case MCI_FREEZE:
00960         case MCI_REALIZE:
00961         case MCI_UNFREEZE:
00962         case MCI_STEP:
00963         case MCI_COPY:
00964         case MCI_CUT:
00965         case MCI_DELETE:
00966         case MCI_PASTE:
00967         case MCI_CUE:
00968         /* Digital Video specific */
00969         case MCI_CAPTURE:
00970         case MCI_MONITOR:
00971         case MCI_RESERVE:
00972         case MCI_SIGNAL:
00973         case MCI_SETVIDEO:
00974         case MCI_QUALITY:
00975         case MCI_LIST:
00976         case MCI_UNDO:
00977         case MCI_CONFIGURE:
00978         case MCI_RESTORE:
00979             FIXME("Unimplemented command [%08X]\n", wMsg);
00980             break;
00981         case MCI_SPIN:
00982         case MCI_ESCAPE:
00983             WARN("Unsupported command [%08X]\n", wMsg);
00984             break;
00985         case MCI_OPEN:
00986         case MCI_CLOSE:
00987             FIXME("Shouldn't receive a MCI_OPEN or CLOSE message\n");
00988             break;
00989         default:
00990             TRACE("Sending msg [%08X] to default driver proc\n", wMsg);
00991             return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
00992     }
00993 
00994     return MCIERR_UNRECOGNIZED_COMMAND;
00995 }

Generated on Sun May 27 2012 04:24:40 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.