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
);
E_INVALIDARG, and E_OUTOFMEMORY, as well as the following:
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 failed because the source was unavailable), then you should display an Invalid Link Source message, and the user should be allowed to decide whether or not to fix the source. If the user chooses to fix the source, then the user should be returned to the Change Source dialog box with the invalid portion of the input string highlighted. If the user chooses not to fix the source, then SetLinkSource should be called a second time with fValidateSource set to FALSE, and the user should be returned to the Links dialog box with the link marked Unavailable.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oledlg.h.