• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Executing non objective-c code in a loaded bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Executing non objective-c code in a loaded bundle


  • Subject: Re: Executing non objective-c code in a loaded bundle
  • From: Mark Williams <email@hidden>
  • Date: Wed, 28 Jun 2006 20:49:10 -0700

Thanks to both of you for this information.
I'll be working on it and I think with this information I should be able to get this working. Thanks very much :)


Mark.

On Jun 28, 2006, at 2:59 PM, Uli Kusterer wrote:

Am 28.06.2006 um 22:23 schrieb Pascal Pochet:
make an URL from the POSIX path to your bundle

CFURLRef bundleURL = CFURLCreateWithFileSystemPath (CFAllocatorGetDefault(),
ABSOLUTE_PATH_TO_YOUR_BUNDLE_AS_CFSTRINGREF,
kCFURLPOSIXPathStyle, NO) ;

BTW -- CFURLRef and NSURL* are toll-free bridged, so if you have an NSURL*, you can just cast it to a CFURLRef. Same applies to CFStringRef and NSString*.


to call the function:

(*FUNCTION_VAR)( PARAMS );

BTW - C lets you get away without dereferencing FUNCTION_VAR. So, if you want to, you can write


	FUNCTION_VAR( ... );

and thus call a dynamically loaded function just like a static one if you put its pointer in a global or "file-global" static variable. Useful if you have a library that gets loaded when it is present, but without which you can do (like Growl, for instance, or a library to talk to some hardware that's only there if that additional hardware is installed). You can write the code without all those additional asterisks and brackets.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40fornextsoft.com


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Executing non objective-c code in a loaded bundle (From: Damien Sorresso <email@hidden>)
 >Re: Executing non objective-c code in a loaded bundle (From: Chris Suter <email@hidden>)
 >Re: Executing non objective-c code in a loaded bundle (From: Mark Williams <email@hidden>)
 >Re: Executing non objective-c code in a loaded bundle (From: Pascal Pochet <email@hidden>)
 >Re: Executing non objective-c code in a loaded bundle (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Getting a return value from a dialog
  • Next by Date: Re: Detecting Internet
  • Previous by thread: Re: Executing non objective-c code in a loaded bundle
  • Next by thread: Store file properties alongside coredata?
  • Index(es):
    • Date
    • Thread