• 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
Callbacks in C libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Callbacks in C libraries
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Invisible files (was Re: Small problem)
  • Next by Date: Re: Callbacks in C libraries
  • Previous by thread: Re: Invisible files (was Re: Small problem)
  • Next by thread: Re: Callbacks in C libraries
  • Index(es):
    • Date
    • Thread