Re: Call CFM shlb from Cocoa
Re: Call CFM shlb from Cocoa
- Subject: Re: Call CFM shlb from Cocoa
- From: Douglas Davidson <email@hidden>
- Date: Tue, 30 Sep 2003 09:21:11 -0700
On Tuesday, September 30, 2003, at 07:34 AM, John Tsombakos wrote:
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?
The easiest way would be to wrap your shared library in a bundle and
use CFBundle; it will handle the cross-ABI issues for you. If this is
not feasible, you can call CFM code from Mach-o code with a small
amount of assembly glue--look in the documentation for the
cross-fragment calling sequence.
Douglas Davidson
_______________________________________________
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.