shlwapi: Forward SHCreateMemStream() to shcore.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2018-12-03 10:40:56 +03:00 committed by Alexandre Julliard
parent cfcfcadfcb
commit ee23518855
2 changed files with 1 additions and 41 deletions

View File

@ -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.@]
*

View File

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