ReactOS 0.4.16-dev-2320-ge1853c6
hglobalstream.c File Reference
#include "objbase.h"
#include "wine/debug.h"
Include dependency graph for hglobalstream.c:

Go to the source code of this file.

Classes

struct  handle_wrapper
 
struct  hglobal_stream
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (storage)
 
static void handle_addref (struct handle_wrapper *handle)
 
static void handle_release (struct handle_wrapper *handle)
 
static struct handle_wrapperhandle_create (HGLOBAL hglobal, BOOL delete_on_release)
 
static struct hglobal_streamimpl_from_IStream (IStream *iface)
 
static struct hglobal_streamhglobalstream_construct (void)
 
static HRESULT WINAPI stream_QueryInterface (IStream *iface, REFIID riid, void **obj)
 
static ULONG WINAPI stream_AddRef (IStream *iface)
 
static ULONG WINAPI stream_Release (IStream *iface)
 
static HRESULT WINAPI stream_Read (IStream *iface, void *pv, ULONG cb, ULONG *read_len)
 
static HRESULT WINAPI stream_Write (IStream *iface, const void *pv, ULONG cb, ULONG *written)
 
static HRESULT WINAPI stream_Seek (IStream *iface, LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER *pos)
 
static HRESULT WINAPI stream_SetSize (IStream *iface, ULARGE_INTEGER size)
 
static HRESULT WINAPI stream_CopyTo (IStream *iface, IStream *dest, ULARGE_INTEGER cb, ULARGE_INTEGER *read_len, ULARGE_INTEGER *written)
 
static HRESULT WINAPI stream_Commit (IStream *iface, DWORD flags)
 
static HRESULT WINAPI stream_Revert (IStream *iface)
 
static HRESULT WINAPI stream_LockRegion (IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER len, DWORD lock_type)
 
static HRESULT WINAPI stream_UnlockRegion (IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER len, DWORD lock_type)
 
static HRESULT WINAPI stream_Stat (IStream *iface, STATSTG *pstatstg, DWORD flags)
 
static HRESULT WINAPI stream_Clone (IStream *iface, IStream **ppstm)
 
HRESULT WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
 
HRESULT WINAPI GetHGlobalFromStream (IStream *stream, HGLOBAL *phglobal)
 

Variables

static const IStreamVtbl hglobalstreamvtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file hglobalstream.c.

Function Documentation

◆ CreateStreamOnHGlobal()

HRESULT WINAPI CreateStreamOnHGlobal ( HGLOBAL  hGlobal,
BOOL  delete_on_release,
IStream **  stream 
)

Definition at line 413 of file hglobalstream.c.

414{
415 struct hglobal_stream *object;
416
417 if (!stream)
418 return E_INVALIDARG;
419
420 object = hglobalstream_construct();
421 if (!object) return E_OUTOFMEMORY;
422
423 object->handle = handle_create(hGlobal, delete_on_release);
424 if (!object->handle)
425 {
426 free(object);
427 return E_OUTOFMEMORY;
428 }
429
430 *stream = &object->IStream_iface;
431
432 return S_OK;
433}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define free
Definition: debug_ros.c:5
static struct handle_wrapper * handle_create(HGLOBAL hglobal, BOOL delete_on_release)
Definition: hglobalstream.c:53
static struct hglobal_stream * hglobalstream_construct(void)
Definition: hglobalstream.c:91
#define S_OK
Definition: intsafe.h:52
Definition: parse.h:23
IStream IStream_iface
Definition: request.c:4377

