IShellLinkW interface (shobjidl_core.h)

Exposes methods that create, modify, and resolve Shell links.

Inheritance

The IShellLink interface inherits from the IUnknown interface. IShellLink also has these types of members:

Methods

The IShellLinkW interface has these methods.

 
IShellLinkW::GetArguments

Gets the command-line arguments associated with a Shell link object. (Unicode)
IShellLinkW::GetDescription

Gets the description string for a Shell link object. (Unicode)
IShellLinkW::GetHotkey

Gets the keyboard shortcut (hot key) for a Shell link object. (Unicode)
IShellLinkW::GetIconLocation

Gets the location (path and index) of the icon for a Shell link object. (Unicode)
IShellLinkW::GetIDList

Gets the list of item identifiers for the target of a Shell link object. (Unicode)
IShellLinkW::GetPath

Gets the path and file name of the target of a Shell link object. (Unicode)
IShellLinkW::GetShowCmd

Gets the show command for a Shell link object. (Unicode)
IShellLinkW::GetWorkingDirectory

Gets the name of the working directory for a Shell link object. (Unicode)
IShellLinkW::Resolve

Attempts to find the target of a Shell link, even if it has been moved or renamed. (Unicode)
IShellLinkW::SetArguments

Sets the command-line arguments for a Shell link object. (Unicode)
IShellLinkW::SetDescription

Sets the description for a Shell link object. The description can be any application-defined string. (Unicode)
IShellLinkW::SetHotkey

Sets a keyboard shortcut (hot key) for a Shell link object. (Unicode)
IShellLinkW::SetIconLocation

Sets the location (path and index) of the icon for a Shell link object. (Unicode)
IShellLinkW::SetIDList

Sets the pointer to an item identifier list (PIDL) for a Shell link object. (Unicode)
IShellLinkW::SetPath

Sets the path and file name for the target of a Shell link object. (Unicode)
IShellLinkW::SetRelativePath

Sets the relative path to the Shell link object. (Unicode)
IShellLinkW::SetShowCmd

Sets the show command for a Shell link object. The show command sets the initial show state of the window. (Unicode)
IShellLinkW::SetWorkingDirectory

Sets the name of the working directory for a Shell link object. (Unicode)

Remarks

Note  This interface cannot be used to create a link to a URL.
 
The IShellLink interface has an ANSI version (IShellLinkA) and a Unicode version (IShellLinkW). The version that will be used depends on whether you compile for ANSI or Unicode.

Note

The shobjidl_core.h header defines IShellLink as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl_core.h