On 1/13/10 10:42 PM, rohan a said: >int CreateAlias(const char *target, const char *aliasname) >{ > CFStringRef Ref1 = CFStringCreateWithCString(NULL, target, >kCFStringEncodingASCII);
Don't use kCFStringEncodingASCII, filenames can have non-ASCII characters. Save yourself the trouble of all these conversions, and just use the NDAlias classes/categories. See here: <http://github.com/nathanday/ndalias> It doesn't currently support bookmarks, but a patch would be welcome (and pretty easy to add)! >Would it be possible to create an alias for a non-existent file ? No. But if its parent folder exists, you could create an alias to the parent folder and store the filename. Lastly, please don't post the same message to two lists. Not everyone is subscribed to both. -- ____________________________________________________________ Sean McBride, B. Eng s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com