IOleUILinkContainer::SetLinkSource
Changes the
source of a link.
HRESULT SetLinkSource(
DWORD dwLink, |
//Unique 32-bit link identifier |
LPTSTR lpszDisplayName, |
//Pointer to source string to parse |
ULONG FAR*
lenFileName, |
//Length of the file name portion |
ULONG FAR*
pchEaten, |
//Pointer to number of characters successfully
parsed |
BOOL fValidateSource |
//Specifies whether moniker should be validated |
); |
|
Parameters
dwLink
[in]
Container-defined unique 32-bit identifier for a single link. See IOleUILinkContainer::GetNextLink
.
lpszDisplayName
[in] Pointer
to new source string to be parsed.
lenFileName
Length of the
leading file name portion of the lpszDisplayName string. If the link
source is not stored in a file, then lenFileName should be 0. For OLE
links, call IOleLink::GetSourceDisplayName.
pchEaten
[out] Pointer
to the number of characters successfully parsed in lpszDisplayName.
fValidateSource
[in] TRUE if
the moniker should be validated; for OLE links, MkParseDisplayName
Return Values
This
method supports the standard return values E_FAIL,
E_INVALIDARG,
and E_OUTOFMEMORY, as well as the following:
S_OK
Successfully
changed the links source.
E_ACCESSDENIED
Insufficient
access permissions.
Remarks
Notes To Callers
Call this
method from the Change Source dialog box, with fValidateSource initially
set to TRUE. Change Source can be called directly or from the Links dialog box.
If this call to SetLinkSource returns an error (e.g., MkParseDisplayName
See Also