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: Problem retrieving version from driver bundle on Mac OS X Intel



On 04/05/07, Peter Young <email@hidden> wrote:

Hi,

 

I am in the process of porting our OS X driver and support code to Mac OS X Intel.

I have hit a minor snag in that the code I used for the retrieving the driver version for the PPC version no longer works on the Intel version.

This is the code fragment I used for the PPC version:



I took your routine and stripped it down and it works fine for me on my Intel machine.  I did notice that you are releasing a CFStringRef which you created by assigning it to a CFSTR()

i.e.

        CFStringRef      cs = CFSTR ( kHWPlotLocation );
...
       CFRelease ( cs );

I'm sure that could cause some bad behaviour (like not being to open a bundle and weird results from function calls, say CFBundleGetVersionNumber()).

The archives have this discussion, for example <http://lists.apple.com/archives/carbon-dev/2004/Nov/msg01205.html>

Basically you want to treat CFSTR created strings as constants, you don't have to handle any memory management on them.


Cheers,
-H.

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

This email sent to email@hidden

References: 
 >Problem retrieving version from driver bundle on Mac OS X Intel (From: "Peter Young" <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.