Merge 40124, 40126 from amd64-branch:

Fix 64bit build. It works too. (Samuel Serapión)

svn path=/trunk/; revision=40734
This commit is contained in:
Timo Kreuzer 2009-04-29 16:49:52 +00:00
parent f51cc69532
commit 37e57ebf2f

View file

@ -188,7 +188,7 @@ CloseMciDevice(VOID)
if (bIsOpened) if (bIsOpened)
{ {
dwError = mciSendCommand(wDeviceId, MCI_CLOSE, MCI_WAIT, (DWORD)(LPMCI_GENERIC_PARMS)&mciGeneric); dwError = mciSendCommand(wDeviceId, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
if (dwError) return dwError; if (dwError) return dwError;
bIsOpened = FALSE; bIsOpened = FALSE;
} }
@ -215,7 +215,7 @@ OpenMciDevice(HWND hwnd, LPTSTR lpType, LPTSTR lpFileName)
mciOpen.wDeviceID = 0; mciOpen.wDeviceID = 0;
mciOpen.lpstrAlias = NULL; mciOpen.lpstrAlias = NULL;
dwError = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_ELEMENT | MCI_WAIT, (DWORD)(LPVOID)&mciOpen); dwError = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_ELEMENT | MCI_WAIT, (DWORD_PTR)&mciOpen);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(0, _T("Can't open device! (1)"), NULL, MB_OK); MessageBox(0, _T("Can't open device! (1)"), NULL, MB_OK);
@ -224,7 +224,7 @@ OpenMciDevice(HWND hwnd, LPTSTR lpType, LPTSTR lpFileName)
mciStatus.dwItem = MCI_STATUS_LENGTH; mciStatus.dwItem = MCI_STATUS_LENGTH;
dwError = mciSendCommand(mciOpen.wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatus); dwError = mciSendCommand(mciOpen.wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD_PTR)&mciStatus);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(0, _T("Can't open device! (2)"), NULL, MB_OK); MessageBox(0, _T("Can't open device! (2)"), NULL, MB_OK);
@ -283,15 +283,15 @@ SeekPlayback(HWND hwnd, DWORD dwNewPos)
if (bIsOpened) if (bIsOpened)
{ {
mciSeek.dwTo = dwNewPos; mciSeek.dwTo = (DWORD_PTR)dwNewPos;
dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_TO, (DWORD)(LPVOID)&mciSeek); dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_TO, (DWORD_PTR)&mciSeek);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(hwnd, _T("SeekPlayback: Can't seek!"), NULL, MB_OK); MessageBox(hwnd, _T("SeekPlayback: Can't seek!"), NULL, MB_OK);
} }
mciPlay.dwCallback = (DWORD)hwnd; mciPlay.dwCallback = (DWORD_PTR)hwnd;
dwError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY, (DWORD)(LPVOID)&mciPlay); dwError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY, (DWORD_PTR)&mciPlay);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(hwnd, _T("SeekPlayback: Can't play!"), NULL, MB_OK); MessageBox(hwnd, _T("SeekPlayback: Can't play!"), NULL, MB_OK);
@ -308,7 +308,7 @@ SeekBackPlayback(HWND hwnd)
if (!bIsOpened) return; if (!bIsOpened) return;
mciStatus.dwItem = MCI_STATUS_POSITION; mciStatus.dwItem = MCI_STATUS_POSITION;
mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD)(LPVOID)&mciStatus); mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus);
dwNewPos = mciStatus.dwReturn - 1; dwNewPos = mciStatus.dwReturn - 1;
@ -331,7 +331,7 @@ SeekForwPlayback(HWND hwnd)
if (!bIsOpened) return; if (!bIsOpened) return;
mciStatus.dwItem = MCI_STATUS_POSITION; mciStatus.dwItem = MCI_STATUS_POSITION;
mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD)(LPVOID)&mciStatus); mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus);
dwNewPos = mciStatus.dwReturn + 1; dwNewPos = mciStatus.dwReturn + 1;
@ -353,7 +353,7 @@ PausePlayback(HWND hwnd)
if (bIsOpened) if (bIsOpened)
{ {
dwError = mciSendCommand(wDeviceId, MCI_PAUSE, MCI_WAIT, (DWORD)(LPMCI_GENERIC_PARMS)&mciGeneric); dwError = mciSendCommand(wDeviceId, MCI_PAUSE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(hwnd, _T("Can't pause!"), NULL, MB_OK); MessageBox(hwnd, _T("Can't pause!"), NULL, MB_OK);
@ -370,7 +370,7 @@ ResumePlayback(HWND hwnd)
if (bIsPaused) if (bIsPaused)
{ {
dwError = mciSendCommand(wDeviceId, MCI_RESUME, MCI_WAIT, (DWORD)(LPMCI_GENERIC_PARMS)&mciGeneric); dwError = mciSendCommand(wDeviceId, MCI_RESUME, MCI_WAIT, (DWORD_PTR)&mciGeneric);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(hwnd, _T("Can't resume!"), NULL, MB_OK); MessageBox(hwnd, _T("Can't resume!"), NULL, MB_OK);
@ -388,7 +388,7 @@ PlayTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
if (!bIsOpened) KillTimer(hwnd, IDT_PLAYTIMER); if (!bIsOpened) KillTimer(hwnd, IDT_PLAYTIMER);
mciStatus.dwItem = MCI_STATUS_POSITION; mciStatus.dwItem = MCI_STATUS_POSITION;
mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD)(LPVOID)&mciStatus); mciSendCommand(wDeviceId, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&mciStatus);
dwPos = mciStatus.dwReturn; dwPos = mciStatus.dwReturn;
if((UINT)dwPos >= MaxFilePos) if((UINT)dwPos >= MaxFilePos)
@ -451,11 +451,11 @@ PlayFile(HWND hwnd, LPTSTR lpFileName)
dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0); dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0);
mciPlay.dwCallback = (DWORD)hwnd; mciPlay.dwCallback = (DWORD_PTR)hwnd;
mciPlay.dwFrom = 0; mciPlay.dwFrom = 0;
mciPlay.dwTo = MaxFilePos; mciPlay.dwTo = MaxFilePos;
dwError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD)(LPVOID)&mciPlay); dwError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)&mciPlay);
if (dwError != 0) if (dwError != 0)
{ {
MessageBox(hwnd, _T("Can't play!"), NULL, MB_OK); MessageBox(hwnd, _T("Can't play!"), NULL, MB_OK);