IOleUILinkContainerA::CancelLink method (oledlg.h)

Disconnects the selected links.

Syntax

HRESULT CancelLink(
  DWORD dwLink
);

Parameters

dwLink

Container-defined unique identifier for a single link. Containers can use the pointer to the link's container site for this value.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return code Description
E_ACCESSDENIED
Insufficient access permissions.
E_FAIL
The operation failed.
E_INVALIDARG
The specified identifier is invalid.
E_OUTOFMEMORY
There is insufficient memory available for this operation.

Remarks

Notes to Callers

Call IOleUILinkContainer::CancelLink when the user selects the Break Link button from the Links dialog box. The link should be converted to a picture. The Links dialog box will not be dismissed for OLE links.

Notes to Implementers

For OLE links, OleCreateStaticFromData can be used to create a static picture object using the IDataObject interface of the link as the source.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header oledlg.h

See also

IDataObject

IOleUILinkContainer

OleCreateStaticFromData