Paste: loading a bundle

Author: slava
Mode: c
Date: Sun, 13 Sep 2009 01:37:41
Plain Text |
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);

New Annotation

Summary:
Author:
Mode:
Body: