Re: Function Pointers
Re: Function Pointers
- Subject: Re: Function Pointers
- From: Scott Ribe <email@hidden>
- Date: Sun, 27 Mar 2005 08:50:55 -0700
> I'm trying to interface with some c code that requires me to pass a
> function pointer. I was wondering if its possible to pass a specific
> objects instance of a function.
No. If the API allows you to pass in some data for your function via a void
*, then you can use that to pass your object, along with a pointer to a
static function which will cast the void * to your function pointer and call
the appropriate method. If the API does not do this, it is poorly designed.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 665-7007 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden