• 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: Call CFM shlb from Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Call CFM shlb from Cocoa


  • Subject: Re: Call CFM shlb from Cocoa
  • From: Chris Ridd <email@hidden>
  • Date: Tue, 30 Sep 2003 16:40:14 +0100

On 30/9/03 3:34 pm, John Tsombakos <email@hidden> wrote:
> Hello-
>
> I have a shared library (.shlb) that I want to use, but I
> have no idea how to call the routines in the library from
> Cocoa. I've searched the list (and found one thread about
> calling shlb routines, but it didn't have any answers),
> and searched Apple's site but have come up empty.
>
> There is some same code at Apple, but it's about calling
> Mach-O routines from Carbon, but I want to go the other
> way. How do I load a shared library (.shlb) and call
> Carbon (CFM) routines from a Cocoa app?

Use CFBundleLoadExecutable() to load the shared library (which has to be
structured as a bundle, presumably stored inside your app wrapper), and then
extract pointers to the functions inside the library using
CFBundleGetFunctionPointerForName().

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Call CFM shlb from Cocoa (From: "John Tsombakos" <email@hidden>)

  • Prev by Date: [SOLUTION] exporting bmp data from NSImage / NSBitmapImageRep
  • Next by Date: Re: Solution for "No launchable executable present to run"
  • Previous by thread: Call CFM shlb from Cocoa
  • Next by thread: Re: Call CFM shlb from Cocoa
  • Index(es):
    • Date
    • Thread