Creating an allias with C++

Discussion in 'Mac Programming' started by rnm256, Dec 19, 2008.

  1. rnm256 macrumors newbie

    Joined:
    Dec 18, 2008
    #1
    I am trying to create a desktop shortcut(alias) on MAC using C++
    I have done the same successfully on a Windows machine using the IShellLink and IPersistFile interfaces.

    Though I have browsed around I have not been able to get any information on this for MAC.

    In Windows I was able to give details of the the shortcut as follows:

    1. Target File (Where the .exe resides) and
    2. Arguments Eg -name <name Value> -password <password value>
    3. Start In directory

    Any pointers will be appreciated.

    Thanks in advance,
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Alias Manager

    I'm not sure how you're writing a Mac program with Visual Studio though...
     
  3. rnm256 thread starter macrumors newbie

    Joined:
    Dec 18, 2008
    #3
    (just to avoid confusion I removed the Visual Studio part of the query - nevertheless to quickly answer Ur question, the #ifdef MAC #else WIN is used).
    I am aware that XCode is used to develop on MAC. :)

    Appreciate the link.
    If possible, can U provide a snippet of how it can be used.

    Thanks once again for Ur time!
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    I don't have an example but I'm sure Google does... this API isn't new so I'm sure there are plenty of examples on the web.
     
  5. rnm256 thread starter macrumors newbie

    Joined:
    Dec 18, 2008
    #5
    Thanks kainjow for you help.

    There were a few thoughts (which I gathered from my recent browsing on the topic of creating a shortcut on MAC) which I would appreciate a second opinion on: :)
    There are a couple of ways to create an alias:
    1. Using Alias Manager
    2. with symbolic link (ln -s)

    Which would be the better path to take for my case? This is keeping in mind all factors like supported in both old and new releases of MAC.

    Any suggestions and insights into this issue would be appreciate.
    Tks once again!
     

Share This Page