Alexandre Julliard : winmm: Add support for the MCI_INTEGER64 type.

Alexandre Julliard julliard at winehq.org
Wed Sep 29 12:00:20 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 29 14:49:48 2010 +0200

winmm: Add support for the MCI_INTEGER64 type.

Based on a patch by Octavian Voicu.

---

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

diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index 2e9278b..cb76a1e 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -1201,6 +1201,43 @@ static	DWORD	MCI_HandleReturnValues(DWORD dwRet, LPWINE_MCIDRIVER wmd, DWORD ret
 	    }
 	    break;
         }
+#ifdef MCI_INTEGER64
+	case MCI_INTEGER64:
+        {
+	    static const WCHAR fmt_ld [] = {'%','l','d',0};
+	    DWORD_PTR data = *(DWORD_PTR *)(params + 1);
+	    switch (dwRet & 0xFFFF0000ul) {
+	    case 0:
+	    case MCI_INTEGER_RETURNED:
+		snprintfW(lpstrRet, uRetLen, fmt_ld, data);
+		break;
+	    case MCI_RESOURCE_RETURNED:
+		/* return string which ID is HIWORD(data),
+		 * string is loaded from mmsystem.dll */
+		LoadStringW(hWinMM32Instance, HIWORD(data), lpstrRet, uRetLen);
+		break;
+	    case MCI_RESOURCE_RETURNED|MCI_RESOURCE_DRIVER:
+		/* return string which ID is HIWORD(data),
+		 * string is loaded from driver */
+		/* FIXME: this is wrong for a 16 bit handle */
+		LoadStringW(GetDriverModuleHandle(wmd->hDriver),
+			    HIWORD(data), lpstrRet, uRetLen);
+		break;
+	    case MCI_COLONIZED3_RETURN:
+		snprintfW(lpstrRet, uRetLen, wszCol3,
+			  LOBYTE(LOWORD(data)), HIBYTE(LOWORD(data)),
+			  LOBYTE(HIWORD(data)));
+		break;
+	    case MCI_COLONIZED4_RETURN:
+		snprintfW(lpstrRet, uRetLen, wszCol4,
+			  LOBYTE(LOWORD(data)), HIBYTE(LOWORD(data)),
+			  LOBYTE(HIWORD(data)), HIBYTE(HIWORD(data)));
+		break;
+	    default:	ERR("Ooops (%04X)\n", HIWORD(dwRet));
+	    }
+	    break;
+        }
+#endif
 	case MCI_STRING:
 	    switch (dwRet & 0xFFFF0000ul) {
 	    case 0:
@@ -1421,6 +1458,11 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
     case MCI_RECT:
         offset += 4 * sizeof(DWORD);
         break;
+#ifdef MCI_INTEGER64
+    case MCI_INTEGER64:
+	offset += sizeof(DWORD_PTR);
+        break;
+#endif
     default:
 	ERR("oops\n");
     }




More information about the wine-cvs mailing list