Re: CFBundle on a carbon AU
Re: CFBundle on a carbon AU
- Subject: Re: CFBundle on a carbon AU
- From: "Sophia Poirier [dfx]" <email@hidden>
- Date: Mon, 30 Mar 2009 12:38:25 -0400
On Mar 30, 2009, at 9:16 AM, Howard Moon wrote:
What's the best method for a carbon, C++ AudioUnit to
programatically get it's own CFBundleRef in run time?
(Sorry for sending my original reply to you personally, Shai.
Sometimes Reply goes to the mailing list, sometimes not. Very
frustrating.)
I don't know if it's the *best* method or not, but I use the
following:
CFStringRef cbstr = CFStringCreateWithCString( 0,
MY_BUNDLE_ID, kCFStringEncodingASCII );
CFBundleRef bundle = CFBundleGetBundleWithIdentifier( cbstr );
CFRelease( cbstr );
where MY_BUNDLE_ID is defined something like:
#define MY_BUNDLE_ID "com.MyCompany.effects.MyProduct.component"
In such a case where MY_BUNDLE_ID is a string constant like that, then
this would be a simpler method:
CFBundleRef bundle =
CFBundleGetBundleWithIdentifier(CFSTR(MY_BUNDLE_ID));
- Sophia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden