/// <summary> /// Creates a new Shortcut instance, recommended for new .lnk files /// </summary> /// <param name="LnkDestPath">The path where the .lnk file will be created</param> public Shortcut(string LnkDestPath) { this.LnkDestPath = LnkDestPath; link = (NativeMethods.IShellLink) new ShellLink(); list = (NativeMethods.IShellLinkDataList)link; file = (IPersistFile)link; }
/// <summary> /// For Jumplists only /// </summary> /// <param name="DestPath">JumpList destination</param> internal Shortcut(bool JumpList, string DestPath) { if (JumpList) { link = (NativeMethods.IShellLink) new ShellLink(); list = (NativeMethods.IShellLinkDataList)link; DestinationPath = DestPath; } }