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