Jörg Höhle : winmm: Improve MCI' s Sysinfo string command.

Alexandre Julliard julliard at winehq.org
Thu Apr 1 11:25:05 CDT 2010


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

Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date:   Wed Nov 18 00:58:17 2009 +0100

winmm: Improve MCI's Sysinfo string command.

---

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

diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index 4fbb9a0..cde8c88 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -1233,6 +1233,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
     static const WCHAR  wszNew[] = {'n','e','w',0};
     static const WCHAR  wszSAliasS[] = {' ','a','l','i','a','s',' ',0};
     static const WCHAR  wszTypeS[] = {'t','y','p','e',' ',0};
+    static const WCHAR  wszSysinfo[] = {'s','y','s','i','n','f','o',0};
 
     TRACE("(%s, %p, %d, %p)\n", 
           debugstr_w(lpstrCommand), lpstrRet, uRetLen, hwndCallback);
@@ -1326,6 +1327,20 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
 	    MCI_UnLoadMciDriver(wmd);
 	    goto errCleanUp;
 	}
+    } else if (!strcmpW(verb, wszSysinfo)) {
+	/* System commands are not subject to auto-open. */
+	/* It's too early to handle Sysinfo here because the
+	 * requirements on dev depend on the flags:
+	 * alias with INSTALLNAME, name like "waveaudio"
+	 * with QUANTITY and NAME. */
+	data[4] = MCI_ALL_DEVICE_ID;
+	if (MCI_ALL_DEVICE_ID != uDevID) {
+	    /* FIXME: Map device name like waveaudio to MCI_DEVTYPE_xyz */
+	    uDevID = mciGetDeviceIDW(dev);
+	    wmd = MCI_GetDriver(uDevID);
+	    if (wmd)
+		data[4] = wmd->wType;
+	}
     } else if ((MCI_ALL_DEVICE_ID != uDevID) && !(wmd = MCI_GetDriver(mciGetDeviceIDW(dev)))) {
 	/* auto open */
         static const WCHAR wszOpenWait[] = {'o','p','e','n',' ','%','s',' ','w','a','i','t',0};




More information about the wine-cvs mailing list