AcquireLink
TheAcquireLinkmethod returns a reference to the link object whose data is stored in the specified storage unit or that can be constructed from the given link specification.
ODLink AcquireLink (in ODStorageUnitID id, in ODLinkSpec linkSpec);
id- The ID of the storage unit providing the link data, or
kODNULLIDif the link is to be constructed.linkSpec- A reference to a link-specification object from which the link is to be constructed, or
kODNULLis theidparameter is not null.- return value
- A reference to the specified link object.
DISCUSSION
If your part is the destination of a link, you call this method to create a link object; you also call this method in your part'sInitPartFromStoragemethod to re-create the link object from its stored data.If the
idparameter is not null, thelinkSpecparameter is ignored. In that case, theidparameter must be the ID of the link object's storage unit, and this method re-creates the link object from the content of the specified storage unit.If the
idparameter is null, thelinkSpecparameter must be a link-specification object returned by a previous call to theCreateLinkSpecmethod. In that case, this method uses the information in the link-specification object to construct the link object.This method increments the reference count of the returned link object. When you have finished using that link object, you should call its
Releasemethod.EXCEPTIONS
kODErrCannotAcquireLink- Cannot re-create the requested link object from the specified storage unit or link-specification object.
kODErrInsufficientInfoInParams- No link object was specified; the
idparameter iskODNULLIDand thelinkSpecparameter iskODNULL.SEE ALSO
TheODStorageUnitIDtype (page 903).
TheODDraft::CreateLinkSpecmethod (page 167).
TheODPart::InitPartFromStoragemethod (page 530).
TheODLinkclass (page 348).
TheODLinkSpecclass (page 390).
"Creating a Link at the Destination" on page 384 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.
"Reading Links in InitPartFromStorage" on page 394 in OpenDoc Programmer's Guide.
"Reading Links for Data Transfer" on page 395 in OpenDoc Programmer's Guide.