shlwapi: Use the public definition of shared shell memory allocation functions.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-02-03 18:47:18 -06:00 committed by Alexandre Julliard
parent 83023a9f2b
commit 07b502e0a2
4 changed files with 8 additions and 26 deletions

View File

@ -27,6 +27,7 @@
#include "wine/debug.h"
#include "shell32_main.h"
#include "pidl.h"
#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);

View File

@ -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);

View File

@ -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
*/

View File

@ -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" */