Maarten Lankhorst : winmm: Some 64-bit pointer fixes.

Alexandre Julliard julliard at winehq.org
Wed Nov 26 07:32:45 CST 2008


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

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Sun Aug 10 07:51:14 2008 +0200

winmm: Some 64-bit pointer fixes.

---

 dlls/winmm/lolvldrv.c |   10 +++++-----
 dlls/winmm/time.c     |   10 +++++-----
 dlls/winmm/winemm.h   |    6 +++---
 include/mmddk.h       |    4 ++--
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/dlls/winmm/lolvldrv.c b/dlls/winmm/lolvldrv.c
index d50f329..794c117 100644
--- a/dlls/winmm/lolvldrv.c
+++ b/dlls/winmm/lolvldrv.c
@@ -273,8 +273,8 @@ LPWINE_MLD	MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
     if (llTypes[type].Callback)
     {
         *dwFlags = LOWORD(*dwFlags) | CALLBACK_FUNCTION;
-        *dwCallback = (DWORD)llTypes[type].Callback;
-        *dwInstance = (DWORD)mld; /* FIXME: wouldn't some 16 bit drivers only use the loword ? */
+        *dwCallback = (DWORD_PTR)llTypes[type].Callback;
+        *dwInstance = (DWORD_PTR)mld; /* FIXME: wouldn't some 16 bit drivers only use the loword ? */
     }
 
     return mld;
