[PATCH 1/5] shlwapi: Forward SHCreateMemStream() to shcore.
Nikolay Sivov
nsivov at codeweavers.com
Mon Dec 3 01:40:56 CST 2018
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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 63615d3d9c..47e9317208 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 62ebb85f46..ddc76ec0ac 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)
--
2.19.2
More information about the wine-devel
mailing list