• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to find icon file path, Part II
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find icon file path, Part II


  • Subject: Re: How to find icon file path, Part II
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 24 Jul 2002 14:27:06 -0700

On Wednesday, July 24, 2002, at 11:33 AM, Chris Anderson wrote:

GetIconRefFromFile() should give back an 'icon-unique' pointer (I think!) if
I give it an FSSpec. But that is in turn made (via FSMakeFSSpec) from a
volume reference number and a ConstStr255Param string and a directory id,
none of which I have any idea how to get from my NSString path... not to
mention how I ought to interpret the 'sint16 *' string that will contain the
label when GetIconRefFromFile returns...

I'm not prepared right now to offer an opinion on the larger issues, but to get an FSSpec from an NSString path you can (a) call fileSystemRepresentation to get a C-string path; (b) call FSPathMakeRef to get an FSRef; and (c) call FSGetCatalogInfo, in which I believe the fifth argument returns the FSSpec by reference--something like FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec, NULL). You may be able to ignore the label.

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How to find icon file path, Part II (From: Chris Anderson <email@hidden>)

  • Prev by Date: off-screen imageview drawing
  • Next by Date: Re: What's the format of InfoPlist.strings?
  • Previous by thread: How to find icon file path, Part II
  • Next by thread: Re: How to find icon file path?
  • Index(es):
    • Date
    • Thread