This function retrieves the shortcut's target path. A remote application interface (RAPI) version of this function exists, CeSHGetShortcutTarget (RAPI). (From MSDN.)
[DllImport("coredll.dll")]
static extern bool SHGetShortcutTarget(StringBuilder szShortcut, StringBuilder szTarget, int cbMax);
None.
None.
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.
Please add some!
Please add some!