Referenced by apartment_get_local_server_stream(), apartment_hostobject_in_hostapt(), BindStatusCallback_OnStartBinding(), bsc_OnStartBinding(), clipbrd_create(), CoMarshalInterThreadInterfaceInStream(), crash_couninitialize_proc(), create_antimoniker(), create_decoder(), create_doc_with_string(), create_stream(), create_stream_from_map(), create_stream_from_string(), create_stream_on_data(), create_stream_on_file(), create_stream_on_mip_ro(), create_test_stream(), D3DXSaveSurfaceToFileInMemory(), DataObjectImpl_CreateComplex(), decode_base64(), decode_qp(), doc_load_string(), domdoc_load_from_stream(), get_current_dataobject(), get_data_from_stream(), get_stgmed_for_stream(), get_travellog_stream(), HlinkClone(), init_memstream(), CTravelEntry::Invoke(), load_image(), load_string(), LoadImageFromFileHandle(), LresultFromObject(), marshal_object_in_agile_reference(), marshal_stgmed(), marshal_WdtpInterfacePointer(), METAFILE_CreateCompressedImageStream(), MimeOleCreateVirtualStream(), BrowserNavigator::navigated(), ObjectFromLresult(), RECORD_StreamFromFile(), RegisterDragDrop(), rpc_get_local_class_object(), RunningObjectTableImpl_Register(), StdGlobalInterfaceTable_RegisterInterfaceInGlobal(), test_anti_moniker(), test_apm(), test_bad_marshal_stream(), test_bom(), test_bsc_marshaling(), test_bufferrawformat(), test_call_from_message(), test_channel_hook(), test_class_moniker(), test_client_security(), test_CoGetStandardMarshal(), test_CoMarshalInterface(), test_componentinfo(), test_copyto(), test_CoRegisterPSClsid(), test_CoUnmarshalInterface(), test_CoWaitForMultipleHandles_thread(), test_createfromstream(), test_createProcessingInstruction(), test_data_cache_save(), test_decode(), test_decode_1bpp(), test_decode_24bpp(), test_decode_4bpp(), test_decode_adobe_cmyk(), test_decode_bitfields(), test_decode_rle4(), test_decode_rle8(), test_DfMarshal_custom_marshaling(), test_disconnect_stub(), test_empty_image(), test_empty_image_2(), test_encoder_formats(), test_enhmetafile(), test_external_connection(), test_file_moniker(), test_freed_hglobal(), test_freethreadedmarshaler(), test_GdipLoadImageFromStream(), test_generic_composite_moniker(), test_getdatahere(), test_GetDataHere_Proxy(), test_handler_marshaling(), test_hresult_marshaling(), test_implicit_mta(), test_InternetSecurityMarshalling(), test_interthread_marshal_and_unmarshal(), test_Invoke(), test_IPersistStream(), test_IStream_Clone(), test_item_moniker(), test_load_save_bmp(), test_load_save_emf(), test_load_save_empty_picture(), test_load_save_icon(), test_loadwmf(), test_lock_object_external(), test_marshal(), test_marshal_and_unmarshal_invalid(), test_marshal_channel_buffer(), test_marshal_dispinterface(), test_marshal_proxy_apartment_shutdown(), test_marshal_proxy_mta_apartment_shutdown(), test_marshal_stub_apartment_shutdown(), test_message_filter(), test_metadata_writer(), test_metafile(), test_moniker(), test_mta_creation_thread_change_apartment(), test_multi_encoder_impl(), test_multiframegif(), test_mxwriter_encoding(), test_mxwriter_flush(), test_mxwriter_stream(), test_no_couninitialize_client(), test_no_couninitialize_server(), test_no_marshaler(), test_normal_marshal_and_release(), test_normal_marshal_and_unmarshal(), test_normal_marshal_and_unmarshal_twice(), test_objref_moniker(), test_OleDoAutoConvert(), test_persist_save_data(), test_persiststreaminit(), test_pic(), test_pointer_moniker(), test_proxy_interfaces(), test_proxy_marshal_and_unmarshal(), test_proxy_marshal_and_unmarshal2(), test_proxy_marshal_and_unmarshal_strong(), test_proxy_marshal_and_unmarshal_weak(), test_proxy_used_in_wrong_thread(), test_ReadClassStm(), test_readerinput(), test_same_apartment_unmarshal_failure(), test_save(), test_save_history(), test_save_load_filemoniker(), test_StdMarshal_custom_marshaling(), test_streamonhglobal(), test_StreamOnIStream(), test_StreamOnStreamRange(), test_supported_encoders(), test_tablestrong_marshal_and_unmarshal_twice(), test_tableweak_and_normal_marshal_and_releasedata(), test_tableweak_and_normal_marshal_and_unmarshal(), test_tableweak_marshal_and_unmarshal_twice(), test_tableweak_marshal_releasedata1(), test_tableweak_marshal_releasedata2(), test_two_tableweak_marshal_and_releasedata(), test_typelibmarshal(), test_writeroutput(), test_writesource_palette(), test_writestartdocument(), test_xsltemplate(), union_tests(), unmarshal_stgmed(), CTravelEntry::Update(), WdtpInterfacePointer_UserMarshal(), WdtpInterfacePointer_UserUnmarshal(), window_proc(), writer_set_output(), xmldoc_IPersistStreamInit_Load(), XMLView_PersistMoniker_Load(), and xslprocessor_transform().

