3 out of 10 rated this helpful - Rate this topic

IShellLink interface

Applies to: desktop apps only

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

Members

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

Methods

The IShellLink interface has these methods.

MethodDescription
GetArguments

Gets the command-line arguments associated with a Shell link object.

GetDescription

Gets the description string for a Shell link object.

GetHotkey

Gets the keyboard shortcut (hot key) for a Shell link object.

GetIconLocation

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

GetIDList

Gets the list of item identifiers for the target of a Shell link object.

GetPath

Gets the path and file name of the target of a Shell link object.

GetShowCmd

Gets the show command for a Shell link object.

GetWorkingDirectory

Gets the name of the working directory for a Shell link object.

Resolve

Attempts to find the target of a Shell link, even if it has been moved or renamed.

SetArguments

Sets the command-line arguments for a Shell link object.

SetDescription

Sets the description for a Shell link object. The description can be any application-defined string.

SetHotkey

Sets a keyboard shortcut (hot key) for a Shell link object.

SetIconLocation

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

SetIDList

Sets the PIDL for a Shell link object.

SetPath

Sets the path and file name for the target of a Shell link object.

SetRelativePath

Sets the relative path to the Shell link object.

SetShowCmd

Sets the show command for a Shell link object. The show command sets the initial show state of the window.

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.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 4.0 or later)

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Internet shortcuts
You can use the IUniformResourceLocator interface in order to create internet shortcuts.
Creating Internet shortcus
IShellLink interface actually can be used to create URL shortcuts, works on XP and Vista 32-bit.