#include<CoreFoundation/CoreFoundation.h>
#include<IOKit/IOKitLib.h>
void main()
{
CFBundleRef myBundle;
// Look for a bundle using its identifier
requestedBundle = CFBundleGetBundleWithIdentifier(
CFSTR("com.x86dev.driver.lspcidrv") );
assert(myBundle != NULL); //failed here
CFDictionaryRef bundleInfoDict;
CFStringRef myPropertyString = NULL;
// Get an instance of the non-localized keys.
bundleInfoDict = CFBundleGetInfoDictionary( myBundle );
// If we succeeded, look for our property.
if ( bundleInfoDict != NULL ) {
myPropertyString = CFDictionaryGetValue( bundleInfoDict,
CFSTR("CFBundleIdentifier"));
printf("myPropertyString: %s\n",CFStringGetCStringPtr(myPropertyString, kCFStringEncodingMacRoman));
}
CFRelease( bundleURL );
// Release the bundle when done.
CFRelease( myBundle );