Contents Index Topic Contents | ||
Previous Topic: IShellLink::GetWorkingDirectory Next Topic: IShellLink::SetArguments |
IShellLink::Resolve
HRESULT STDMETHODCALLTYPE Resolve( HWND hwnd, DWORD fFlags );Resolves a shell link. The system searches for the shell link object and updates the shell link path and its list of identifiers, if necessary.
- Returns NOERROR if successful, or an OLE-defined error value otherwise.
- hwnd
- Handle to the window that the shell will use 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 a shell link.
- fFlags
- Action flags. This parameter can be a combination of the following values:
SLR_ANY_MATCH Resolves the link, displaying a dialog box if the system needs information from the user. SLR_NO_UI Prevents the shell from displaying a dialog box if it cannot resolve the shell link. When this flag is specified, 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_UPDATE Directs the shell to update the path to the link and the list of identifiers if the link object has been changed. If this value is used, it is not necessary to call the IPersistFile::IsDirty method to determine whether the link object has changed. If the system cannot find the object, it looks in the current directory for an object that has the same attributes and file creation time but has a different name. This type of search resolves a link to an object that has been renamed.
If the system still cannot find the link object, it does a recursive search of the subdirectories of the current directory, looking for a match with either the same name or creation time. If it does not find a match, the shell displays a dialog box prompting the user for a location. An application can suppress the dialog box by specifying the SLR_NO_UI value in a call to this method.
See also IShellLink
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.