Returns a pointer to the container's IOleContainer interface.
HRESULT GetContainer(
LPOLECONTAINER FAR* ppContainer //Address of output variable that
// receives the IOleContainer
// interface pointer
);
If a container supports links to its embedded objects, implementing IOleClientSite::GetContainer enables link clients to enumerate the container's objects and recursively traverse a containment hierarchy. This method is optional but recommended for all containers that expect to support links to their embedded objects.
Link clients can traverse a hierarchy of compound-document objects by recursively calling IOleClientSite::GetContainer to get a pointer to the link source's container; followed by IOleContainer::QueryInterface to get a pointer to the container's IOleObject interface and, finally, IOleObject::GetClientSite to get the container's client site in its container.
Simple containers that do not support links to their embedded objects probably do not need to implement this method. Instead, they can return E_NOINTERFACE and set ppContainer to NULL.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oleidl.h.