Implemented GetHGlobalFromStream.

This commit is contained in:
Thuy Nguyen 1999-05-08 10:48:44 +00:00 committed by Alexandre Julliard
parent 36a1a25f0e
commit 115d8ccaab
2 changed files with 27 additions and 1 deletions

View file

@ -185,6 +185,32 @@ HRESULT WINAPI CreateStreamOnHGlobal(
return E_OUTOFMEMORY;
}
/***********************************************************************
* GetHGlobalFromStream [OLE32.71]
*/
HRESULT WINAPI GetHGlobalFromStream(IStream* pstm, HGLOBAL* phglobal)
{
HGLOBALStreamImpl* pStream;
if (pstm == NULL)
return E_INVALIDARG;
pStream = (HGLOBALStreamImpl*) pstm;
/*
* Verify that the stream object was created with CreateStreamOnHGlobal.
*/
if (pStream->lpvtbl == &HGLOBALStreamImpl_Vtbl)
*phglobal = pStream->supportHandle;
else
{
*phglobal = 0;
return E_INVALIDARG;
}
return S_OK;
}
/******************************************************************************
** HGLOBALStreamImpl implementation
*/

View file

@ -71,7 +71,7 @@ type win32
68 stub GetConvertStg
69 stub GetDocumentBitStg
70 stdcall GetHGlobalFromILockBytes(ptr ptr) GetHGlobalFromILockBytes
71 stub GetHGlobalFromStream
71 stdcall GetHGlobalFromStream(ptr ptr) GetHGlobalFromStream
72 stub GetHookInterface
73 stdcall GetRunningObjectTable(long ptr) GetRunningObjectTable
74 stub IIDFromString