Hi!
I'm quite new to Objective-C, and now I'm trying to get it to interact
with older C-code compiled to a Win32 dll. (All work is on PC with
GNUStep.)
One of my old C-functions requests a function pointer of type
Do_SFXP_Buffer_Allocate_t as input, and the function pointer type is
declared as:
typedef BufferHeader_t*(* Do_Buffer_Allocate_t)(const uint16
NoOfChannels);
I have now written a method in Objective C whos interface looks like
the expected C-interface. (Is the function the same with first input
argument and output in register 0?)
How can I extract the function pointer to my Obj-C function and use it
as input to my C-function? (I'm using the NS-cl*****...)
-(BufferHeader_t*)AllocateBufferWithChannels:(const
uint16)nNoOfChannels
{
....
}
-(Do_Buffer_Allocate_t*)getAlloccateBufferFunctionPointer
{
return ??? /In pure C: &AllocateBufferWithChannels;
}
Best regards
Andreas Lundgren - Sweden