PATCH: Convert HMMIO to a void*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

License: LGPL, X11
Changelog:
    Michael Stefaniuc <mstefani@redhat.com>
    - Convert HMMIO to a void*


bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: dlls/winmm/mmio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mmio.c,v
retrieving revision 1.33
diff -u -r1.33 mmio.c
--- dlls/winmm/mmio.c	31 May 2002 23:40:56 -0000	1.33
+++ dlls/winmm/mmio.c	4 Aug 2002 19:58:17 -0000
@@ -540,8 +540,8 @@
     wm = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MMIO));
     if (wm) {
 	EnterCriticalSection(&iData->cs);
-	while (MMIO_Get(iData, ++MMIO_counter));
-	wm->info.hmmio = MMIO_counter;
+	while (MMIO_Get(iData, HMMIO_32(++MMIO_counter)));
+	wm->info.hmmio = HMMIO_32(MMIO_counter);
 	wm->lpNext = iData->lpMMIO;
 	iData->lpMMIO = wm;
 	LeaveCriticalSection(&iData->cs);
@@ -842,8 +842,8 @@
 
 	ret = MMIO_Open(szFileName, &mmioinfo, dwOpenFlags, MMIO_PROC_16);
 
-	mmioGetInfo16(mmioinfo.hmmio, lpmmioinfo16, 0);
-	lpmmioinfo16->wErrorRet = ret;
+	mmioGetInfo16(HMMIO_16(mmioinfo.hmmio), lpmmioinfo16, 0);
+	lpmmioinfo16->wErrorRet = HMMIO_16(ret);
     } else {
 	mmio.fccIOProc = 0;
 	mmio.pIOProc = NULL;
@@ -851,7 +851,7 @@
 	mmio.cchBuffer = 0;
 	ret = MMIO_Open(szFileName, &mmio, dwOpenFlags, FALSE);
     }
-    return ret;
+    return HMMIO_16(ret);
 }
 
 
@@ -891,7 +891,7 @@
  */
 MMRESULT16 WINAPI mmioClose16(HMMIO16 hmmio, UINT16 uFlags)
 {
-    return mmioClose(hmmio, uFlags);
+    return mmioClose(HMMIO_32(hmmio), uFlags);
 }
 
 /**************************************************************************
@@ -948,7 +948,7 @@
  */
 LONG WINAPI mmioRead16(HMMIO16 hmmio, HPSTR pch, LONG cch)
 {
-    return mmioRead(hmmio, pch, cch);
+    return mmioRead(HMMIO_32(hmmio), pch, cch);
 }
 
 /**************************************************************************
@@ -1010,7 +1010,7 @@
  */
 LONG WINAPI mmioWrite16(HMMIO16 hmmio, HPCSTR pch, LONG cch)
 {
-    return mmioWrite(hmmio,pch,cch);
+    return mmioWrite(HMMIO_32(hmmio),pch,cch);
 }
 
 /**************************************************************************
@@ -1083,7 +1083,7 @@
  */
 LONG WINAPI mmioSeek16(HMMIO16 hmmio, LONG lOffset, INT16 iOrigin)
 {
-    return mmioSeek(hmmio, lOffset, iOrigin);
+    return mmioSeek(HMMIO_32(hmmio), lOffset, iOrigin);
 }
 
 /**************************************************************************
@@ -1095,7 +1095,7 @@
 
     TRACE("(0x%04x,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
 
-    if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
+    if ((wm = MMIO_Get(NULL, HMMIO_32(hmmio))) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     if (!wm->buffer16)
@@ -1119,7 +1119,7 @@
     lpmmioinfo->adwInfo[3]  = wm->info.adwInfo[3];
     lpmmioinfo->dwReserved1 = 0;
     lpmmioinfo->dwReserved2 = 0;
-    lpmmioinfo->hmmio = wm->info.hmmio;
+    lpmmioinfo->hmmio = HMMIO_16(wm->info.hmmio);
 
     return MMSYSERR_NOERROR;
 }
@@ -1150,7 +1150,7 @@
 
     TRACE("(0x%04x,%p,0x%08x)\n",hmmio,lpmmioinfo,uFlags);
 
-    if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
+    if ((wm = MMIO_Get(NULL, HMMIO_32(hmmio))) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     /* check if seg and lin buffers are the same */
@@ -1228,7 +1228,7 @@
     TRACE("(hmmio=%04x, segpchBuf=%p, cchBuf=%ld, uFlags=%#08x)\n",
 	  hmmio, segpchBuffer, cchBuffer, uFlags);
 
