Re: Calling CFM Code
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