msacm32: Fix some Win64 problems.

- dwInstance and dwDriver are a DWORD_PTR.
- acmF*Enum functions take a DWORD_PTR as 4th parameter.
- The last parameter of SendDlgItemMessage and MSACM_Message is a
  LPARAM.
This commit is contained in:
Michael Stefaniuc 2009-02-17 22:36:06 +01:00 committed by Alexandre Julliard
parent a6f512ffc6
commit 9b228bb789
4 changed files with 31 additions and 31 deletions

View File

@ -137,9 +137,9 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
}
struct MSACM_FilterEnumWtoA_Instance {
PACMFILTERDETAILSA pafda;
DWORD dwInstance;
ACMFILTERENUMCBA fnCallback;
PACMFILTERDETAILSA pafda;
DWORD_PTR dwInstance;
ACMFILTERENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid,
@ -183,13 +183,13 @@ MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda,
afei.fnCallback = fnCallback;
return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA,
(DWORD)&afei, fdwEnum);
(DWORD_PTR)&afei, fdwEnum);
}
static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFILTERENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFILTERTAGDETAILSW aftd;
unsigned int i, j;
@ -368,9 +368,9 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd
}
struct MSACM_FilterTagEnumWtoA_Instance {
PACMFILTERTAGDETAILSA paftda;
DWORD dwInstance;
ACMFILTERTAGENUMCBA fnCallback;
PACMFILTERTAGDETAILSA paftda;
DWORD_PTR dwInstance;
ACMFILTERTAGENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid,
@ -414,7 +414,7 @@ MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
aftei.fnCallback = fnCallback;
return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA,
(DWORD)&aftei, fdwEnum);
(DWORD_PTR)&aftei, fdwEnum);
}
/***********************************************************************

View File

@ -62,10 +62,10 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
switch (affd->mode) {
case WINE_ACMFF_TAG:
if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_FINDSTRINGEXACT,
(WPARAM)-1, (LPARAM)paftd->szFormatTag) == CB_ERR)
CB_FINDSTRINGEXACT, -1,
(LPARAM)paftd->szFormatTag) == CB_ERR)
SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_ADDSTRING, 0, (DWORD)paftd->szFormatTag);
CB_ADDSTRING, 0, (LPARAM)paftd->szFormatTag);
break;
case WINE_ACMFF_FORMAT:
if (strcmp(affd->szFormatTag, paftd->szFormatTag) == 0) {
@ -97,7 +97,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
(afd.pwfx->nAvgBytesPerSec + 512) / 1024);
SendDlgItemMessageA(affd->hWnd,
IDD_ACMFORMATCHOOSE_CMB_FORMAT,
CB_ADDSTRING, 0, (DWORD)buffer);
CB_ADDSTRING, 0, (LPARAM)buffer);
}
}
acmDriverClose(had, 0);
@ -145,7 +145,7 @@ static BOOL MSACM_FillFormatTags(HWND hWnd)
affd.hWnd = hWnd;
affd.mode = WINE_ACMFF_TAG;
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0);
return TRUE;
}
@ -166,9 +166,9 @@ static BOOL MSACM_FillFormat(HWND hWnd)
CB_GETLBTEXT,
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_GETCURSEL, 0, 0),
(DWORD)affd.szFormatTag);
(LPARAM)affd.szFormatTag);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0);
return TRUE;
}
@ -189,9 +189,9 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc)
CB_GETLBTEXT,
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_GETCURSEL, 0, 0),
(DWORD)affd.szFormatTag);
(LPARAM)affd.szFormatTag);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
return affd.ret;
}
@ -377,9 +377,9 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD
}
struct MSACM_FormatEnumWtoA_Instance {
PACMFORMATDETAILSA pafda;
DWORD dwInstance;
ACMFORMATENUMCBA fnCallback;
PACMFORMATDETAILSA pafda;
DWORD_PTR dwInstance;
ACMFORMATENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid,
@ -429,7 +429,7 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
afei.fnCallback = fnCallback;
return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA,
(DWORD)&afei, fdwEnum);
(DWORD_PTR)&afei, fdwEnum);
}
/***********************************************************************
@ -437,8 +437,8 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
*/
static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance,
DWORD fdwEnum)
ACMFORMATENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
ACMFORMATTAGDETAILSW aftd;
unsigned int i, j;
@ -705,9 +705,9 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd
}
struct MSACM_FormatTagEnumWtoA_Instance {
PACMFORMATTAGDETAILSA paftda;
DWORD dwInstance;
ACMFORMATTAGENUMCBA fnCallback;
PACMFORMATTAGDETAILSA paftda;
DWORD_PTR dwInstance;
ACMFORMATTAGENUMCBA fnCallback;
};
static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid,
@ -760,7 +760,7 @@ MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda,
aftei.fnCallback = fnCallback;
return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA,
(DWORD)&aftei, fdwEnum);
(DWORD_PTR)&aftei, fdwEnum);
}
/***********************************************************************

View File

@ -894,7 +894,7 @@ static LRESULT PCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
return MMSYSERR_NOMEM;
}
adsi->dwDriver = (DWORD)apd;
adsi->dwDriver = (DWORD_PTR)apd;
adsi->fdwDriver = 0;
if (adsi->pwfxSrc->wBitsPerSample == 16) idx += 8;

View File

@ -330,7 +330,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->pbPreparedDst = 0;
padsh->cbPreparedDstLength = 0;
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (DWORD)padsh);
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE);