IOleItemContainer::GetObjectStorage

HRESULT IOleItemContainer::GetObjectStorage(lpszItem, pbc, riid, ppvStorage)

If lpszItem designates an item in this container that has an independently identifiable piece of storage (such as does an embedded object), then return access to that storage using the indicated interface.

pbc is the bind context as received by the Item Moniker IMoniker::BindToStorage call. Most container implementations can simply ignore this value; it is passed for the benefit for more sophisticated containers.

Argument

Type

Description

lpszItem

LPSTR

The item access to whose storage is being requested.

pbc

IBindCtx*

As in IOleItemContainer::GetObject. Can be ignored by most containers.

riid

REFIID

The interface by which the caller wishes to access that storage. Often IID_IStorage or IID_IStream are used.

ppvStorage

void**

The place to return the access to the storage

return value

HRESULT

S_OK, MK_E_EXCEEDEDDEADLINE, MK_E_NOOBJECT, E_OUTOFMEMORY, E_NOINTERFACE, MK_E_NOSTORAGE