AcquireContainer
Document ShellThe
AcquireContainermethod returns a reference to the container object with the specified container type and identifier.
ODContainer AcquireContainer ( in ODContainerType containerType, in ODContainerID id);
containerType- The type of the container object.
id- A container ID whose buffer contains data identifying the container object.
- return value
- A reference to the specified container object.
DISCUSSION
The document shell and container applications call this method when opening an OpenDoc container.The container type must be one of the following: the default file container for this platform (
kODDefaultFileContainer), the default memory container for this platform (kODDefaultMemoryContainer), the Bento file container (kODBentoFileContainer), or the Bento memory container (kODBentoMemoryContainer).The structure of the data in the
idparameter's buffer depends on the type of container, as specified by thecontainerTypeparameter. For example, the identifier for a file container is a specification for a file-system file; the identifier for a memory container is a handle for a relocatable memory block.When the structure passed as the
idparameter is no longer needed, the caller should deallocate that structure and its buffer.This method increments the reference count of the returned container. When the caller has finished using that container, it should call the container's
Releasemethod.EXCEPTIONS
kODErrCannotCreateContainer- The specified container type is not valid.
SEE ALSO
TheODContainerIDtype (page 900).
TheODContainerTypetype (page 901).
TheODStorageSystem::CreateContainermethod (page 660).
"Insert" on page 247 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help