-    if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
+    if ((wm = MMIO_Get(NULL, HMMIO_32(hmmio))) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMIO_SetBuffer(wm, segpchBuffer, cchBuffer, uFlags, FALSE);
@@ -1254,7 +1254,7 @@
  */
 MMRESULT16 WINAPI mmioFlush16(HMMIO16 hmmio, UINT16 uFlags)
 {
-    return mmioFlush(hmmio, uFlags);
+    return mmioFlush(HMMIO_32(hmmio), uFlags);
 }
 
 /**************************************************************************
@@ -1311,7 +1311,7 @@
 
     TRACE("hmmio=%04X, lpmmioinfo=%p, uFlags=%04X\n", hmmio, lpmmioinfo, uFlags);
 
-    if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
+    if ((wm = MMIO_Get(NULL, HMMIO_32(hmmio))) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     if (!wm->info.cchBuffer)
@@ -1420,7 +1420,7 @@
     if (uMessage < MMIOM_USER)
 	return MMSYSERR_INVALPARAM;
 
-    if ((wm = MMIO_Get(NULL, hmmio)) == NULL)
+    if ((wm = MMIO_Get(NULL, HMMIO_32(hmmio))) == NULL)
 	return MMSYSERR_INVALHANDLE;
 
     return MMIO_SendMessage(wm, uMessage, lParam1, lParam2, MMIO_PROC_16);
@@ -1555,7 +1555,7 @@
 MMRESULT16 WINAPI mmioDescend16(HMMIO16 hmmio, LPMMCKINFO lpck,
                                 const MMCKINFO* lpckParent, UINT16 uFlags)
 {
-    return mmioDescend(hmmio, lpck, lpckParent, uFlags);
+    return mmioDescend(HMMIO_32(hmmio), lpck, lpckParent, uFlags);
 }
 
 /**************************************************************************
@@ -1597,7 +1597,7 @@
  */
 MMRESULT16 WINAPI mmioAscend16(HMMIO16 hmmio, MMCKINFO* lpck, UINT16 uFlags)
 {
-    return mmioAscend(hmmio,lpck,uFlags);
+    return mmioAscend(HMMIO_32(hmmio),lpck,uFlags);
 }
 
 /**************************************************************************
@@ -1644,7 +1644,7 @@
  */
 MMRESULT16 WINAPI mmioCreateChunk16(HMMIO16 hmmio, MMCKINFO* lpck, UINT16 uFlags)
 {
-    return mmioCreateChunk(hmmio, lpck, uFlags);
+    return mmioCreateChunk(HMMIO_32(hmmio), lpck, uFlags);
 }
 
 /**************************************************************************
Index: dlls/winmm/winemm.h
===================================================================
RCS file: /home/wine/wine/dlls/winmm/winemm.h,v
retrieving revision 1.18
diff -u -r1.18 winemm.h
--- dlls/winmm/winemm.h	3 Aug 2002 00:14:44 -0000	1.18
+++ dlls/winmm/winemm.h	4 Aug 2002 19:58:18 -0000
@@ -234,6 +234,7 @@
 #define HMIDISTRM_32(h16)	((HMIDISTRM)(ULONG_PTR)(h16))
 #define HMIXER_32(h16)		((HMIXER)(ULONG_PTR)(h16))
 #define HMIXEROBJ_32(h16)	((HMIXEROBJ)(ULONG_PTR)(h16))
+#define HMMIO_32(h16)		((HMMIO)(ULONG_PTR)(h16))
 #define HWAVE_32(h16)		((HWAVE)(ULONG_PTR)(h16))
 #define HWAVEIN_32(h16)		((HWAVEIN)(ULONG_PTR)(h16))
 #define HWAVEOUT_32(h16)	((HWAVEOUT)(ULONG_PTR)(h16))
@@ -245,6 +246,7 @@
 #define HMIDISTRM_16(h32)	(LOWORD(h32))
 #define HMIXER_16(h32)		(LOWORD(h32))
 #define HMIXEROBJ_16(h32)	(LOWORD(h32))
+#define HMMIO_16(h32)		(LOWORD(h32))
 #define HWAVE_16(h32)		(LOWORD(h32))
 #define HWAVEIN_16(h32)		(LOWORD(h32))
 #define HWAVEOUT_16(h32)	(LOWORD(h32))
Index: include/mmsystem.h
===================================================================
RCS file: /home/wine/wine/include/mmsystem.h,v
retrieving revision 1.54
diff -u -r1.54 mmsystem.h
--- include/mmsystem.h	3 Aug 2002 00:14:44 -0000	1.54
+++ include/mmsystem.h	4 Aug 2002 19:58:19 -0000
@@ -40,7 +40,7 @@
 DECLARE_HANDLE(HMIDISTRM);
 DECLARE_HANDLE(HMIXER);
 DECLARE_HANDLE(HMIXEROBJ);
-DECLARE_OLD_HANDLE(HMMIO);
+DECLARE_HANDLE(HMMIO);
 
 #include "pshpack1.h"
 

Attachment: pgp00028.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux