Re: Calling CFM Code
Re: Calling CFM Code
- Subject: Re: Calling CFM Code
- From: Neil Williams <email@hidden>
- Date: Sat, 25 Jun 2005 11:19:49 +0100
Douglas Davidson wrote:
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
Unfortunately, in this case I can't bundle the library with my app. The
library is an integral part of the target platform. My application
can't use a private version otherwise there might be forward
compatibility problems if the the target platform is upgraded.
Neil Williams
|
_______________________________________________
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