Zebediah Figura : shlwapi: Use the public definition of shared shell memory allocation functions.
Alexandre Julliard
julliard at winehq.org
Fri Feb 4 16:08:34 CST 2022
Module: wine
Branch: master
Commit: 07b502e0a29e46227ce6ef8c6cbecc5d088c9e77
URL: https://source.winehq.org/git/wine.git/?a=commit;h=07b502e0a29e46227ce6ef8c6cbecc5d088c9e77
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Feb 3 18:47:18 2022 -0600
shlwapi: Use the public definition of shared shell memory allocation functions.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shell32/changenotify.c | 1 +
dlls/shell32/shellord.c | 2 +-
dlls/shell32/undocshell.h | 24 ------------------------
include/shlwapi.h | 7 ++++++-
4 files changed, 8 insertions(+), 26 deletions(-)
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c
index 40ccb891589..35c090ceb67 100644
--- a/dlls/shell32/changenotify.c
+++ b/dlls/shell32/changenotify.c
@@ -27,6 +27,7 @@
#include "wine/debug.h"
#include "shell32_main.h"
#include "pidl.h"
+#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 57308e1c988..af00f125662 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -1353,7 +1353,7 @@ BOOL WINAPI IsUserAnAdmin(VOID)
*
* See shlwapi.SHAllocShared
*/
-HANDLE WINAPI SHAllocShared(LPVOID lpvData, DWORD dwSize, DWORD dwProcId)
+HANDLE WINAPI SHAllocShared(const void *lpvData, DWORD dwSize, DWORD dwProcId)
{
GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL);
return pSHAllocShared(lpvData, dwSize, dwProcId);
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 61c2ff4069f..f5c5ed8d43a 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -31,30 +31,6 @@
extern "C" {
#endif /* defined(__cplusplus) */
-/****************************************************************************
- * Memory Routines
- */
-
-/* The Platform SDK's shlobj.h header defines similar functions with a
- * leading underscore. However those are unusable because of the leading
- * underscore, because they have an incorrect calling convention, and
- * because these functions are not exported by name anyway.
- */
-HANDLE WINAPI SHAllocShared(
- LPVOID pv,
- ULONG cb,
- DWORD pid);
-
-BOOL WINAPI SHFreeShared(
- HANDLE hMem,
- DWORD pid);
-
-LPVOID WINAPI SHLockShared(
- HANDLE hMem,
- DWORD pid);
-
-BOOL WINAPI SHUnlockShared(LPVOID pv);
-
/****************************************************************************
* System Imagelist Routines
*/
diff --git a/include/shlwapi.h b/include/shlwapi.h
index ca15bd20777..07ca0fac837 100644
--- a/include/shlwapi.h
+++ b/include/shlwapi.h
@@ -1171,7 +1171,12 @@ HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bagname,
BOOL WINAPI SHIsLowMemoryMachine(DWORD type);
-#include <poppack.h>
+#include <poppack.h>
+
+HANDLE WINAPI SHAllocShared(const void *data, DWORD size, DWORD pid);
+BOOL WINAPI SHFreeShared(HANDLE handle, DWORD pid);
+void * WINAPI SHLockShared(HANDLE handle, DWORD pid);
+BOOL WINAPI SHUnlockShared(void *data);
#ifdef __cplusplus
} /* extern "C" */
More information about the wine-cvs
mailing list