#4978 Fixed bad casting on 64bit Windows

This commit is contained in:
Andrew Nelless 2016-06-24 15:38:17 +01:00 committed by Jerry (Xinyu Hou)
parent 04184b51ea
commit e1432f670c
2 changed files with 5 additions and 8 deletions

View File

@ -360,10 +360,9 @@ MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
}
else {
// get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) {
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(
reinterpret_cast<void*>(data));
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(data);
}
}

View File

@ -368,16 +368,14 @@ MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
// and put it in the extra window data then forward the call.
MSWindowsServerTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) {
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(lParam));
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(lParam);
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
}
else {
// get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA);
LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) {
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
reinterpret_cast<void*>(data));
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(data);
}
}