◆ GetHGlobalFromStream()

◆ handle_addref()

static void handle_addref ( struct handle_wrapper handle)
static

Definition at line 37 of file hglobalstream.c.

38{
40}
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by stream_Clone().

◆ handle_create()

static struct handle_wrapper * handle_create ( HGLOBAL  hglobal,
BOOL  delete_on_release 
)
static

Definition at line 53 of file hglobalstream.c.

54{
55 struct handle_wrapper *handle;
56
57 handle = malloc(sizeof(*handle));
58 if (!handle) return NULL;
59
60 /* allocate a handle if one is not supplied */
62 if (!hglobal)
63 {
64 free(handle);
65 return NULL;
66 }
67 handle->ref = 1;
68 handle->hglobal = hglobal;
69 handle->size = GlobalSize(hglobal);
70 handle->delete_on_release = delete_on_release;
71
72 return handle;
73}
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
BOOL delete_on_release
Definition: hglobalstream.c:34
#define GMEM_NODISCARD
Definition: winbase.h:326
#define GMEM_MOVEABLE
Definition: winbase.h:318
#define GMEM_SHARE
Definition: winbase.h:329

Referenced by CreateStreamOnHGlobal().

◆ handle_release()

static void handle_release ( struct handle_wrapper handle)
static

Definition at line 42 of file hglobalstream.c.

43{
45
46 if (!ref)
47 {
48 if (handle->delete_on_release) GlobalFree(handle->hglobal);
49 free(handle);
50 }
51}
#define InterlockedDecrement
Definition: armddk.h:52
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

Referenced by stream_Release().

◆ hglobalstream_construct()

static struct hglobal_stream * hglobalstream_construct ( void  )
static

Definition at line 91 of file hglobalstream.c.

92{
93 struct hglobal_stream *object = calloc(1, sizeof(*object));
94
95 if (object)
96 {
97 object->IStream_iface.lpVtbl = &hglobalstreamvtbl;
98 object->ref = 1;
99 }
100 return object;
101}
#define calloc
Definition: rosglue.h:14

Referenced by CreateStreamOnHGlobal(), and stream_Clone().

◆ impl_from_IStream()

◆ stream_AddRef()

static ULONG WINAPI stream_AddRef ( IStream iface)
static

Definition at line 121 of file hglobalstream.c.

122{
123 struct hglobal_stream *stream = impl_from_IStream(iface);
124 return InterlockedIncrement(&stream->ref);
125}

◆ stream_Clone()

static HRESULT WINAPI stream_Clone ( IStream iface,
IStream **  ppstm 
)
static

Definition at line 370 of file hglobalstream.c.

371{
372 struct hglobal_stream *stream = impl_from_IStream(iface), *clone;
375
376 TRACE("%p, %p\n", iface, ppstm);
377
378 *ppstm = NULL;
379
380 clone = hglobalstream_construct();
381 if (!clone) return E_OUTOFMEMORY;
382
383 *ppstm = &clone->IStream_iface;
384 handle_addref(stream->handle);
385 clone->handle = stream->handle;
386
387 offset.QuadPart = (LONGLONG)stream->position.QuadPart;
388 IStream_Seek(*ppstm, offset, STREAM_SEEK_SET, &dummy);
389 return S_OK;
390}
static void handle_addref(struct handle_wrapper *handle)
Definition: hglobalstream.c:37
GLintptr offset
Definition: glext.h:5920
#define TRACE(s)
Definition: solgame.cpp:4
int64_t LONGLONG
Definition: typedefs.h:68

