the old MachOFunctionPointerFor...
the old MachOFunctionPointerFor...
- Subject: the old MachOFunctionPointerFor...
- From: "vvor" <email@hidden>
- Date: Tue, 10 Jun 2003 20:01:16 -0400
trying to callback from coremidi to cfm by the accepted means...is there an
obvious mistake here someone can **point out?
typedef void (*MyReadProcPtr)(const MIDIPacketList*, void*, void*, void*);//for
my cfm readproc
typedef OSStatus(*CreateInputPortPtr)(MIDIClientRef, CFStringRef, MyReadProcPtr,
void*, MIDIPortRef*);//for the macho routine
MyReadProcPtr myReadProc = NULL;
CreateInputPortPtr createInputPort = NULL;
static void MyCFMReadProc(const MIDIPacketList*, void*, void*, void*);
void *MachOFunctionPointerForCFMFunctionPointer(void*);
all the bundle connections return ok:
i createclient, etc., then:
CreateInputPortPtr = (OSStatus)(*)(MIDIClientRef, CFStringRef, MyReadProcPtr,
void* MIDIPortRef*))CFBundleGetFunctionPointerForName(myBundle,
CFSTR("MIDIInputPortCreate"));//this returns not nil
//glue stuff
UInt32 cfmglue[6] = {0x3d800000, ....etc...
void *MachOFunction....etc...(void *cfmfp){
//copied straight from CFM_MachO_CFM.c
//etc...
}
//here is myCFMReadProc:
static void MyCFMReadProc(const MIDIPacketList *pktlist, void *refcon, void
*connRefCon){
//fabricateWMD(Air thinair, pktlist);
}
then...drumroll...
createInputPort = MachOFunctionPointerForCFMFunctionPointer(MyCFMReadProc);
error: illegal implicit conversion from 'void *' to 'void(*)(const
MIDIPacketList *, void*, void*)'
hopefully, it's just a typo...
vvvv
_______________________________________________
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.