Author: sserapion
Date: Sun Dec 21 22:51:38 2008
New Revision: 38264
URL:
http://svn.reactos.org/svn/reactos?rev=38264&view=rev
Log:
Fix compilation and some warnings.
Modified:
branches/ros-amd64-bringup/reactos/dll/win32/winmm/driver.c
branches/ros-amd64-bringup/reactos/dll/win32/winmm/joystick.c
branches/ros-amd64-bringup/reactos/dll/win32/winmm/mci.c
branches/ros-amd64-bringup/reactos/dll/win32/winmm/playsound.c
branches/ros-amd64-bringup/reactos/dll/win32/winmm/time.c
branches/ros-amd64-bringup/reactos/dll/win32/winmm/winmm.c
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winmm/driver.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/winmm/driver.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/winmm/driver.c [iso-8859-1] Sun Dec 21
22:51:38 2008
@@ -110,8 +110,8 @@
* SendDriverMessage [WINMM.@]
* DrvSendMessage [WINMM.@]
*/
-LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1,
- LPARAM lParam2)
+LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LONG lParam1,
+ LONG lParam2)
{
LPWINE_DRIVER lpDrv;
LRESULT retval = 0;
@@ -170,7 +170,7 @@
/* first of this driver in list ? */
if (DRIVER_GetNumberOfModuleRefs(lpNewDrv->d.d32.hModule, NULL) == 0) {
if (DRIVER_SendMessage(lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) {
- TRACE("DRV_LOAD failed on driver 0x%08lx\n", (DWORD)lpNewDrv);
+ TRACE("DRV_LOAD failed on driver %p\n", lpNewDrv);
return FALSE;
}
/* returned value is not checked */
@@ -196,7 +196,7 @@
lpNewDrv->d.d32.dwDriverID = DRIVER_SendMessage(lpNewDrv, DRV_OPEN, lParam1,
lParam2);
if (lpNewDrv->d.d32.dwDriverID == 0) {
- TRACE("DRV_OPEN failed on driver 0x%08lx\n", (DWORD)lpNewDrv);
+ TRACE("DRV_OPEN failed on driver %p\n", lpNewDrv);
DRIVER_RemoveFromList(lpNewDrv);
return FALSE;
}
@@ -375,7 +375,7 @@
* OpenDriver [WINMM.@]
* DrvOpen [WINMM.@]
*/
-HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
+HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LONG lParam)
{
LPWINE_DRIVER lpDrv = NULL;
WCHAR libName[128];
@@ -427,7 +427,7 @@
return 0;
the_end:
- if (lpDrv) TRACE("=> %08lx\n", (DWORD)lpDrv);
+ if (lpDrv) TRACE("=> %p\n", lpDrv);
return (HDRVR)lpDrv;
}
@@ -435,7 +435,7 @@
* CloseDriver [WINMM.@]
* DrvClose [WINMM.@]
*/
-LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
+LRESULT WINAPI CloseDriver(HDRVR hDrvr, LONG lParam1, LONG lParam2)
{
LPWINE_DRIVER lpDrv;
@@ -526,8 +526,8 @@
* DefDriverProc [WINMM.@]
* DrvDefDriverProc [WINMM.@]
*/
-LRESULT WINAPI DefDriverProc(DWORD_PTR dwDriverIdentifier, HDRVR hDrv,
- UINT Msg, LPARAM lParam1, LPARAM lParam2)
+LONG WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hDrv,
+ UINT Msg, LONG lParam1, LONG lParam2)
{
switch (Msg) {
case DRV_LOAD:
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winmm/joystick.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/winmm/joystick.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/winmm/joystick.c [iso-8859-1] Sun Dec 21
22:51:38 2008
@@ -81,7 +81,7 @@
/**************************************************************************
* JOY_Timer [internal]
*/
-static void CALLBACK JOY_Timer(HWND hWnd, UINT wMsg, UINT wTimer, DWORD dwTime)
+static void CALLBACK JOY_Timer(HWND hWnd, UINT wMsg, UINT_PTR wTimer, DWORD dwTime)
{
int i;
WINE_JOYSTICK* joy;
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winmm/mci.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/winmm/mci.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/winmm/mci.c [iso-8859-1] Sun Dec 21
22:51:38 2008
@@ -1298,14 +1298,14 @@
tmp = devType; devType = dev; dev = tmp;
dwFlags |= MCI_OPEN_TYPE;
- data[2] = (DWORD)devType;
+ data[2] = (DWORD_PTR)devType;
devType = str_dup_upper(devType);
dwFlags |= MCI_OPEN_ELEMENT;
- data[3] = (DWORD)dev;
+ data[3] = (DWORD_PTR)dev;
} else if (strchrW(dev, '.') == NULL) {
tmp = strchrW(dev,' ');
if (tmp) *tmp = '\0';
- data[2] = (DWORD)dev;
+ data[2] = (DWORD_PTR)dev;
devType = str_dup_upper(dev);
if (tmp) *tmp = ' ';
dwFlags |= MCI_OPEN_TYPE;
@@ -1326,7 +1326,7 @@
devType = str_dup_upper(buf);
}
dwFlags |= MCI_OPEN_ELEMENT;
- data[3] = (DWORD)dev;
+ data[3] = (DWORD_PTR)dev;
}
if ((devAlias = strstrW(args, wszSAliasS))) {
WCHAR* tmp2;
@@ -1336,7 +1336,7 @@
tmp2 = HeapAlloc(GetProcessHeap(), 0, (tmp - devAlias + 1) * sizeof(WCHAR)
);
memcpy( tmp2, devAlias, (tmp - devAlias) * sizeof(WCHAR) );
tmp2[tmp - devAlias] = 0;
- data[4] = (DWORD)tmp2;
+ data[4] = (DWORD_PTR)tmp2;
/* should be done in regular options parsing */
/* dwFlags |= MCI_OPEN_ALIAS; */
}
@@ -1390,14 +1390,14 @@
/* set up call back */
if (hwndCallback != 0) {
dwFlags |= MCI_NOTIFY;
- data[0] = (DWORD)hwndCallback;
+ data[0] = (DWORD_PTR)hwndCallback;
}
/* set return information */
switch (retType = MCI_GetReturnType(lpCmd)) {
case 0: offset = 1; break;
case MCI_INTEGER: offset = 2; break;
- case MCI_STRING: data[1] = (DWORD)lpstrRet; data[2] = uRetLen; offset = 3; break;
+ case MCI_STRING: data[1] = (DWORD_PTR)lpstrRet; data[2] = uRetLen; offset = 3;
break;
case MCI_RECT: offset = 5; break;
default: ERR("oops\n");
}
@@ -1549,7 +1549,7 @@
/**************************************************************************
* MCI_SendCommandFrom32 [internal]
*/
-DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1,
DWORD_PTR dwParam2)
+DWORD MCI_SendCommandFrom32(MCIDEVICEID wDevID, UINT16 wMsg, DWORD dwParam1, DWORD
dwParam2)
{
DWORD dwRet = MCIERR_INVALID_DEVICE_ID;
LPWINE_MCIDRIVER wmd = MCI_GetDriver(wDevID);
@@ -1584,7 +1584,7 @@
/**************************************************************************
* MCI_SendCommandFrom16 [internal]
*/
-DWORD MCI_SendCommandFrom16(MCIDEVICEID wDevID, UINT16 wMsg, DWORD_PTR dwParam1,
DWORD_PTR dwParam2)
+DWORD MCI_SendCommandFrom16(MCIDEVICEID wDevID, UINT16 wMsg, DWORD dwParam1, DWORD
dwParam2)
{
DWORD dwRet = MCIERR_INVALID_DEVICE_ID;
LPWINE_MCIDRIVER wmd = MCI_GetDriver(wDevID);
@@ -1643,7 +1643,7 @@
if (dwParam & MCI_OPEN_TYPE) {
if (dwParam & MCI_OPEN_TYPE_ID) {
- WORD uDevType = LOWORD((DWORD)lpParms->lpstrDeviceType);
+ WORD uDevType = LOWORD((DWORD_PTR)lpParms->lpstrDeviceType);
if (uDevType < MCI_DEVTYPE_FIRST ||
uDevType > MCI_DEVTYPE_LAST ||
@@ -1825,7 +1825,7 @@
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
TRACE("(%08x, %08lX, %08lX[num=%ld, wDevTyp=%u])\n",
- uDevID, dwFlags, (DWORD)lpParms, lpParms->dwNumber, lpParms->wDeviceType);
+ uDevID, dwFlags, lpParms, lpParms->dwNumber, lpParms->wDeviceType);
switch (dwFlags & ~MCI_SYSINFO_OPEN) {
case MCI_SYSINFO_QUANTITY:
@@ -2214,7 +2214,7 @@
* mciSendCommandW [WINMM.@]
*
*/
-DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR
dwParam2)
+DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD dwParam1, DWORD_PTR
dwParam2)
{
DWORD dwRet;
@@ -2230,7 +2230,7 @@
/**************************************************************************
* mciSendCommandA [WINMM.@]
*/
-DWORD WINAPI mciSendCommandA(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR
dwParam2)
+DWORD WINAPI mciSendCommandA(MCIDEVICEID wDevID, UINT wMsg, DWORD dwParam1, DWORD_PTR
dwParam2)
{
DWORD ret;
int mapped;
@@ -2388,12 +2388,12 @@
/**************************************************************************
* mciGetCreatorTask [WINMM.@]
*/
-HTASK WINAPI mciGetCreatorTask(MCIDEVICEID uDeviceID)
+HANDLE WINAPI mciGetCreatorTask(MCIDEVICEID uDeviceID)
{
LPWINE_MCIDRIVER wmd;
- HTASK ret = 0;
-
- if ((wmd = MCI_GetDriver(uDeviceID))) ret = (HTASK)wmd->CreatorThread;
+ HANDLE ret = 0;
+
+ if ((wmd = MCI_GetDriver(uDeviceID))) ret = wmd->CreatorThread;
TRACE("(%u) => %p\n", uDeviceID, ret);
return ret;
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winmm/playsound.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/winmm/playsound.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/winmm/playsound.c [iso-8859-1] Sun Dec 21
22:51:38 2008
@@ -354,8 +354,8 @@
s.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
- if (waveOutOpen(&hWave, WAVE_MAPPER, lpWaveFormat, (DWORD)PlaySound_Callback,
- (DWORD)&s, CALLBACK_FUNCTION) != MMSYSERR_NOERROR)
+ if (waveOutOpen(&hWave, WAVE_MAPPER, lpWaveFormat,
(DWORD_PTR)PlaySound_Callback,
+ (DWORD_PTR)&s, CALLBACK_FUNCTION) != MMSYSERR_NOERROR)
goto errCleanUp;
/* make it so that 3 buffers per second are needed */
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winmm/time.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/winmm/time.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/winmm/time.c [iso-8859-1] Sun Dec 21
22:51:38 2008
@@ -94,7 +94,7 @@
if (lpTimer->wFlags & WINE_TIMER_IS32)
(lpTimer->lpFunc)(lpTimer->wTimerID, 0, lpTimer->dwUser, 0, 0);
else if (pFnCallMMDrvFunc16)
- pFnCallMMDrvFunc16((DWORD)lpTimer->lpFunc, lpTimer->wTimerID, 0,
+ pFnCallMMDrvFunc16((DWORD_PTR)lpTimer->lpFunc, lpTimer->wTimerID, 0,
lpTimer->dwUser, 0, 0);
break;
case TIME_CALLBACK_EVENT_SET:
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winmm/winmm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/winmm/winmm.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/winmm/winmm.c [iso-8859-1] Sun Dec 21
22:51:38 2008
@@ -345,7 +345,7 @@
/**************************************************************************
* mixerOpen [WINMM.@]
*/
-UINT WINAPI mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback,
+MMRESULT WINAPI mixerOpen(LPHMIXER lphMix, UINT uDeviceID, DWORD_PTR dwCallback,
DWORD_PTR dwInstance, DWORD fdwOpen)
{
return MIXER_Open(lphMix, uDeviceID, dwCallback, dwInstance, fdwOpen, TRUE);
@@ -687,7 +687,7 @@
/**************************************************************************
* auxGetDevCapsW [WINMM.@]
*/
-UINT WINAPI auxGetDevCapsW(UINT_PTR uDeviceID, LPAUXCAPSW lpCaps, UINT uSize)
+MMRESULT WINAPI auxGetDevCapsW(UINT_PTR uDeviceID, LPAUXCAPSW lpCaps, UINT uSize)
{
LPWINE_MLD wmld;
@@ -703,7 +703,7 @@
/**************************************************************************
* auxGetDevCapsA [WINMM.@]
*/
-UINT WINAPI auxGetDevCapsA(UINT_PTR uDeviceID, LPAUXCAPSA lpCaps, UINT uSize)
+MMRESULT WINAPI auxGetDevCapsA(UINT_PTR uDeviceID, LPAUXCAPSA lpCaps, UINT uSize)
{
AUXCAPSW acW;
UINT ret;
@@ -729,7 +729,7 @@
/**************************************************************************
* auxGetVolume [WINMM.@]
*/
-UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD* lpdwVolume)
+MMRESULT WINAPI auxGetVolume(UINT uDeviceID, DWORD* lpdwVolume)
{
LPWINE_MLD wmld;
@@ -757,7 +757,7 @@
/**************************************************************************
* auxOutMessage [WINMM.@]
*/
-UINT WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD_PTR dw1, DWORD_PTR dw2)
+MMRESULT WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD_PTR dw1, DWORD_PTR
dw2)
{
LPWINE_MLD wmld;
@@ -938,7 +938,7 @@
/**************************************************************************
* midiOutOpen [WINMM.@]
*/
-UINT WINAPI midiOutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID,
+MMRESULT WINAPI midiOutOpen(LPHMIDIOUT lphMidiOut, UINT_PTR uDeviceID,
DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
{
return MIDI_OutOpen(lphMidiOut, uDeviceID, dwCallback, dwInstance, dwFlags, TRUE);
@@ -1122,7 +1122,7 @@
/**************************************************************************
* midiOutMessage [WINMM.@]
*/
-UINT WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage,
+DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
LPWINE_MLD wmld;
@@ -1161,7 +1161,7 @@
/**************************************************************************
* midiInGetDevCapsW [WINMM.@]
*/
-UINT WINAPI midiInGetDevCapsW(UINT_PTR uDeviceID, LPMIDIINCAPSW lpCaps, UINT uSize)
+MMRESULT WINAPI midiInGetDevCapsW(UINT_PTR uDeviceID, LPMIDIINCAPSW lpCaps, UINT uSize)
{
LPWINE_MLD wmld;
@@ -1178,7 +1178,7 @@
/**************************************************************************
* midiInGetDevCapsA [WINMM.@]
*/
-UINT WINAPI midiInGetDevCapsA(UINT_PTR uDeviceID, LPMIDIINCAPSA lpCaps, UINT uSize)
+MMRESULT WINAPI midiInGetDevCapsA(UINT_PTR uDeviceID, LPMIDIINCAPSA lpCaps, UINT uSize)
{
MIDIINCAPSW micW;
UINT ret;
@@ -1238,7 +1238,7 @@
/**************************************************************************
* midiInOpen [WINMM.@]
*/
-UINT WINAPI midiInOpen(HMIDIIN* lphMidiIn, UINT uDeviceID,
+MMRESULT WINAPI midiInOpen(HMIDIIN* lphMidiIn, UINT_PTR uDeviceID,
DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
{
return MIDI_InOpen(lphMidiIn, uDeviceID, dwCallback, dwInstance, dwFlags, TRUE);
@@ -1387,7 +1387,7 @@
/**************************************************************************
* midiInMessage [WINMM.@]
*/
-UINT WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage,
+DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
LPWINE_MLD wmld;
@@ -2090,7 +2090,7 @@
/**************************************************************************
* waveOutGetDevCapsA [WINMM.@]
*/
-UINT WINAPI waveOutGetDevCapsA(UINT_PTR uDeviceID, LPWAVEOUTCAPSA lpCaps,
+MMRESULT WINAPI waveOutGetDevCapsA(UINT_PTR uDeviceID, LPWAVEOUTCAPSA lpCaps,
UINT uSize)
{
WAVEOUTCAPSW wocW;
@@ -2473,7 +2473,7 @@
/**************************************************************************
* waveOutMessage [WINMM.@]
*/
-UINT WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
+DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
LPWINE_MLD wmld;
@@ -2508,7 +2508,7 @@
/**************************************************************************
* waveInGetDevCapsW [WINMM.@]
*/
-UINT WINAPI waveInGetDevCapsW(UINT_PTR uDeviceID, LPWAVEINCAPSW lpCaps, UINT uSize)
+MMRESULT WINAPI waveInGetDevCapsW(UINT_PTR uDeviceID, LPWAVEINCAPSW lpCaps, UINT uSize)
{
LPWINE_MLD wmld;
@@ -2741,7 +2741,7 @@
/**************************************************************************
* waveInMessage [WINMM.@]
*/
-UINT WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage,
+DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage,
DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
LPWINE_MLD wmld;