MCI fix
eric pouech
eric.pouech at wanadoo.fr
Tue Aug 14 15:37:48 CDT 2001
a while ago, Andi reported an error message when an app of his sent a
MCI command
even if the mci command was boggus, the error message was wrong too
this should fix it
A+
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle
-------------- next part --------------
Name: mci_all
ChangeLog: fixed error message and return value in case of bogus 'open all' mci string command
minor 32/16 optimizations and cosmetic fixes
GenDate: 2001/08/14 20:27:36 UTC
ModifiedFiles: dlls/winmm/mci.c
AddedFiles:
===================================================================
RCS file: /usr/share/cvs/cvsroot/wine/wine/dlls/winmm/mci.c,v
retrieving revision 1.24
diff -u -u -r1.24 mci.c
--- dlls/winmm/mci.c 2001/07/24 21:45:23 1.24
+++ dlls/winmm/mci.c 2001/08/13 13:36:05
@@ -511,11 +511,18 @@
modp.lpstrParams = NULL;
if (!MCI_OpenMciDriver(wmd, strDevTyp, (LPARAM)&modp)) {
- FIXME("Couldn't load driver for type %s.\n"
- "If you don't have a windows installation accessible from Wine,\n"
- "you perhaps forgot to create a [mci] section in system.ini\n",
- strDevTyp);
- dwRet = MCIERR_DEVICE_NOT_INSTALLED;
+ /* silence warning if all is used... some bogus program use commands like
+ * 'open all'...
+ */
+ if (strcasecmp(strDevTyp, "all") != 0) {
+ dwRet = MCIERR_CANNOT_USE_ALL;
+ } else {
+ FIXME("Couldn't load driver for type %s.\n"
+ "If you don't have a windows installation accessible from Wine,\n"
+ "you perhaps forgot to create a [mci] section in system.ini\n",
+ strDevTyp);
+ dwRet = MCIERR_DEVICE_NOT_INSTALLED;
+ }
goto errCleanUp;
}
@@ -690,7 +697,7 @@
flg = *(LPDWORD)lmem;
eid = *(LPWORD)(lmem + sizeof(DWORD));
lmem += sizeof(DWORD) + sizeof(WORD);
-/* EPP TRACE("\tcmd='%s' inCst=%s\n", str, inCst ? "Y" : "N"); */
+/* EPP TRACE("\tcmd='%s' inCst=%c eid=%04x\n", str, inCst ? 'Y' : 'N', eid); */
switch (eid) {
case MCI_CONSTANT:
@@ -1077,7 +1084,7 @@
TRACE("(%s)!\n", lpstrCommand);
- ret = mciSendString16(lpstrCommand, strRet, sizeof(strRet), 0);
+ ret = mciSendStringA(lpstrCommand, strRet, sizeof(strRet), 0);
if (ret != 0) {
if (!mciGetErrorStringA(ret, strRet, sizeof(strRet))) {
sprintf(strRet, "Unknown MCI error (%ld)", ret);
@@ -1193,7 +1200,7 @@
{
TRACE("(%08x)!\n", uTable);
- return mciFreeCommandResource16(uTable);
+ return MCI_DeleteCommandTable(uTable);
}
/**************************************************************************
More information about the wine-patches
mailing list