Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FSOpenResFile vs FSpOpenResFile




On 16-jan-07, at 5:36, Bob Sabiston wrote:

I am trying to update some old code that opened a resource file using
FSpOpenResFile().  Instead of doing this, I'm calling FSOpenResFile()
but with the new function, the return value is -1 whereas the old
function returns a valid reference number, both trying to open the
same existing file.

Try this:

HFSUniStr255	name;
OSStatus  	error;

error 	=	FSGetHFSUniStrFromString( CFSTR("myFileName"), &name );

error = FSMakeFSRefUnicode( &pRef, name.length,
	name.unicode, kTextEncodingUnknown, &myRef );

Jan E.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.