[PATCH 1/2] include/shell32: Shell_MergeMenus should be declared in shlobj.h and exported by name. (try 2)

David Hedberg david.hedberg at gmail.com
Tue Jul 20 03:11:48 CDT 2010


Import by ordinal and leave the tests as they were (except for the
removal of a redundant and conflicting declaration).

---
 dlls/shell32/shell32.spec      |    2 +-
 dlls/shell32/shell32_main.h    |    5 -----
 dlls/shell32/shlmenu.c         |    2 +-
 dlls/shell32/tests/shlfileop.c |    2 --
 dlls/shell32/undocshell.h      |    4 ----
 include/shlobj.h               |    6 ++++++
 6 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec
index f913872..ee6f8a5 100644
--- a/dlls/shell32/shell32.spec
+++ b/dlls/shell32/shell32.spec
@@ -62,7 +62,7 @@
   64 stdcall -noname DriveType(long)
   65 stdcall -noname InvalidateDriveType(long)
   66 stdcall -noname IsNetDrive(long)
-  67 stdcall -noname Shell_MergeMenus(long long long long long long)
+  67 stdcall -ordinal Shell_MergeMenus(long long long long long long)
   68 stdcall -noname SHGetSetSettings(ptr long long)
   69 stub -noname SHGetNetResource
   70 stdcall -noname SHCreateDefClassObject(long long long long long)
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index 8f51850..3eecdad 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -108,11 +108,6 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
 LPEXTRACTICONA	IExtractIconA_Constructor(LPCITEMIDLIST);
 LPEXTRACTICONW	IExtractIconW_Constructor(LPCITEMIDLIST);
 
-/* menu merging */
-#define MM_ADDSEPARATOR         0x00000001L
-#define MM_SUBMENUSHAVEIDS      0x00000002L
-HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
-
 /* initialisation for FORMATETC */
 #define InitFormatEtc(fe, cf, med) \
 	{\
diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c
index aea319c..ae13ff8 100644
--- a/dlls/shell32/shlmenu.c
+++ b/dlls/shell32/shlmenu.c
@@ -857,7 +857,7 @@ static BOOL _SHIsMenuSeparator(HMENU hm, int i)
 /*************************************************************************
  * Shell_MergeMenus				[SHELL32.67]
  */
-HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
+UINT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
 {	int		nItem;
 	HMENU		hmSubMenu;
 	BOOL		bAlreadySeparated;
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index 08867c8..3e9a2e4 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -2309,8 +2309,6 @@ static void test_unicode(void)
     ok(!file_existsW(UNICODE_PATH), "The directory should have been removed\n");
 }
 
-extern HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
-
 static void
 test_shlmenu(void) {
 	HRESULT hres;
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 513006d..fa0ac05 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -191,10 +191,6 @@ int WINAPI Shell_GetCachedImageIndex(
 	UINT nIconIndex,
 	BOOL bSimulateDoc);
 
-BOOL WINAPI Shell_GetImageLists(
-	HIMAGELIST *lphimlLarge,
-	HIMAGELIST *lphimlSmall);
-
 HICON WINAPI SHGetFileIcon(
 	DWORD dwReserved,
 	LPCSTR lpszPath,
diff --git a/include/shlobj.h b/include/shlobj.h
index 5f125c1..bd00d21 100644
--- a/include/shlobj.h
+++ b/include/shlobj.h
@@ -82,6 +82,7 @@ VOID         WINAPI SHUpdateImageW(LPCWSTR,INT,UINT,INT);
 int          WINAPI RestartDialog(HWND,LPCWSTR,DWORD);
 int          WINAPI RestartDialogEx(HWND,LPCWSTR,DWORD,DWORD);
 BOOL         WINAPI IsUserAnAdmin(void);
+UINT         WINAPI Shell_MergeMenus(HMENU,HMENU,UINT,UINT,UINT,ULONG);
 
 #define SHFMT_ERROR     0xFFFFFFFFL  /* Error on last format, drive may be formattable */
 #define SHFMT_CANCEL    0xFFFFFFFEL  /* Last format was cancelled */
@@ -116,6 +117,11 @@ BOOL WINAPI SHObjectProperties(HWND,DWORD,LPCWSTR,LPCWSTR);
 
 int WINAPI PathCleanupSpec(LPCWSTR,LPWSTR);
 
+/* Shell_MergeMenus flags */
+#define MM_ADDSEPARATOR     0x00000001
+#define MM_SUBMENUSHAVEIDS  0x00000002
+#define MM_DONTREMOVESEPS   0x00000004
+
 /*****************************************************************************
  * IContextMenu interface
  */
-- 
1.7.1.1




More information about the wine-patches mailing list