18 HRESULT rc = (0 ==
_omsCount++) ? OleInitialize( NULL ) : S_OK;
19 if (rc == S_OK || rc == S_FALSE)
21 hMem = GlobalAlloc( GHND| GMEM_NODISCARD| GMEM_SHARE, Size );
24 if (CreateStreamOnHGlobal( hMem, TRUE, &pStream ) == S_OK)
26 else GlobalFree( hMem );
36 HGLOBAL handle = NULL;
37 GetHGlobalFromStream( pStream, &handle );
HGLOBAL GetMemStreamHandle(LPSTREAM pStream)
void CloseMemStream(LPSTREAM pStream)
LPSTREAM OpenMemStream(size_t Size)