IOleUILinkContainer::GetLinkSource
Returns information about a link that can be displayed in the UI.
HRESULT GetLinkSource(
DWORD dwLink,
| //Unique 32-bit link identifier
|
LPTSTR FAR* lplpszDisplayName,
| //Length of display name portion
|
ULONG FAR* lplenFileName,
| //Length of filename portion
|
LPTSTR FAR* lplpszFullLinkType,
| //Full link type string
|
LPTSTR FAR* lplpszShortLinkType,
| //Short link type string
|
BOOL FAR* lpfSourceAvailable,
| //Availability of link
|
BOOL FAR* lpfIsSelected
| //Indicates that link entry should be selected in listbox
|
);
|
|
Parameters
dwLink
A container-defined unique 32-bit identifier for a single link. See
IOleUILinkContainer::GetNextLink.
lplpszDisplayName
[out] Points to the allocated full link source display name string. The Links
dialog will free this string.
lplenFileName
[out] Points to the length of the leading filename portion of the
lplpszDisplayName string. If the link source is not stored in a file, then *
lplenFileName should be 0. For OLE links, call
IOleLink::GetSourceDisplayName.
lplpszFullLinkType
[out] Points to the allocated full link type string that is displayed at the
bottom of the Links dialog. The Links dialog will free this string. For OLE
links, this should be the full User Type name. Use
IOleObject::GetUserType, specifying USERCLASSTYPE_FULL for
dwFormOfType.
lplpszShortLinkType
[out] Points to the allocated short link type string that is displayed in the
listbox of the Links dialog. The Links dialog will free this string. For OLE
links, this should be the short User Type name. Use
IOleObject::GetUserType, specifying USERCLASSTYPE_SHORT for
dwFormOfType.
lpfSourceAvailable
Returns FALSE if it is known that a link is unavailable since the link is to
some known but unavailable document. Certain options, such as Update Now, are
disabled (grayed in the UI) for such cases.
lpfIsSelected
Used to tell the Edit Links dialog that this link's entry should be selected
in the dialog's multi-slelection listbox.
OleUIEditLinks calls this method at least once for each item to be placed in the links list.
If none of them return TRUE, then none of them will be selected when the
dialog is first displayed. If all of them return TRUE, then all will be displayed.
That is, it returns TRUE if this link is currently part of the selection in the
underlying document, FALSE if not. Any links that are selected in the
underlying document are selected in the dialog; this way, the user can select a set of
links and use the dialog to update them or change their source(s)
simultaneously.
Return Values
S_OK
Successfully returned link information.
E_FAIL
Unable to return link information.
E_INVALIDARG
One or more invalid arguments.
E_OUTOFMEMORY
Insufficient memory.
E_ACCESSDENIED
Insufficient access permissions.
Comments
Notes To Callers
Call this method during dialog initialization, after returning from the Change
Source dialog.
See Also
IOleLink::GetSourceDisplayName,
IOleObject::GetUserType,
USERCLASSTYPE, OleUIChangeSource, OLEUICHANGESOURCE
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database