IResolveShellLink::ResolveShellLink method (shobjidl_core.h)

Requests that a folder object resolve a Shell link.

Syntax

HRESULT ResolveShellLink(
  [in] IUnknown *punkLink,
  [in] HWND     hwnd,
  [in] DWORD    fFlags
);

Parameters

[in] punkLink

Type: IUnknown*

Pointer to the object's IShellLink interface. This interface can then be queried to determine the contents of the link.

[in] hwnd

Type: HWND

Handle to the window that the Shell uses as the parent for a dialog box. The Shell displays the dialog box if it needs to prompt the user for more information while resolving the link.

[in] fFlags

Type: DWORD

Action flags. This parameter can be a combination of the following values.

SLR_INVOKE_MSI

Call the Windows Installer.

SLR_NOLINKINFO

Disable distributed link tracking. By default, distributed link tracking tracks removable media across multiple devices based on the volume name. It also uses the UNC path to track remote file systems whose drive letter has changed. Setting SLR_NOLINKINFO disables both types of tracking.

SLR_NO_UI

Do not display a dialog box if the link cannot be resolved. When SLR_NO_UI is set, the high-order word of fFlags specifies a time-out duration, in milliseconds. The function returns if the link cannot be resolved within the time-out duration. If the high-order word is set to zero, the time-out duration defaults to 3000 milliseconds (3 seconds).

SLR_NOUPDATE

Do not update the link information.

SLR_NOSEARCH

Do not execute the search heuristics.

SLR_NOTRACK

Do not use distributed link tracking.

SLR_UPDATE

If the link object has changed, update its path and list of identifiers. If SLR_UPDATE is set, you do not need to call IPersistFile::IsDirty to determine whether the link object has changed.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method should attempt to find the target of a Shell link, even if the target has been moved or renamed.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll (version 5.0 or later)

See also

IResolveShellLink