◆ stream_Commit()

static HRESULT WINAPI stream_Commit ( IStream iface,
DWORD  flags 
)
static

Definition at line 335 of file hglobalstream.c.

336{
337 return S_OK;
338}

◆ stream_CopyTo()

static HRESULT WINAPI stream_CopyTo ( IStream iface,
IStream dest,
ULARGE_INTEGER  cb,
ULARGE_INTEGER read_len,
ULARGE_INTEGER written 
)
static

Definition at line 286 of file hglobalstream.c.

288{
289 ULARGE_INTEGER total_read, total_written;
290 HRESULT hr = S_OK;
291 BYTE buffer[128];
292
293 TRACE("%p, %p, %ld, %p, %p\n", iface, dest, cb.LowPart, read_len, written);
294
295 if (!dest)
297
298 total_read.QuadPart = 0;
299 total_written.QuadPart = 0;
300
301 while (cb.QuadPart > 0)
302 {
303 ULONG chunk_size = cb.QuadPart >= sizeof(buffer) ? sizeof(buffer) : cb.LowPart;
304 ULONG chunk_read, chunk_written;
305
306 hr = IStream_Read(iface, buffer, chunk_size, &chunk_read);
307 if (FAILED(hr))
308 break;
309
310 total_read.QuadPart += chunk_read;
311
312 if (chunk_read)
313 {
314 hr = IStream_Write(dest, buffer, chunk_read, &chunk_written);
315 if (FAILED(hr))
316 break;
317
318 total_written.QuadPart += chunk_written;
319 }
320
321 if (chunk_read != chunk_size)
322 cb.QuadPart = 0;
323 else
324 cb.QuadPart -= chunk_read;
325 }
326
327 if (read_len)
328 read_len->QuadPart = total_read.QuadPart;
329 if (written)
330 written->QuadPart = total_written.QuadPart;
331
332 return hr;
333}
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
GLuint buffer
Definition: glext.h:5915
#define FAILED(hr)
Definition: intsafe.h:51
static char * dest
Definition: rtl.c:135
HRESULT hr
Definition: shlfolder.c:183
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define STG_E_INVALIDPOINTER
Definition: winerror.h:3666
unsigned char BYTE
Definition: xxhash.c:193

◆ stream_LockRegion()

static HRESULT WINAPI stream_LockRegion ( IStream iface,
ULARGE_INTEGER  offset,
ULARGE_INTEGER  len,
DWORD  lock_type 
)
static

Definition at line 345 of file hglobalstream.c.

347{
349}
#define STG_E_INVALIDFUNCTION
Definition: winerror.h:3659

◆ stream_QueryInterface()

static HRESULT WINAPI stream_QueryInterface ( IStream iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 103 of file hglobalstream.c.

104{
105 if (!obj)
106 return E_INVALIDARG;
107
109 IsEqualIID(&IID_ISequentialStream, riid) ||
110 IsEqualIID(&IID_IStream, riid))
111 {
112 *obj = iface;
113 IStream_AddRef(iface);
114 return S_OK;
115 }
116
117 *obj = NULL;
118 return E_NOINTERFACE;
119}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ stream_Read()

static HRESULT WINAPI stream_Read ( IStream iface,
void pv,
ULONG  cb,
ULONG read_len 
)
static

Definition at line 141 of file hglobalstream.c.

