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.

Method Description
IShellLinkW::GetArguments Gets the command-line arguments associated with a Shell link object.
IShellLinkW::GetDescription Gets the description string for a Shell link object.
IShellLinkW::GetHotkey Gets the keyboard shortcut (hot key) for a Shell link object.
IShellLinkW::GetIconLocation Gets the location (path and index) of the icon for a Shell link object.
IShellLinkW::GetIDList Gets the list of item identifiers for the target of a Shell link object.
IShellLinkW::GetPath Gets the path and file name of the target of a Shell link object.
IShellLinkW::GetShowCmd Gets the show command for a Shell link object.
IShellLinkW::GetWorkingDirectory Gets the name of the working directory for a Shell link object.
IShellLinkW::Resolve Attempts to find the target of a Shell link, even if it has been moved or renamed.
IShellLinkW::SetArguments Sets the command-line arguments for a Shell link object.
IShellLinkW::SetDescription Sets the description for a Shell link object. The description can be any application-defined string.
IShellLinkW::SetHotkey Sets a keyboard shortcut (hot key) for a Shell link object.
IShellLinkW::SetIconLocation Sets the location (path and index) of the icon for a Shell link object.
IShellLinkW::SetIDList Sets the pointer to an item identifier list (PIDL) for a Shell link object.
IShellLinkW::SetPath Sets the path and file name for the target of a Shell link object.
IShellLinkW::SetRelativePath Sets the relative path to the Shell link object.
IShellLinkW::SetShowCmd Sets the show command for a Shell link object. The show command sets the initial show state of the window.
IShellLinkW::SetWorkingDirectory Sets the name of the working directory for a Shell link object.

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 which 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 not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

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