title: Do Windows shortcuts support very long argument lengths?
body: <p>I am trying to create a shortcut (on the Desktop) that contains a long argument string (> MAX_PATH).</p>
  
  <p>The <a href="http://msdn.microsoft.com/en-us/library/bb774954%28v=vs.85%29.aspx" rel="nofollow">MSDN documentation</a> clearly states that for Unicode string the string can be longer than MAX_PATH.</p>
  
  <p>The resulting shortcut is cut exactly after MAX_PATH characters (that is the <code>Path</code> + the <code>Arguments</code>).</p>
  
  <p>Is there something wrong with my implementation or is this some Windows limitation?</p>
  
  <pre><code>procedure CreateShortcut(APath: WideString;
    AWorkingDirectory: WideString; AArguments: WideString; ADescription: WideString;
    ALinkFileName: WideString);
  var
     IObject : IUnknown;
     ISLink  : IShellLinkW;
     IPFile  : IPersistFile;
  begin
     IObject := CreateComObject(CLSID_ShellLink);
     ISLink := IObject as IShellLinkW;
     ISLink.SetPath(            PWideChar(APath));
     ISLink.SetWorkingDirectory(PWideChar(AWorkingDirectory));
     ISLink.SetArguments(       PWideChar(AArguments));
     ISLink.SetDescription(     PWideChar(ADescription));
     IPFile := IObject as IPersistFile;
     IPFile.Save(PWideChar(ALinkFileName), False);
  end;
  </code></pre>
  
  <p>PS: OS is Windows XP (and above).</p>