Re: Call CFM shlb from Cocoa
Re: Call CFM shlb from Cocoa
- Subject: Re: Call CFM shlb from Cocoa
- From: "M. Uli Kusterer" <email@hidden>
- Date: Wed, 1 Oct 2003 19:56:09 +0200
At 9:50 Uhr -0700 01.10.2003, Douglas Davidson wrote:
I would say a "loadable bundle", since you plan on loading it,
although it really doesn't make much difference. Most of the
Info.plist entries are not going to be relevant; you will need to
specify the executable, and you will want to have a bundle
identifier, and probably a version number, on general principle.
Ummm... BTW: I have some code on my web site that uses Carbon's CFM
APIs to load a CFM code fragment from a Resource manager Resource and
calls that. If you really just want to call a function in a CFM
library, using CFM to do it might be the easiest choice. You'd just
have to use the proper call for loading a CFM library instead of the
GetMemFragment() API call my code uses, before you can use
FindSymbol() to get at the function.
The sample is called "C++ XFromApp" and can be found at:
http://www.zathras.de/programming/programs_in_c_and_c++.php
It's C++ code, but the beef is straight C (as all Carbon APIs), so
this shouldn't be hard to figure out. I'm not sure whether this
version closes the connection to the library after loading it,
though, this may be something you'd want to do.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.