@@ -421,12 +421,12 @@ LPWINE_MLD	MMDRV_GetRelated(HANDLE hndl, UINT srcType,
 /**************************************************************************
  * 				MMDRV_PhysicalFeatures		[internal]
  */
-UINT	MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1,
-			       DWORD dwParam2)
+UINT	MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg,
+                               DWORD_PTR dwParam1, DWORD_PTR dwParam2)
 {
     WINE_MM_DRIVER*	lpDrv = &MMDrvs[mld->mmdIndex];
 
-    TRACE("(%p, %04x, %08x, %08x)\n", mld, uMsg, dwParam1, dwParam2);
+    TRACE("(%p, %04x, %08lx, %08lx)\n", mld, uMsg, dwParam1, dwParam2);
 
     /* all those function calls are undocumented */
     switch (uMsg) {
diff --git a/dlls/winmm/time.c b/dlls/winmm/time.c
index 2092540..48ca3e8 100644
--- a/dlls/winmm/time.c
+++ b/dlls/winmm/time.c
@@ -55,7 +55,7 @@ typedef struct tagWINE_TIMERENTRY {
     UINT                        wDelay;
     UINT                        wResol;
     LPTIMECALLBACK              lpFunc; /* can be lots of things */
-    DWORD                       dwUser;
+    DWORD_PTR                   dwUser;
     UINT16                      wFlags;
     UINT16                      wTimerID;
     DWORD                       dwTriggerTime;
@@ -170,7 +170,7 @@ static int TIME_MMSysTimeCallback(void)
             break;
         case TIME_CALLBACK_FUNCTION:
             {
-                DWORD user = timer->dwUser;
+                DWORD_PTR user = timer->dwUser;
                 UINT16 id = timer->wTimerID;
                 UINT16 flags = timer->wFlags;
                 LPTIMECALLBACK func = timer->lpFunc;
@@ -179,7 +179,7 @@ static int TIME_MMSysTimeCallback(void)
                 LeaveCriticalSection(&WINMM_cs);
 
                 if (flags & WINE_TIMER_IS32) func(id, 0, user, 0, 0);
-                else if (pFnCallMMDrvFunc16) pFnCallMMDrvFunc16((DWORD)func, id, 0, user, 0, 0);
+                else if (pFnCallMMDrvFunc16) pFnCallMMDrvFunc16((DWORD_PTR)func, id, 0, user, 0, 0);
 
                 EnterCriticalSection(&WINMM_cs);
                 if (flags & TIME_KILL_SYNCHRONOUS) LeaveCriticalSection(&TIME_cbcrst);
@@ -294,14 +294,14 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
  * 				TIME_SetEventInternal	[internal]
  */
 WORD	TIME_SetEventInternal(UINT wDelay, UINT wResol,
-                              LPTIMECALLBACK lpFunc, DWORD dwUser, UINT wFlags)
+                              LPTIMECALLBACK lpFunc, DWORD_PTR dwUser, UINT wFlags)
 {
     WORD 		wNewID = 0;
     LPWINE_TIMERENTRY	lpNewTimer;
     LPWINE_TIMERENTRY	lpTimer;
     const char c = 'c';
 
-    TRACE("(%u, %u, %p, %08X, %04X);\n", wDelay, wResol, lpFunc, dwUser, wFlags);
+    TRACE("(%u, %u, %p, %08lX, %04X);\n", wDelay, wResol, lpFunc, dwUser, wFlags);
 
     if (wDelay < MMSYSTIME_MININTERVAL || wDelay > MMSYSTIME_MAXINTERVAL)
 	return 0;
diff --git a/dlls/winmm/winemm.h b/dlls/winmm/winemm.h
index 805ad83..dcd2290 100644
--- a/dlls/winmm/winemm.h
+++ b/dlls/winmm/winemm.h
@@ -59,7 +59,7 @@ typedef struct tagWINE_DRIVER
 } WINE_DRIVER, *LPWINE_DRIVER;
 
 typedef	DWORD	(CALLBACK *WINEMM_msgFunc16)(UINT16, WORD, DWORD, DWORD, DWORD);
-typedef	DWORD	(CALLBACK *WINEMM_msgFunc32)(UINT  , UINT, DWORD, DWORD, DWORD);
+typedef	DWORD	(CALLBACK *WINEMM_msgFunc32)(UINT  , UINT, DWORD_PTR, DWORD_PTR, DWORD_PTR);
 
 /* for each loaded driver and each known type of driver, this structure contains
  * the information needed to access it
@@ -196,7 +196,7 @@ DWORD		MMDRV_Close(LPWINE_MLD mld, UINT wMsg);
 LPWINE_MLD	MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID);
 LPWINE_MLD	MMDRV_GetRelated(HANDLE hndl, UINT srcType, BOOL bSrcCanBeID, UINT dstTyped);
 DWORD           MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2, BOOL bFrom32);
-UINT		MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
+UINT		MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
 BOOL            MMDRV_Is32(unsigned int);
 void            MMDRV_InstallMap(unsigned int, MMDRV_MAPFUNC, MMDRV_UNMAPFUNC,
                                  MMDRV_MAPFUNC, MMDRV_UNMAPFUNC, LPDRVCALLBACK);
@@ -240,7 +240,7 @@ LRESULT         MMIO_SendMessage(HMMIO hmmio, UINT uMessage, LPARAM lParam1,
 LPWINE_MMIO     MMIO_Get(HMMIO h);
 
 WORD            TIME_SetEventInternal(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
-                                      DWORD dwUser, UINT wFlags);
+                                      DWORD_PTR dwUser, UINT wFlags);
 void		TIME_MMTimeStop(void);
 
 /* Global variables */
diff --git a/include/mmddk.h b/include/mmddk.h
index 57d3e4b..c2ed4fc 100644
--- a/include/mmddk.h
+++ b/include/mmddk.h
@@ -413,8 +413,8 @@ typedef struct tMIXEROPENDESC
 {
 	HMIXEROBJ		hmx;
         LPVOID			pReserved0;
-	DWORD			dwCallback;
-	DWORD			dwInstance;
+	DWORD_PTR		dwCallback;
+	DWORD_PTR		dwInstance;
 } MIXEROPENDESC, *LPMIXEROPENDESC;
 
 typedef struct {




More information about the wine-cvs mailing list