Re: Is there such a thing as a "CoreMIDI Version Number" that can be queried?
Re: Is there such a thing as a "CoreMIDI Version Number" that can be queried?
- Subject: Re: Is there such a thing as a "CoreMIDI Version Number" that can be queried?
- From: Stephen Kay <email@hidden>
- Date: Sun, 07 May 2006 21:52:46 -0400
on 4/25/06 2:39 PM, Jeff Moore at email@hidden wrote:
> Absolutely. You just need to fetch the version of the framework from
> the bundle. You can do it without knowing any paths as you can look
> the bundle up by it's ID, "com.apple.audio.midi.CoreMIDI".
OK, I finally got around to trying this.
I tried this:
char tempString[64];
CFBundleRef requestedBundle =
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.audio.midi.CoreMIDI"));
if (requestedBundle == nil){
strcpy(tempString, "Could not locate CoreMIDI Framework");
}else{
// Look for the bundle's version number.
UInt32 bundleVersion = CFBundleGetVersionNumber(requestedBundle);
}
I'm calling this on OSX 10.3.9.
The above yields a bundleVersion of 0x29008000. Is this right? What do I do
with this number? It seems that, if treating this as a MacOS9 NumVersion,
that this would be 41.0.0 (unless I'm reading this wrong), which doesn't
make sense to me. Is that the correct version number?
I also tried this (which maybe I'm doing wrong):
CFBundleRef requestedBundle =
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.audio.midi.CoreMIDI"));
if (requestedBundle == nil){
strcpy(tempString, "Could not locate CoreMIDI Framework");
}else{
CFStringRef versionString =
(CFStringRef)CFBundleGetValueForInfoDictionaryKey(requestedBundle,
kCFBundleVersionKey);
CFStringGetCString(versionString, tempString, sizeof(tempString), 0);
CFRelease(versionString);
}
This is giving me a value of "29". Obviously, I need some help here. ;-)
Thanks,
- Stephen
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma Lab - developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
_______________________________________________
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