Nikolay Sivov : shlwapi: Forward SHCreateMemStream() to shcore.

Alexandre Julliard julliard at winehq.org
Mon Dec 3 15:28:53 CST 2018


Module: wine
Branch: master
Commit: ee235188552e38d43721186d3c98040fc126e28b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ee235188552e38d43721186d3c98040fc126e28b

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Dec  3 10:40:56 2018 +0300

shlwapi: Forward SHCreateMemStream() to shcore.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 63615d3..47e9317 100644
--- a/dlls/shlwapi/regstream.c
+++ b/dlls/shlwapi/regstream.c
@@ -633,46 +633,6 @@ IStream * WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey,
 }
 
 /*************************************************************************
- * @   [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.@]
  *
  * Create an IStream object on a block of memory.
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index 62ebb85..ddc76ec 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)




More information about the wine-cvs mailing list