• 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: Open Resource File with Cocoa Path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Resource File with Cocoa Path


  • Subject: Re: Open Resource File with Cocoa Path
  • From: Donald Brown <email@hidden>
  • Date: Wed, 10 Apr 2002 16:48:24 -0500

I of course found the answer about 30 minutes after I posted the message.
Here's the code for those who follow after:

FSRef sRef;
OSErr io;

io=FSPathMakeRef([pPath fileSystemRepresentation],&sRef,NULL);

if (io==noErr)
{
SInt16 iRefNum = FSOpenResFile (&sRef, fsRdPerm);
if (iRefNum!= -1)
{
// Do Stuff

CloseResFile(iRefNum);
}
}


on 4/10/02 1:54 PM, Donald Brown at email@hidden wrote:

> I need to be able to import data from a legacy file, and it includes some
> data in a resource. Anyone have any code to open a resource file?
>
> As near as I can tell, I have to parse the path myself, calling
> FSMakeFSRefUnicode on each portion to build up an FSRef, which I pass to
> FSpOpenResFile. It can't be that screwy, can it?
>
> Donald

--
Donald Brown
email@hidden
http://www.eamontales.com

We have met the enemy and he is us - Pogo
_______________________________________________
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: 
 >Open Resource File with Cocoa Path (From: Donald Brown <email@hidden>)

  • Prev by Date: Re: Open Resource File with Cocoa Path
  • Next by Date: Capturing right button mouse clicks in NSMatrix
  • Previous by thread: Re: Open Resource File with Cocoa Path
  • Next by thread: Re: Open Resource File with Cocoa Path
  • Index(es):
    • Date
    • Thread