• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
the old MachOFunctionPointerFor...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: the old MachOFunctionPointerFor...
      • From: Urs Heckmann <email@hidden>
  • Prev by Date: Re: AU parameter groups proposal
  • Next by Date: WWDC Schedule and CA
  • Previous by thread: Re: AU parameter groups proposal
  • Next by thread: Re: the old MachOFunctionPointerFor...
  • Index(es):
    • Date
    • Thread