Implemented body of HGLOBALStreamImpl::Clone.

This commit is contained in:
Alberto Massari 2002-11-12 02:13:49 +00:00 committed by Alexandre Julliard
parent d476a5ad31
commit 544efc84f1

View file

@ -820,6 +820,15 @@ HRESULT WINAPI HGLOBALStreamImpl_Clone(
IStream* iface,
IStream** ppstm) /* [out] */
{
FIXME("not implemented!\n");
return E_NOTIMPL;
ULARGE_INTEGER dummy;
LARGE_INTEGER offset;
HRESULT hr;
HGLOBALStreamImpl* const This=(HGLOBALStreamImpl*)iface;
TRACE(" Cloning %p (deleteOnRelease=%d seek position=%ld)\n",iface,This->deleteOnRelease,(long)This->currentPosition.QuadPart);
hr=CreateStreamOnHGlobal(This->supportHandle, FALSE, ppstm);
if(FAILED(hr))
return hr;
offset.QuadPart=(LONGLONG)This->currentPosition.QuadPart;
HGLOBALStreamImpl_Seek(*ppstm,offset,STREAM_SEEK_SET,&dummy);
return S_OK;
}