SHGetShortcutTarget (coredll)
Last changed: anonymous

.

Summary:

This function retrieves the shortcut's target path. A remote application interface (RAPI) version of this function exists, CeSHGetShortcutTarget (RAPI). (From MSDN.)

C# Signature:

[DllImport("coredll.dll")]
static extern bool SHGetShortcutTarget(StringBuilder szShortcut, StringBuilder szTarget, int cbMax);

User-Defined Types:

None.

Alternative Managed API:

None.

Notes:

StringBuilders are generally used in place of LPTSTR's in PInvoke signatures. szShortcut is a full path to a shortcut file (which usually has the extension .lnk), szTarget is a buffer to receive the target path, and cbMax is the length of the szTarget buffer. The function returns success/failure; it isn't documented whether it returns failure if cbMax is too small, or if the target-path is truncated or what.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefSHGetShortcutTarget.asp