142{
143 struct hglobal_stream *stream = impl_from_IStream(iface);
144 ULONG dummy, len;
145 char *buffer;
146
147 TRACE("%p, %p, %ld, %p\n", iface, pv, cb, read_len);
148
149 if (!read_len)
150 read_len = &dummy;
151
152 if (stream->handle->size >= stream->position.LowPart)
153 len = min(stream->handle->size - stream->position.LowPart, cb);
154 else
155 len = 0;
156
157 buffer = GlobalLock(stream->handle->hglobal);
158 if (!buffer)
159 {
160 WARN("Failed to lock hglobal %p\n", stream->handle->hglobal);
161 *read_len = 0;
162 return S_OK;
163 }
164
165 memcpy(pv, buffer + stream->position.LowPart, len);
166 stream->position.LowPart += len;
167
168 *read_len = len;
169
170 GlobalUnlock(stream->handle->hglobal);
171
172 return S_OK;
173}
#define WARN(fmt,...)
Definition: precomp.h:61
GLenum GLsizei len
Definition: glext.h:6722
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
static ERESOURCE GlobalLock
Definition: sys_arch.c:8
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
unsigned int size
Definition: parse.h:27

◆ stream_Release()

static ULONG WINAPI stream_Release ( IStream iface)
static

Definition at line 127 of file hglobalstream.c.

128{
129 struct hglobal_stream *stream = impl_from_IStream(iface);
131
132 if (!ref)
133 {
134 handle_release(stream->handle);
135 free(stream);
136 }
137
138 return ref;
139}
static void handle_release(struct handle_wrapper *handle)
Definition: hglobalstream.c:42

◆ stream_Revert()

static HRESULT WINAPI stream_Revert ( IStream iface)
static

Definition at line 340 of file hglobalstream.c.

341{
342 return S_OK;
343}

◆ stream_Seek()

static HRESULT WINAPI stream_Seek ( IStream iface,
LARGE_INTEGER  move,
DWORD  origin,
ULARGE_INTEGER pos 
)
static

Definition at line 224 of file hglobalstream.c.

226{
227 struct hglobal_stream *stream = impl_from_IStream(iface);
228 ULARGE_INTEGER position = stream->position;
229 HRESULT hr = S_OK;
230
231 TRACE("%p, %s, %ld, %p\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, pos);
232
233 switch (origin)
234 {
235 case STREAM_SEEK_SET:
236 position.QuadPart = 0;
237 break;
238 case STREAM_SEEK_CUR:
239 break;
240 case STREAM_SEEK_END:
241 position.QuadPart = stream->handle->size;
242 break;
243 default:
245 goto end;
246 }
247
248 position.HighPart = 0;
249 position.LowPart += move.QuadPart;
250
251 if (move.LowPart >= 0x80000000 && position.LowPart >= move.LowPart)
252 {
253 /* We tried to seek backwards and went past the start. */
255 goto end;
256 }
257
258 stream->position = position;
259
260end:
261 if (pos) *pos = stream->position;
262
263 return hr;
264}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
GLuint GLuint end
Definition: gl.h:1545
voidpf uLong int origin
Definition: ioapi.h:144
$ULONG LowPart
Definition: ntbasedef.h:581
$ULONG HighPart
Definition: ntbasedef.h:582
ULARGE_INTEGER position
Definition: hglobalstream.c:81
LONGLONG QuadPart
Definition: typedefs.h:114
ULONG LowPart
Definition: typedefs.h:106
#define STG_E_SEEKERROR
Definition: winerror.h:3669

◆ stream_SetSize()

static HRESULT WINAPI stream_SetSize ( IStream iface,
ULARGE_INTEGER  size 
)
static

Definition at line 266 of file hglobalstream.c.

267{
268 struct hglobal_stream *stream = impl_from_IStream(iface);
269 HGLOBAL hglobal;
270
271 TRACE("%p, %s\n", iface, wine_dbgstr_longlong(size.QuadPart));
272
273 if (stream->handle->size == size.LowPart)
274 return S_OK;
275
276 hglobal = GlobalReAlloc(stream->handle->hglobal, size.LowPart, GMEM_MOVEABLE);
277 if (!hglobal)
278 return E_OUTOFMEMORY;
279
280 stream->handle->hglobal = hglobal;
281 stream->handle->size = size.LowPart;
282
283 return S_OK;
284}
GLsizeiptr size
Definition: glext.h:5919
HGLOBAL NTAPI GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags)
Definition: heapmem.c:825

◆ stream_Stat()

