Re: Calling Carbon Plugins From MachO App
Re: Calling Carbon Plugins From MachO App
- Subject: Re: Calling Carbon Plugins From MachO App
- From: Lubor Prikryl <email@hidden>
- Date: Fri, 9 Aug 2002 23:13:21 +0200
You should create a T-Vector calling back to mach o host. This is a
memory space, where CFM stores indirect pointer value. I use 4 bytes
with function address saved, the pointer to these bytes is passed to
mach o as a function pointer.
Lubor, DSound
On Thursday, August 8, 2002, at 08:17 PM, Jim Wintermyre wrote:
You need to add some glue to the CFM entry point myMainAddr before you
can call it from Mach-O. In the Carbon SDK, check out the example
"CFM_MachO_CFM". In particular, there's a function called
MachOFunctionPointerForCFMFunctionPointer() which contains the glue you
need.
Also be careful if you are passing callback functions to the CFM
plugin. It won't be able to call routines in your MachO host without
adding some glue (i.e. recompiling the plugin). If that's not an
option, you may need to add an intermediate CFM shared lib that
contains stub callbacks that the CFM plugins can use directly, and
internally, it contains the glue to call the real callbacks that live
in your MachO app.
Jim
I am using the Code Fragment Manager to call Carbon plug-in code from a
Mach-O application unsuccessfully. It works fine in 9.x and before but
in
10.1 my Mach-O app crashes as soon as I call into myMainAddr.
Is there an easy way to get this to work?
Err = GetMemFragment(*myHandle, GetHandleSize(myHandle),
"\pPlugInFrag", kPrivateCFragCopy,
&myConnID,(Ptr*)&myMainAddr, myErrName);
Thanks,
Jeremy
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
GREAT MINDS DISCUSS IDEAS,
AVERAGE MINDS DISCUSS EVENTS,
SMALL MINDS DISCUSS PEOPLE.
- Eleanor Roosevelt
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.