=?UTF-8?Q?J=C3=B6rg=20H=C3=B6hle=20?=: winmm: The "open new ..." MCI string command sets an empty OPEN_ELEMENT.

Alexandre Julliard julliard at winehq.org
Thu Sep 27 15:39:07 CDT 2012


Module: wine
Branch: master
Commit: 8ff7436d218834835edd54fb72f6b05c59e6590d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8ff7436d218834835edd54fb72f6b05c59e6590d

Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date:   Thu Sep 20 16:48:17 2012 +0200

winmm: The "open new ..." MCI string command sets an empty OPEN_ELEMENT.

---

 dlls/winmm/mci.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index ba2fea6..1448b16 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -898,6 +898,13 @@ static DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dw
 
 /**************************************************************************
  * 			MCI_FinishOpen				[internal]
+ *
+ * Three modes of operation:
+ * 1 open foo.ext ...        -> OPEN_ELEMENT with lpstrElementName=foo.ext
+ *   open sequencer!foo.ext     same         with lpstrElementName=foo.ext
+ * 2 open new type waveaudio -> OPEN_ELEMENT with empty ("") lpstrElementName
+ * 3 open sequencer          -> OPEN_ELEMENT unset, and
+ *   capability sequencer       (auto-open)  likewise
  */
 static	DWORD	MCI_FinishOpen(LPWINE_MCIDRIVER wmd, LPMCI_OPEN_PARMSW lpParms,
 			       DWORD dwParam)
@@ -1371,6 +1378,8 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
 		dwRet = MCIERR_MISSING_DEVICE_NAME;
 		goto errCleanUp;
 	    }
+	    dwFlags |= MCI_OPEN_ELEMENT;
+	    data.open.lpstrElementName = &wszNull[0];
 	} else if ((devType = strchrW(dev, '!')) != NULL) {
 	    *devType++ = '\0';
 	    tmp = devType; devType = dev; dev = tmp;




More information about the wine-cvs mailing list