Index: dll/win32/shell32/autocomplete.cpp =================================================================== --- dll/win32/shell32/autocomplete.cpp (revision 61258) +++ dll/win32/shell32/autocomplete.cpp (working copy) @@ -256,7 +256,7 @@ */ LRESULT APIENTRY CAutoComplete::ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - CAutoComplete *pThis = (CAutoComplete *)GetPropW(hwnd, autocomplete_propertyW);;//GetWindowLongPtrW(hwnd, GWLP_USERDATA); + CAutoComplete *pThis = static_cast(GetPropW(hwnd, autocomplete_propertyW));//GetWindowLongPtrW(hwnd, GWLP_USERDATA); LPOLESTR strs; HRESULT hr; WCHAR hwndText[255]; @@ -488,7 +488,7 @@ LRESULT APIENTRY CAutoComplete::ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - CAutoComplete *pThis = (CAutoComplete *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + CAutoComplete *pThis = reinterpret_cast(GetWindowLongPtrW(hwnd, GWLP_USERDATA)); WCHAR *msg; int sel, len; Index: dll/win32/shell32/desktop.cpp =================================================================== --- dll/win32/shell32/desktop.cpp (revision 61258) +++ dll/win32/shell32/desktop.cpp (working copy) @@ -389,8 +389,7 @@ if (uMsg != WM_NCCREATE) { - pThis = (CDesktopBrowser*)GetWindowLongPtrW(hwnd, - 0); + pThis = reinterpret_cast(GetWindowLongPtrW(hwnd, 0)); if (pThis == NULL) goto DefMsgHandler; } @@ -554,7 +553,7 @@ */ BOOL WINAPI SHDesktopMessageLoop(HANDLE hDesktop) { - CDesktopBrowser *Desk = (CDesktopBrowser *)hDesktop; + CDesktopBrowser *Desk = static_cast(hDesktop); if (Desk == NULL || Desk->Tag != SHDESK_TAG) { Index: dll/win32/shell32/drvdefext.cpp =================================================================== --- dll/win32/shell32/drvdefext.cpp (revision 61258) +++ dll/win32/shell32/drvdefext.cpp (working copy) @@ -338,7 +338,7 @@ if (ppsp == NULL) break; - CDrvDefExt *pDrvDefExt = (CDrvDefExt*)ppsp->lParam; + CDrvDefExt *pDrvDefExt = reinterpret_cast(ppsp->lParam); SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pDrvDefExt); pDrvDefExt->InitGeneralPage(hwndDlg); return TRUE; @@ -349,7 +349,7 @@ if (pDrawItem->CtlID >= 14013 && pDrawItem->CtlID <= 14015) { - CDrvDefExt *pDrvDefExt = (CDrvDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); + CDrvDefExt *pDrvDefExt = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); pDrvDefExt->PaintStaticControls(hwndDlg, pDrawItem); return TRUE; } @@ -360,7 +360,7 @@ case WM_COMMAND: if (LOWORD(wParam) == 14010) /* Disk Cleanup */ { - CDrvDefExt *pDrvDefExt = (CDrvDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); + CDrvDefExt *pDrvDefExt = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); WCHAR wszBuf[256]; DWORD cbBuf = sizeof(wszBuf); @@ -394,7 +394,7 @@ if (lppsn->hdr.code == PSN_APPLY) { - CDrvDefExt *pDrvDefExt = (CDrvDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); + CDrvDefExt *pDrvDefExt = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); WCHAR wszBuf[256]; if (GetDlgItemTextW(hwndDlg, 14000, wszBuf, _countof(wszBuf))) @@ -431,7 +431,7 @@ { WCHAR wszBuf[MAX_PATH]; DWORD cbBuf = sizeof(wszBuf); - CDrvDefExt *pDrvDefExt = (CDrvDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); + CDrvDefExt *pDrvDefExt = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); switch(LOWORD(wParam)) { Index: dll/win32/shell32/enumidlist.cpp =================================================================== --- dll/win32/shell32/enumidlist.cpp (revision 61258) +++ dll/win32/shell32/enumidlist.cpp (working copy) @@ -38,14 +38,12 @@ */ BOOL IEnumIDListImpl::AddToEnumList(LPITEMIDLIST pidl) { - ENUMLIST *pNew; - TRACE("(%p)->(pidl=%p)\n", this, pidl); if (!pidl) return FALSE; - pNew = (ENUMLIST *)SHAlloc(sizeof(ENUMLIST)); + ENUMLIST *pNew = static_cast(SHAlloc(sizeof(ENUMLIST))); if (pNew) { /*set the next pointer */ Index: dll/win32/shell32/filedefext.cpp =================================================================== --- dll/win32/shell32/filedefext.cpp (revision 61258) +++ dll/win32/shell32/filedefext.cpp (working copy) @@ -618,7 +618,7 @@ TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %S\n", hwndDlg, lParam, ppsp->lParam); - CFileDefExt *pFileDefExt = (CFileDefExt*)ppsp->lParam; + CFileDefExt *pFileDefExt = reinterpret_cast(ppsp->lParam); SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pFileDefExt); pFileDefExt->InitGeneralPage(hwndDlg); break; @@ -626,7 +626,7 @@ case WM_COMMAND: if (LOWORD(wParam) == 14024) /* Opens With - Change */ { - CFileDefExt *pFileDefExt = (CFileDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); + CFileDefExt *pFileDefExt = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); OPENASINFO oainfo; oainfo.pcszFile = pFileDefExt->m_wszPath; oainfo.pcszClass = NULL; @@ -646,7 +646,7 @@ LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam; if (lppsn->hdr.code == PSN_APPLY) { - CFileDefExt *pFileDefExt = (CFileDefExt*)GetWindowLongPtr(hwndDlg, DWLP_USER); + CFileDefExt *pFileDefExt = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); /* Update attributes first */ DWORD dwAttr = GetFileAttributesW(pFileDefExt->m_wszPath); @@ -818,7 +818,7 @@ TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %x\n", hwndDlg, lParam, ppsp->lParam); - CFileDefExt *pFileDefExt = (CFileDefExt*)ppsp->lParam; + CFileDefExt *pFileDefExt = reinterpret_cast(ppsp->lParam); return pFileDefExt->InitVersionPage(hwndDlg); } case WM_COMMAND: Index: dll/win32/shell32/folders/recyclebin.cpp =================================================================== --- dll/win32/shell32/folders/recyclebin.cpp (revision 61258) +++ dll/win32/shell32/folders/recyclebin.cpp (working copy) @@ -229,7 +229,7 @@ BOOL WINAPI CRecycleBinEnum::CBEnumRecycleBin(IN PVOID Context, IN HANDLE hDeletedFile) { - return ((CRecycleBinEnum *)Context)->CBEnumRecycleBin(hDeletedFile); + return static_cast(Context)->CBEnumRecycleBin(hDeletedFile); } BOOL WINAPI CRecycleBinEnum::CBEnumRecycleBin(IN HANDLE hDeletedFile) Index: dll/win32/shell32/newmenu.cpp =================================================================== --- dll/win32/shell32/newmenu.cpp (revision 61258) +++ dll/win32/shell32/newmenu.cpp (working copy) @@ -165,7 +165,7 @@ return NULL; /* Create new item */ - SHELLNEW_ITEM *pNewItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM)); + SHELLNEW_ITEM *pNewItem = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM))); if (!pNewItem) { free(pData); @@ -225,7 +225,7 @@ if (!m_pLinkItem) { - m_pLinkItem = (SHELLNEW_ITEM *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM)); + m_pLinkItem = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM))); if (m_pLinkItem) { m_pLinkItem->Type = SHELLNEW_TYPE_NULLFILE; Index: dll/win32/shell32/openwithmenu.cpp =================================================================== --- dll/win32/shell32/openwithmenu.cpp (revision 61258) +++ dll/win32/shell32/openwithmenu.cpp (working copy) @@ -297,9 +297,9 @@ /* Create new item */ if (!m_pApp) - m_pApp = (SApp*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(m_pApp[0])); + m_pApp = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(m_pApp[0]))); else - m_pApp = (SApp*)HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, m_pApp, (m_cApp + 1)*sizeof(m_pApp[0])); + m_pApp = static_cast(HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, m_pApp, (m_cApp + 1)*sizeof(m_pApp[0]))); if (!m_pApp) { ERR("Allocation failed\n"); @@ -989,13 +989,13 @@ INT_PTR CALLBACK COpenWithDialog::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - COpenWithDialog *pThis = (COpenWithDialog*)GetWindowLongPtr(hwndDlg, DWLP_USER); + COpenWithDialog *pThis = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); switch(uMsg) { case WM_INITDIALOG: { - COpenWithDialog *pThis = (COpenWithDialog*)lParam; + COpenWithDialog *pThis = reinterpret_cast(lParam); pThis->Init(hwndDlg); return TRUE; Index: dll/win32/shell32/shelllink.cpp =================================================================== --- dll/win32/shell32/shelllink.cpp (revision 61258) +++ dll/win32/shell32/shelllink.cpp (working copy) @@ -320,7 +320,7 @@ if (FAILED(hr) || count != sizeof(size)) return E_FAIL; - chunk = (sized_chunk *)HeapAlloc(GetProcessHeap(), 0, size); + chunk = static_cast(HeapAlloc(GetProcessHeap(), 0, size)); if (!chunk) return E_OUTOFMEMORY; @@ -382,7 +382,7 @@ if (FAILED(hr)) return hr; - LOCATION_INFO *loc = (LOCATION_INFO*) p; + LOCATION_INFO *loc = reinterpret_cast(p); if (loc->dwTotalSize < sizeof(LOCATION_INFO)) { HeapFree(GetProcessHeap(), 0, p); @@ -682,7 +682,7 @@ DWORD total_size = sizeof(*loc) + volume_info_size + path_size + final_path_size; /* create pointers to everything */ - loc = (LOCATION_INFO *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, total_size); + loc = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, total_size)); vol = (LOCAL_VOLUME_INFO*) &loc[1]; LPSTR szLabel = (LPSTR) &vol[1]; LPSTR szPath = &szLabel[label_size]; @@ -1915,7 +1915,7 @@ INT_PTR CALLBACK CShellLink::SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - CShellLink *pThis = (CShellLink *)GetWindowLongPtr(hwndDlg, DWLP_USER); + CShellLink *pThis = reinterpret_cast(GetWindowLongPtr(hwndDlg, DWLP_USER)); switch(uMsg) { @@ -1927,7 +1927,7 @@ TRACE("ShellLink_DlgProc (WM_INITDIALOG hwnd %p lParam %p ppsplParam %x)\n", hwndDlg, lParam, ppsp->lParam); - pThis = (CShellLink *)ppsp->lParam; + pThis = reinterpret_cast(ppsp->lParam); SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pThis); TRACE("sArgs: %S sComponent: %S sDescription: %S sIcoPath: %S sPath: %S sPathRel: %S sProduct: %S sWorkDir: %S\n", pThis->sArgs, pThis->sComponent, pThis->sDescription, Index: dll/win32/shell32/shlview.cpp =================================================================== --- dll/win32/shell32/shlview.cpp (revision 61258) +++ dll/win32/shell32/shlview.cpp (working copy) @@ -814,7 +814,7 @@ INT CALLBACK CDefView::fill_list( LPVOID ptr, LPVOID arg ) { LPITEMIDLIST pidl = (LPITEMIDLIST)ptr; - CDefView *pThis = (CDefView *)arg; + CDefView *pThis = static_cast(arg); /* in a commdlg This works as a filemask*/ if (pThis->IncludeObject(pidl) == S_OK) pThis->LV_AddItem(pidl);