Callbacks in C libraries
Callbacks in C libraries
- Subject: Callbacks in C libraries
- From: Eric Shepherd <email@hidden>
- Date: Sat, 14 Jun 2003 16:48:16 -0400
I have a Cocoa application that needs to use an ANSI C library. One of
the functions I need to call requires as a parameter a pointer to a
callback function that gets called periodically with the results of the
operation. The callback needs to be a function with the prototype:
int CallbackFunc(ConfigRec *cfgRec, const DataRec *pRecord);
How can my Objective C class use this C library function, providing a
pointer to the callback function, and have the callback still able to
access member data within my Objective C class?
Thanks in advance for any help.
--
Eric Shepherd
Owner
Syndicomm
http://www.syndicomm.com
_______________________________________________
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.