From ee235188552e38d43721186d3c98040fc126e28b Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 3 Dec 2018 10:40:56 +0300 Subject: [PATCH] shlwapi: Forward SHCreateMemStream() to shcore. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/shlwapi/regstream.c | 40 --------------------------------------- dlls/shlwapi/shlwapi.spec | 2 +- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/dlls/shlwapi/regstream.c b/dlls/shlwapi/regstream.c index 63615d3d9cf..47e9317208f 100644 --- a/dlls/shlwapi/regstream.c +++ b/dlls/shlwapi/regstream.c @@ -632,46 +632,6 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey, return iStream ? iStream : &rsDummyRegStream.IStream_iface; } -/************************************************************************* - * @ [SHLWAPI.12] - * - * Create an IStream object on a block of memory. - * - * PARAMS - * lpbData [I] Memory block to create the IStream object on - * dwDataLen [I] Length of data block - * - * RETURNS - * Success: A pointer to the IStream object. - * Failure: NULL, if any parameters are invalid or an error occurs. - * - * NOTES - * A copy of the memory pointed to by lpbData is made, and is freed - * when the stream is released. - */ -IStream * WINAPI SHCreateMemStream(const BYTE *lpbData, UINT dwDataLen) -{ - ISHRegStream *strm = NULL; - LPBYTE lpbDup; - - TRACE("(%p,%d)\n", lpbData, dwDataLen); - - if (!lpbData) - dwDataLen = 0; - - lpbDup = HeapAlloc(GetProcessHeap(), 0, dwDataLen); - - if (lpbDup) - { - memcpy(lpbDup, lpbData, dwDataLen); - strm = IStream_Create(NULL, lpbDup, dwDataLen); - - if (!strm) - HeapFree(GetProcessHeap(), 0, lpbDup); - } - return &strm->IStream_iface; -} - /************************************************************************* * SHCreateStreamWrapper [SHLWAPI.@] * diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 62ebb85f464..ddc76ec0ac7 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -9,7 +9,7 @@ 9 stdcall -ordinal SHUnlockShared(ptr) 10 stdcall -ordinal SHFreeShared(long long) 11 stdcall -noname SHMapHandle(long long long long long) -12 stdcall -ordinal SHCreateMemStream(ptr long) +12 stdcall -ordinal SHCreateMemStream(ptr long) shcore.SHCreateMemStream 13 stdcall -noname RegisterDefaultAcceptHeaders(ptr ptr) 14 stdcall -ordinal GetAcceptLanguagesA(ptr ptr) 15 stdcall -ordinal GetAcceptLanguagesW(ptr ptr)