Francois Gouget : mcicda: Compare GetLastError() to kernel error codes, not ntdll ones.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 9 06:10:44 CST 2007


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Tue Jan  9 12:17:54 2007 +0100

mcicda: Compare GetLastError() to kernel error codes, not ntdll ones.

---

 dlls/mcicda/mcicda.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/mcicda/mcicda.c b/dlls/mcicda/mcicda.c
index e134b12..359df7f 100644
--- a/dlls/mcicda/mcicda.c
+++ b/dlls/mcicda/mcicda.c
@@ -121,7 +121,7 @@ static	DWORD    MCICDA_GetStatus(WINE_MC
     fmt.Format = IOCTL_CDROM_CURRENT_POSITION;
     if (!DeviceIoControl(wmcda->handle, IOCTL_CDROM_READ_Q_CHANNEL, &fmt, sizeof(fmt),
                          &data, sizeof(data), &br, NULL)) {
-        if (GetLastError() == STATUS_NO_MEDIA_IN_DEVICE) mode = MCI_MODE_OPEN;
+        if (GetLastError() == ERROR_NOT_READY) mode = MCI_MODE_OPEN;
     } else {
         switch (data.CurrentPosition.Header.AudioStatus)
         {
@@ -145,8 +145,8 @@ static	int	MCICDA_GetError(WINE_MCICDAUD
 {
     switch (GetLastError())
     {
-    case STATUS_NO_MEDIA_IN_DEVICE:     return MCIERR_DEVICE_NOT_READY;
-    case STATUS_IO_DEVICE_ERROR:        return MCIERR_HARDWARE;
+    case ERROR_NOT_READY:     return MCIERR_DEVICE_NOT_READY;
+    case ERROR_IO_DEVICE:     return MCIERR_HARDWARE;
     default:
 	FIXME("Unknown mode %x\n", GetLastError());
     }




More information about the wine-cvs mailing list