static HRESULT WINAPI stream_Stat ( IStream iface,
STATSTG *  pstatstg,
DWORD  flags 
)
static

Definition at line 357 of file hglobalstream.c.

358{
359 struct hglobal_stream *stream = impl_from_IStream(iface);
360
361 memset(pstatstg, 0, sizeof(STATSTG));
362
363 pstatstg->pwcsName = NULL;
364 pstatstg->type = STGTY_STREAM;
365 pstatstg->cbSize.QuadPart = stream->handle->size;
366
367 return S_OK;
368}
#define memset(x, y, z)
Definition: compat.h:39

◆ stream_UnlockRegion()

static HRESULT WINAPI stream_UnlockRegion ( IStream iface,
ULARGE_INTEGER  offset,
ULARGE_INTEGER  len,
DWORD  lock_type 
)
static

Definition at line 351 of file hglobalstream.c.

353{
354 return S_OK;
355}

◆ stream_Write()

static HRESULT WINAPI stream_Write ( IStream iface,
const void pv,
ULONG  cb,
ULONG written 
)
static

Definition at line 175 of file hglobalstream.c.

176{
177 struct hglobal_stream *stream = impl_from_IStream(iface);
179 ULONG dummy = 0;
180 char *buffer;
181
182 TRACE("%p, %p, %ld, %p\n", iface, pv, cb, written);
183
184 if (!written)
185 written = &dummy;
186
187 if (!cb)
188 goto out;
189
190 *written = 0;
191
192 size.HighPart = 0;
193 size.LowPart = stream->position.LowPart + cb;
194
195 if (size.LowPart > stream->handle->size)
196 {
197 /* grow stream */
198 HRESULT hr = IStream_SetSize(iface, size);
199 if (FAILED(hr))
200 {
201 ERR("IStream_SetSize failed with error %#lx\n", hr);
202 return hr;
203 }
204 }
205
206 buffer = GlobalLock(stream->handle->hglobal);
207 if (!buffer)
208 {
209 WARN("write to invalid hglobal %p\n", stream->handle->hglobal);
210 return S_OK;
211 }
212
213 memcpy(buffer + stream->position.LowPart, pv, cb);
214 stream->position.LowPart += cb;
215
216 GlobalUnlock(stream->handle->hglobal);
217
218out:
219 *written = cb;
220
221 return S_OK;
222}
#define ERR(fmt,...)
Definition: precomp.h:57
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( storage  )

Variable Documentation

◆ hglobalstreamvtbl

static const IStreamVtbl hglobalstreamvtbl
static
Initial value:
=
{
}
static HRESULT WINAPI stream_Read(IStream *iface, void *pv, ULONG cb, ULONG *read_len)
static ULONG WINAPI stream_AddRef(IStream *iface)
static HRESULT WINAPI stream_UnlockRegion(IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER len, DWORD lock_type)
static HRESULT WINAPI stream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *written)
static ULONG WINAPI stream_Release(IStream *iface)
static HRESULT WINAPI stream_CopyTo(IStream *iface, IStream *dest, ULARGE_INTEGER cb, ULARGE_INTEGER *read_len, ULARGE_INTEGER *written)
static HRESULT WINAPI stream_Revert(IStream *iface)
static HRESULT WINAPI stream_Seek(IStream *iface, LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER *pos)
static HRESULT WINAPI stream_Stat(IStream *iface, STATSTG *pstatstg, DWORD flags)
static HRESULT WINAPI stream_QueryInterface(IStream *iface, REFIID riid, void **obj)
static HRESULT WINAPI stream_Clone(IStream *iface, IStream **ppstm)
static HRESULT WINAPI stream_LockRegion(IStream *iface, ULARGE_INTEGER offset, ULARGE_INTEGER len, DWORD lock_type)
static HRESULT WINAPI stream_Commit(IStream *iface, DWORD flags)
static HRESULT WINAPI stream_SetSize(IStream *iface, ULARGE_INTEGER size)

Definition at line 89 of file hglobalstream.c.

Referenced by GetHGlobalFromStream(), and hglobalstream_construct().