char *bytes = ...; int length = ...; CFString string = CFStringCreateWithBytes(NULL,bytes,length,kCFStringEncodingUTF8,NULL); CFURLRef url = CFURLCreateWithFileSystemPath(NULL,path,kCFURLPOSIXPathStyle,true); CFBundleRef bundle = CFBundleCreate(NULL,url); if(!bundle) fail(); CFBundleLoadExecutable(bundle); CFRelease(bundle); CFRelease(url); CFRelease(string);