From 96288db253fc3bcf5dd03aab003128a322fc2c09 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 22 May 2009 23:56:31 +0000 Subject: [PATCH] Shel32: - DialogProc returns INT_PTR and not BOOL - Don't cast a pointer to LONG - Use INT_PTR instead of int for pointer math svn path=/branches/ros-amd64-bringup/; revision=41048 --- reactos/dll/win32/shell32/drive.c | 2 +- reactos/dll/win32/shell32/fprop.c | 2 +- reactos/dll/win32/shell32/she_ocmenu.c | 2 +- reactos/dll/win32/shell32/shfldr_admintools.c | 2 +- reactos/dll/win32/shell32/shfldr_fonts.c | 4 ++-- reactos/dll/win32/shell32/shfldr_netplaces.c | 2 +- reactos/dll/win32/shell32/shfldr_printers.c | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/reactos/dll/win32/shell32/drive.c b/reactos/dll/win32/shell32/drive.c index fa05a71f92c..ed12edf27ce 100644 --- a/reactos/dll/win32/shell32/drive.c +++ b/reactos/dll/win32/shell32/drive.c @@ -1164,7 +1164,7 @@ FormatDrive(HWND hwndDlg, PFORMAT_DRIVE_CONTEXT pContext) } -BOOL +INT_PTR CALLBACK FormatDriveDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { diff --git a/reactos/dll/win32/shell32/fprop.c b/reactos/dll/win32/shell32/fprop.c index dd415c31508..8cd54b7df63 100644 --- a/reactos/dll/win32/shell32/fprop.c +++ b/reactos/dll/win32/shell32/fprop.c @@ -536,7 +536,7 @@ SH_FileVersionInitialize(HWND hwndDlg, WCHAR *lpfilename) SH_FileVersionQuerySetListText(hwndDlg, pBuf, wOriginalFilename, &str, lang, code); SH_FileVersionQuerySetListText(hwndDlg, pBuf, wProductName, &str, lang, code); SH_FileVersionQuerySetListText(hwndDlg, pBuf, wProductVersion, &str, lang, code); - SetWindowLongPtr(hwndDlg, DWL_USER, (LONG)pBuf); + SetWindowLongPtr(hwndDlg, DWL_USER, (LONG_PTR)pBuf); /* select first item */ hDlgCtrl = GetDlgItem(hwndDlg, 14009); diff --git a/reactos/dll/win32/shell32/she_ocmenu.c b/reactos/dll/win32/shell32/she_ocmenu.c index 929c6456090..6007ddcd88f 100644 --- a/reactos/dll/win32/shell32/she_ocmenu.c +++ b/reactos/dll/win32/shell32/she_ocmenu.c @@ -623,7 +623,7 @@ ExecuteOpenItem(POPEN_ITEM_CONTEXT pItemContext, LPCWSTR FileName) } -static BOOL CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK OpenWithProgrammDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { LPMEASUREITEMSTRUCT lpmis; LPDRAWITEMSTRUCT lpdis; diff --git a/reactos/dll/win32/shell32/shfldr_admintools.c b/reactos/dll/win32/shell32/shfldr_admintools.c index 10fdf94c58f..d1d787b8eb3 100644 --- a/reactos/dll/win32/shell32/shfldr_admintools.c +++ b/reactos/dll/win32/shell32/shfldr_admintools.c @@ -61,7 +61,7 @@ static const shvheader AdminToolsSFHeader[] = { #define AdminToolsHELLVIEWCOLUMNS (4) -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) +#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); #define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) diff --git a/reactos/dll/win32/shell32/shfldr_fonts.c b/reactos/dll/win32/shell32/shfldr_fonts.c index d60f4ae9404..d4f87b68b6e 100644 --- a/reactos/dll/win32/shell32/shfldr_fonts.c +++ b/reactos/dll/win32/shell32/shfldr_fonts.c @@ -41,9 +41,9 @@ static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_NP_PersistFolder2; static const IContextMenu2Vtbl vt_ContextMenu2FontItem; -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) +#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); -#define _IContextMenuFontItem_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblContextMenuFontItem))) +#define _IContextMenuFontItem_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblContextMenuFontItem))) #define _ICOM_THIS_From_IContextMenu2FontItem(class, name) class* This = (class*)(((char*)name)-_IContextMenuFontItem_Offset); #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) diff --git a/reactos/dll/win32/shell32/shfldr_netplaces.c b/reactos/dll/win32/shell32/shfldr_netplaces.c index 31722d2c7c5..7d8bf7a405f 100644 --- a/reactos/dll/win32/shell32/shfldr_netplaces.c +++ b/reactos/dll/win32/shell32/shfldr_netplaces.c @@ -41,7 +41,7 @@ static const IShellFolder2Vtbl vt_ShellFolder2; static const IPersistFolder2Vtbl vt_NP_PersistFolder2; -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) +#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) diff --git a/reactos/dll/win32/shell32/shfldr_printers.c b/reactos/dll/win32/shell32/shfldr_printers.c index 39497e83bff..16d98ca47ed 100644 --- a/reactos/dll/win32/shell32/shfldr_printers.c +++ b/reactos/dll/win32/shell32/shfldr_printers.c @@ -35,7 +35,7 @@ typedef struct LPITEMIDLIST pidl; } IExtractIconWImpl; -#define _IExtractIconA_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblExtractIconA))) +#define _IExtractIconA_Offset ((INT_PTR)(&(((IExtractIconWImpl*)0)->lpvtblExtractIconA))) #define _ICOM_THIS_From_IExtractIconA(class, name) class* This = (class*)(((char*)name)-_IExtractIconA_Offset); static shvheader PrinterSFHeader[] = { @@ -305,7 +305,7 @@ typedef struct { int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ } IGenericSFImpl; -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) +#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); #define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl)