• 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: Calling CFM Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling CFM Code


  • Subject: Re: Calling CFM Code
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 24 Jun 2005 08:35:33 -0700


On Jun 24, 2005, at 8:10 AM, Neil Williams wrote:

I was faced with the problem of writing a Cocoa app (for Panther) that uses a CFM shared library. The library is supplied by a third party so I only have the binary and API docs.


What I do (although this may bve considered an almighty hack) is to access the library via a CFM project I developed in CodeWarrior. I package this CFM shim code with my app and use:


CFBundleGetFunctionPointerForName() to get pointers to functions inside the shim that wrap the CFM shared library.


What annoys me the most with this approach is that I need CodeWarrior to build the CFM shim. If it was possible to write the shim in XCode I'd be delighted.



If you can package your CFM shared library inside a bundle structure, you may be able to use CFBundle to load it and obtain usable function pointers to it directly.  If you need to pass callback function pointers to it, that's a little trickier but still possible--basically you need to cons up a tvector.

Douglas Davidson

 _______________________________________________
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

  • Follow-Ups:
    • Re: Calling CFM Code
      • From: Neil Williams <email@hidden>
References: 
 >Re: Calling CFM Code (From: Dair Grant <email@hidden>)
 >Re: Calling CFM Code (From: "Nick D'Amato" <email@hidden>)
 >Re: Calling CFM Code (From: Neil Williams <email@hidden>)

  • Prev by Date: Re: Core Data relationships
  • Next by Date: Re: An API for index.html contents?
  • Previous by thread: Re: Calling CFM Code
  • Next by thread: Re: Calling CFM Code
  • Index(es):
    • Date
    • Thread