msvfw32: Remove some Win64 compiler warnings.
Michael Stefaniuc
mstefani at redhat.de
Mon Feb 9 16:34:30 CST 2009
- Use HandleToLong to get to the user handle.
- Use GetWindowLongPtr to retrieve a pointer.
---
dlls/msvfw32/mciwnd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c
index 61b13aa..ff8a036 100644
--- a/dlls/msvfw32/mciwnd.c
+++ b/dlls/msvfw32/mciwnd.c
@@ -449,7 +449,7 @@ static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lPa
TRACE("%p %04x %08lx %08lx\n", hWnd, wMsg, wParam, lParam);
- mwi = (MCIWndInfo*)GetWindowLongW(hWnd, 0);
+ mwi = (MCIWndInfo*)GetWindowLongPtrW(hWnd, 0);
if (!mwi && wMsg != WM_CREATE)
return DefWindowProcW(hWnd, wMsg, wParam, lParam);
@@ -568,7 +568,7 @@ static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lPa
hCursor = SetCursor(hCursor);
mci_open.lpstrElementName = (LPWSTR)lParam;
- wsprintfW(aliasW, formatW, (int)hWnd + 1);
+ wsprintfW(aliasW, formatW, HandleToLong(hWnd) + 1);
mci_open.lpstrAlias = aliasW;
mwi->lasterror = mciSendCommandW(mwi->mci, MCI_OPEN,
MCI_OPEN_ELEMENT | MCI_OPEN_ALIAS | MCI_WAIT,
@@ -588,7 +588,7 @@ static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lPa
}
mwi->mci = mci_open.wDeviceID;
- mwi->alias = (int)hWnd + 1;
+ mwi->alias = HandleToLong(hWnd) + 1;
mwi->lpName = HeapAlloc(GetProcessHeap(), 0, (strlenW((LPWSTR)lParam) + 1) * sizeof(WCHAR));
strcpyW(mwi->lpName, (LPWSTR)lParam);
--
1.6.1.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090209/2e549999/attachment.pgp
More information about the wine-patches
mailing list