Index: base/applications/mplay32/lang/bg-BG.rc =================================================================== --- base/applications/mplay32/lang/bg-BG.rc (revision 63945) +++ base/applications/mplay32/lang/bg-BG.rc (working copy) @@ -58,5 +58,4 @@ IDS_APPTITLE "Мултимедийният възпроизводител на РеактОС" IDS_PLAY "Възпроизвеждане" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/cs-CZ.rc =================================================================== --- base/applications/mplay32/lang/cs-CZ.rc (revision 63945) +++ base/applications/mplay32/lang/cs-CZ.rc (working copy) @@ -59,5 +59,4 @@ IDS_APPTITLE "ReactOS Přehrávač multimédií" IDS_PLAY "Přehrát" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/de-DE.rc =================================================================== --- base/applications/mplay32/lang/de-DE.rc (revision 63945) +++ base/applications/mplay32/lang/de-DE.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Abspielen" IDS_DEFAULTMCIERRMSG "Für diesen Fehler steht keine Beschreibung zur Verfügung" - IDS_UNKNOWNFILEEXT "Kann keinen Gerätetyp aus der angegebenen Dateinamenerweiterung ermitteln." END Index: base/applications/mplay32/lang/en-US.rc =================================================================== --- base/applications/mplay32/lang/en-US.rc (revision 63945) +++ base/applications/mplay32/lang/en-US.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Play" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/es-ES.rc =================================================================== --- base/applications/mplay32/lang/es-ES.rc (revision 63945) +++ base/applications/mplay32/lang/es-ES.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "Reproductor Multimedia de ReactOS" IDS_PLAY "Reproducir" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/fr-FR.rc =================================================================== --- base/applications/mplay32/lang/fr-FR.rc (revision 63945) +++ base/applications/mplay32/lang/fr-FR.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Lire" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/he-IL.rc =================================================================== --- base/applications/mplay32/lang/he-IL.rc (revision 63945) +++ base/applications/mplay32/lang/he-IL.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "נגן המולטימדיה של ReactOS" IDS_PLAY "נגן" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/it-IT.rc =================================================================== --- base/applications/mplay32/lang/it-IT.rc (revision 63945) +++ base/applications/mplay32/lang/it-IT.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "Riproduttore multimediale ReactOS" IDS_PLAY "Riproduci" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/ja-JP.rc =================================================================== --- base/applications/mplay32/lang/ja-JP.rc (revision 63945) +++ base/applications/mplay32/lang/ja-JP.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "ReactOS マルチメディア プレーヤー" IDS_PLAY "再生" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/nl-NL.rc =================================================================== --- base/applications/mplay32/lang/nl-NL.rc (revision 63945) +++ base/applications/mplay32/lang/nl-NL.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Play" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/no-NO.rc =================================================================== --- base/applications/mplay32/lang/no-NO.rc (revision 63945) +++ base/applications/mplay32/lang/no-NO.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "ReactOS Multimedia avspiller" IDS_PLAY "Spill" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/pl-PL.rc =================================================================== --- base/applications/mplay32/lang/pl-PL.rc (revision 63945) +++ base/applications/mplay32/lang/pl-PL.rc (working copy) @@ -62,5 +62,4 @@ IDS_APPTITLE "Odtwarzacz multimedialny ReactOS" IDS_PLAY "Odtwórz" IDS_DEFAULTMCIERRMSG "Brak dostępnego opisu dla tego błędu" - IDS_UNKNOWNFILEEXT "Nie można określić typu urządzenia z podanego rozszerzenia pliku." END Index: base/applications/mplay32/lang/pt-BR.rc =================================================================== --- base/applications/mplay32/lang/pt-BR.rc (revision 63945) +++ base/applications/mplay32/lang/pt-BR.rc (working copy) @@ -56,5 +56,4 @@ IDS_APPTITLE "ReactOS Multimedia Player" IDS_PLAY "Executar" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/ro-RO.rc =================================================================== --- base/applications/mplay32/lang/ro-RO.rc (revision 63945) +++ base/applications/mplay32/lang/ro-RO.rc (working copy) @@ -60,5 +60,4 @@ IDS_APPTITLE "Lector multimedia" IDS_PLAY "Lecturare" IDS_DEFAULTMCIERRMSG "Nu există descriere pentru această eroare" - IDS_UNKNOWNFILEEXT "Nu se poate determina tipul dispozitivului din extensia fișierului." END Index: base/applications/mplay32/lang/ru-RU.rc =================================================================== --- base/applications/mplay32/lang/ru-RU.rc (revision 63945) +++ base/applications/mplay32/lang/ru-RU.rc (working copy) @@ -54,5 +54,4 @@ IDS_APPTITLE "Проигрыватель ReactOS" IDS_PLAY "Воспроизвести" IDS_DEFAULTMCIERRMSG "Неизвестная ошибка." - IDS_UNKNOWNFILEEXT "Невозможно определить тип устройства мультимедиа для заданного расширения файла." END Index: base/applications/mplay32/lang/sk-SK.rc =================================================================== --- base/applications/mplay32/lang/sk-SK.rc (revision 63945) +++ base/applications/mplay32/lang/sk-SK.rc (working copy) @@ -59,5 +59,4 @@ IDS_APPTITLE "Multimediálny prehrávač systému ReactOS" IDS_PLAY "Prehrať" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/sq-AL.rc =================================================================== --- base/applications/mplay32/lang/sq-AL.rc (revision 63945) +++ base/applications/mplay32/lang/sq-AL.rc (working copy) @@ -58,5 +58,4 @@ IDS_APPTITLE "Programi muzikor i ReactOS" IDS_PLAY "Fillo" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/sv-SE.rc =================================================================== --- base/applications/mplay32/lang/sv-SE.rc (revision 63945) +++ base/applications/mplay32/lang/sv-SE.rc (working copy) @@ -61,5 +61,4 @@ IDS_APPTITLE "ReactOS Multimediaspelare" IDS_PLAY "Play" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/tr-TR.rc =================================================================== --- base/applications/mplay32/lang/tr-TR.rc (revision 63945) +++ base/applications/mplay32/lang/tr-TR.rc (working copy) @@ -56,5 +56,4 @@ IDS_APPTITLE "Çoklu Ortam Oynatıcısı" IDS_PLAY "Çal" IDS_DEFAULTMCIERRMSG "Bu yanlışlığın tanımı yoktur." - IDS_UNKNOWNFILEEXT "Verilen kütük türünden aygıt türü belirlenemiyor." END Index: base/applications/mplay32/lang/uk-UA.rc =================================================================== --- base/applications/mplay32/lang/uk-UA.rc (revision 63945) +++ base/applications/mplay32/lang/uk-UA.rc (working copy) @@ -62,5 +62,4 @@ IDS_APPTITLE "Програвач ReactOS" IDS_PLAY "Відтворити" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/zh-CN.rc =================================================================== --- base/applications/mplay32/lang/zh-CN.rc (revision 63945) +++ base/applications/mplay32/lang/zh-CN.rc (working copy) @@ -56,5 +56,4 @@ IDS_APPTITLE "ReactOS 多媒体播放器" IDS_PLAY "播放" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/lang/zh-TW.rc =================================================================== --- base/applications/mplay32/lang/zh-TW.rc (revision 63945) +++ base/applications/mplay32/lang/zh-TW.rc (working copy) @@ -62,5 +62,4 @@ IDS_APPTITLE "ReactOS 多媒體播放器" IDS_PLAY "播放" IDS_DEFAULTMCIERRMSG "No description is available for this error" - IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension." END Index: base/applications/mplay32/mplay32.c =================================================================== --- base/applications/mplay32/mplay32.c (revision 63945) +++ base/applications/mplay32/mplay32.c (working copy) @@ -14,10 +14,7 @@ HWND hToolBar = NULL; HMENU hMainMenu = NULL; TCHAR szAppTitle[256] = _T(""); -TCHAR szPrevFile[MAX_PATH] = _T("\0"); -WORD wDeviceId; -BOOL bIsOpened = FALSE; -BOOL bIsPaused = FALSE; +WORD wDeviceId = 0; BOOL bRepeat = FALSE; BOOL bIsSingleWindow = FALSE; UINT MaxFilePos = 0; @@ -24,6 +21,7 @@ RECT PrevWindowPos; + /* ToolBar Buttons */ static const TBBUTTON Buttons[] = { /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */ @@ -208,41 +206,6 @@ SendMessage(hToolBar, TB_ADDBUTTONS, NumButtons, (LPARAM)Buttons); } -static BOOL -IsSupportedFileExtension(LPTSTR lpFileName, LPTSTR lpDeviceName, LPDWORD dwSize) -{ - HKEY hKey; - DWORD dwType; - TCHAR *pathend; - - pathend = _tcsrchr(lpFileName, '.'); - - if (pathend == NULL) - { - return FALSE; - } - - pathend++; - - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\MCI Extensions"), 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - if (RegQueryValueEx(hKey, pathend, NULL, &dwType, (LPBYTE)lpDeviceName, dwSize) == ERROR_SUCCESS) - { - RegCloseKey(hKey); - if (dwType != REG_SZ) - { - return FALSE; - } - - return TRUE; - } - - RegCloseKey(hKey); - } - - return FALSE; -} - static VOID SwitchViewMode(HWND hwnd) { @@ -320,11 +283,11 @@ MCI_GENERIC_PARMS mciGeneric; DWORD dwError; - if (bIsOpened) + if (wDeviceId) { dwError = mciSendCommand(wDeviceId, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&mciGeneric); if (dwError) return dwError; - bIsOpened = FALSE; + wDeviceId = 0; } DisableMenuItems(); @@ -337,10 +300,11 @@ { MCI_STATUS_PARMS mciStatus; MCI_OPEN_PARMS mciOpen; - TCHAR szNewTitle[MAX_PATH]; + TCHAR szNewTitle[MAX_PATH * 2]; DWORD dwError; + DWORD dwFlags = MCI_OPEN_ELEMENT | MCI_WAIT; - if (bIsOpened) + if (wDeviceId) { CloseMciDevice(); } @@ -351,7 +315,12 @@ mciOpen.wDeviceID = 0; mciOpen.lpstrAlias = NULL; - dwError = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_ELEMENT | MCI_WAIT, (DWORD_PTR)&mciOpen); + if (lpType) + { + dwFlags = dwFlags | MCI_OPEN_TYPE; + } + + dwError = mciSendCommand(0, MCI_OPEN, dwFlags, (DWORD_PTR)&mciOpen); if (dwError != 0) { return dwError; @@ -393,8 +362,6 @@ MaxFilePos = mciStatus.dwReturn; wDeviceId = mciOpen.wDeviceID; - bIsOpened = TRUE; - _tcscpy(szPrevFile, lpFileName); EnableMenuItems(hwnd); @@ -401,20 +368,43 @@ return 0; } +static DWORD +GetDeviceMode(HWND hwnd) +{ + MCI_STATUS_PARMS mciStatus; + DWORD dwError; + + + mciStatus.dwItem = MCI_STATUS_MODE; + dwError = mciSendCommand(wDeviceId, MCI_STATUS, MCI_WAIT | MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus); + if (dwError != 0) + { + ShowMCIError(hwnd, dwError); + return MCI_MODE_NOT_READY; + } + + return mciStatus.dwReturn; +} + static VOID StopPlayback(HWND hwnd) { - if (bIsOpened) + MCI_GENERIC_PARMS mciGeneric; + DWORD dwError; + + + if (wDeviceId) { SendMessage(hTrackBar, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) 1); KillTimer(hwnd, IDT_PLAYTIMER); - if (bIsSingleWindow) + dwError = mciSendCommand(wDeviceId, MCI_STOP, MCI_WAIT, (DWORD_PTR)&mciGeneric); + if (dwError != 0) { - SwitchViewMode(hwnd); + ShowMCIError(hwnd, dwError); } - CloseMciDevice(); + mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0); } } @@ -425,7 +415,7 @@ MCI_PLAY_PARMS mciPlay; DWORD dwError; - if (bIsOpened) + if (wDeviceId) { mciSeek.dwTo = (DWORD_PTR)dwNewPos; dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_TO, (DWORD_PTR)&mciSeek); @@ -449,7 +439,7 @@ MCI_STATUS_PARMS mciStatus; DWORD dwNewPos; - if (!bIsOpened) return; + if (!wDeviceId) return; mciStatus.dwItem = MCI_STATUS_POSITION; mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus); @@ -472,7 +462,7 @@ MCI_STATUS_PARMS mciStatus; DWORD dwNewPos; - if (!bIsOpened) return; + if (!wDeviceId) return; mciStatus.dwItem = MCI_STATUS_POSITION; mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus); @@ -490,37 +480,33 @@ } static VOID -PausePlayback(HWND hwnd) +TogglePlaybackState(HWND hwnd) { MCI_GENERIC_PARMS mciGeneric; DWORD dwError; + DWORD dwMode; - if (bIsOpened) + if (!wDeviceId) { - dwError = mciSendCommand(wDeviceId, MCI_PAUSE, MCI_WAIT, (DWORD_PTR)&mciGeneric); - if (dwError != 0) - { - ShowMCIError(hwnd, dwError); - } - bIsPaused = TRUE; + return; } -} -static VOID -ResumePlayback(HWND hwnd) -{ - MCI_GENERIC_PARMS mciGeneric; - DWORD dwError; + dwMode = GetDeviceMode(hwnd); - if (bIsPaused) + if (dwMode == MCI_MODE_PLAY) { + dwError = mciSendCommand(wDeviceId, MCI_PAUSE, MCI_WAIT, (DWORD_PTR)&mciGeneric); + } + else + if (dwMode == MCI_MODE_PAUSE) + { dwError = mciSendCommand(wDeviceId, MCI_RESUME, MCI_WAIT, (DWORD_PTR)&mciGeneric); - if (dwError != 0) - { - ShowMCIError(hwnd, dwError); - } - bIsPaused = FALSE; } + + if (dwError != 0) + { + ShowMCIError(hwnd, dwError); + } } static VOID @@ -543,7 +529,7 @@ MCI_PLAY_PARMS mciPlay; DWORD dwPos; - if (!bIsOpened) KillTimer(hwnd, IDT_PLAYTIMER); + if (!wDeviceId) KillTimer(hwnd, IDT_PLAYTIMER); mciStatus.dwItem = MCI_STATUS_POSITION; mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus); @@ -569,49 +555,57 @@ } static VOID -PlayFile(HWND hwnd, LPTSTR lpFileName) +StartPlayback(HWND hwnd) { MCI_PLAY_PARMS mciPlay; - TCHAR szLocalFileName[MAX_PATH]; - TCHAR szDeviceName[MAX_PATH]; - DWORD dwSize; MCIERROR mciError; - if (lpFileName == NULL) - { - if (szPrevFile[0] == _T('\0')) - return; - _tcscpy(szLocalFileName, szPrevFile); - } - else + SetTimer(hwnd, IDT_PLAYTIMER, 100, (TIMERPROC) PlayTimerProc); + + mciPlay.dwCallback = (DWORD_PTR)hwnd; + mciPlay.dwFrom = 0; + mciPlay.dwTo = MaxFilePos; + + mciError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM /*| MCI_TO*/, (DWORD_PTR)&mciPlay); + if (mciError != 0) { - _tcscpy(szLocalFileName, lpFileName); + ShowMCIError(hwnd, mciError); } +} - if (GetFileAttributes(szLocalFileName) == INVALID_FILE_ATTRIBUTES) +static VOID +CloseMediaFile(HWND hwnd) +{ + StopPlayback(hwnd); + + if (bIsSingleWindow) { - return; + SwitchViewMode(hwnd); } - dwSize = sizeof(szDeviceName) - 2; - _tcsnset(szDeviceName, _T('\0'), dwSize / sizeof(TCHAR)); + CloseMciDevice(); - if (!IsSupportedFileExtension(szLocalFileName, szDeviceName, &dwSize)) + SetWindowText(hwnd, szAppTitle); +} + +static VOID +OpenMediaFile(HWND hwnd, LPTSTR lpFileName) +{ + MCIERROR mciError; + + + if (GetFileAttributes(lpFileName) == INVALID_FILE_ATTRIBUTES) { - TCHAR szErrorMessage[256]; - - LoadString(hInstance, IDS_UNKNOWNFILEEXT, szErrorMessage, sizeof(szErrorMessage) / sizeof(TCHAR)); - MessageBox(hwnd, szErrorMessage, szAppTitle, MB_OK | MB_ICONEXCLAMATION); return; } - if (bIsOpened) + if (wDeviceId) { - StopPlayback(hwnd); + CloseMediaFile(hwnd); } - mciError = OpenMciDevice(hwnd, szDeviceName, szLocalFileName); + mciError = OpenMciDevice(hwnd, NULL, lpFileName); if (mciError != 0) { ShowMCIError(hwnd, mciError); @@ -618,19 +612,7 @@ return; } - SetTimer(hwnd, IDT_PLAYTIMER, 100, (TIMERPROC) PlayTimerProc); - - mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0); - - mciPlay.dwCallback = (DWORD_PTR)hwnd; - mciPlay.dwFrom = 0; - mciPlay.dwTo = MaxFilePos; - - mciError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM /*| MCI_TO*/, (DWORD_PTR)&mciPlay); - if (mciError != 0) - { - ShowMCIError(hwnd, mciError); - } + StartPlayback(hwnd); } static VOID @@ -659,10 +641,12 @@ OpenFileName.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_SHAREAWARE; OpenFileName.lpstrDefExt = _T("\0"); - if (GetOpenFileName(&OpenFileName)) + if (!GetOpenFileName(&OpenFileName)) { - PlayFile(hwnd, OpenFileName.lpstrFile); + return; } + + OpenMediaFile(hwnd, OpenFileName.lpstrFile); } LRESULT CALLBACK @@ -685,7 +669,7 @@ drophandle = (HDROP)wParam; DragQueryFile(drophandle, 0, droppedfile, sizeof(droppedfile) / sizeof(TCHAR)); DragFinish(drophandle); - PlayFile(hwnd, droppedfile); + OpenMediaFile(hwnd, droppedfile); break; } @@ -784,7 +768,7 @@ { if (hTrackBar == (HWND) lParam) { - if (bIsOpened) + if (wDeviceId) { DWORD dwNewPos = (DWORD) SendMessage(hTrackBar, TBM_GETPOS, 0, 0); SeekPlayback(hwnd, dwNewPos); @@ -812,19 +796,24 @@ { case IDC_PLAY: { - if (bIsOpened) + if (wDeviceId) { - if (bIsPaused) - ResumePlayback(hwnd); + DWORD dwMode = GetDeviceMode(hwnd); + + if (dwMode == MCI_MODE_STOP) + { + StartPlayback(hwnd); + } else - PausePlayback(hwnd); - } - else - { - if (szPrevFile[0] == _T('\0')) - OpenFileDialog(hwnd); + if (dwMode == MCI_MODE_OPEN) + { + StartPlayback(hwnd); + } else - PlayFile(hwnd, NULL); + if ((dwMode == MCI_MODE_PAUSE) || (dwMode = MCI_MODE_PLAY)) + { + TogglePlaybackState(hwnd); + } } break; } @@ -855,8 +844,7 @@ return 0; case IDM_CLOSE_FILE: - StopPlayback(hwnd); - _tcscpy(szPrevFile, _T("\0")); + CloseMediaFile(hwnd); break; case IDM_REPEAT: @@ -903,6 +891,7 @@ case WM_DESTROY: StopPlayback(hwnd); + CloseMediaFile(hwnd); PostQuitMessage(0); return 0; } @@ -973,8 +962,8 @@ ShowWindow(hwnd, SW_SHOW); UpdateWindow(hwnd); - PlayFile(hwnd, lpCmdLine); - + OpenMediaFile(hwnd, lpCmdLine); + /* Message Loop */ while (GetMessage(&msg, NULL, 0, 0)) { Index: base/applications/mplay32/resource.h =================================================================== --- base/applications/mplay32/resource.h (revision 63945) +++ base/applications/mplay32/resource.h (working copy) @@ -25,7 +25,6 @@ #define IDS_ALL_TYPES_FILTER 108 #define IDS_PLAY 109 #define IDS_DEFAULTMCIERRMSG 110 -#define IDS_UNKNOWNFILEEXT 111 /* Menu */ #define IDR_MAINMENU 500