Hi, Thanks for the response.
I used kCFStringEncodingASCII, since I am passing a char* strings for the filename and alias name through my program. Thanks On Thu, Jan 14, 2010 at 4:49 AM, Sean McBride <[email protected]>wrote: > 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 [email protected] > Rogue Research www.rogue-research.com > Mac Software Developer Montréal, Québec, Canada > > > _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
